/mvCNC-Modern-Vintage-CNC-Firmware

Feature rich CNC/Laser firmware with support for more than 30 of the most popular 3D printer boards from a variety of manufacturers.

Primary LanguageC++GNU General Public License v3.0GPL-3.0

Modern Vintage CNC Firmware (mvCNC)

Feature rich CNC/Laser firmware with support for multiple hardware platforms

mvCNC is based on the popular Marlin 3D printing firmware, but changes the focus specifically to CNC spindled and laser machines and their unique demands, such as Automatic Tool Changer support, dynamic stepper configuration, multiple coordinate systems, and Real-Time commands.

Features (in addition to base Marlin features) added so far:

  • Wii Nunchuck jogging support (Enable in config_adv. Can be enabled/disabled on the fly via M258 W[0/1])
  • G10 coordinate support LinuxCNC spec
  • Instant feed-rate adjustments M220
  • Priority command execution (config_adv to configure which commands you want prioritized)
  • i2c accessory scanning M259 which reports any i2c devices attached to the board. Handy if you don't know the address of a device.
  • Work AND Machine coordinate reporting using M114
  • CNC/Laser specific LCD display layout

Features in progress

  • Manual bit change support
  • ATC support with tool-specific settings

If you have any requests I'm always looking for ideas on what CNC people wish Marlin supported. Open an issue with [FR] in the title.

Until the gCode feature set is stabilized and officially documented, you can reference the documentation at the Marlin Home Page for common gCode commands. Just note, mvCNC will not have 3D printing support, so Marlin's extruder and heater support will not apply.

The base branch is for production machines and will be the most stable of the branches.

  • Other branches are in-development and should not be used unless specifically instructed to.

Building mvCNC

To build mvCNC you'll need PlatformIO and Microsoft's VS Code.

  • Checkout or download the ZIP source and extract
  • Open the project directory in vsCode.
  • PlatformIO should auto install (if you haven't already)
  • Adjust the Configuration.h and Configuration_adv.h files to your specific CNC/laser setup and preferences. Read them carefully
  • You can then build for your specific controller board by clicking the checkmark in the bottom status bar of vsCode.
  • Assuming your config checks out (there is error-checking), copy the created firmware.bin file (in the .pio directory) to your SD card and insert it into your controller.
  • Reset your controller and it should auto-update.
  • Profit!

Please do not ask support questions regarding specific hardware, as I cannot test for every hardware configuration (I only have a few boards to test on).

That said..

Hardware Abstraction Layer (HAL)

mvCNC contains a layer of abstraction so all the existing high-level code can be built for multiple 32-bit hardware platforms.

Current HALs

ESP32

board processor speed flash sram logic fpu
ESP32 Tensilica Xtensa LX6 160-240MHz variants --- --- 3.3V ---

LPC1768 / LPC1769

boards processor speed flash sram logic fpu
Re-ARM LPC1768 ARM-Cortex M3 100MHz 512k 32+16+16k 3.3-5V no
MKS SBASE LPC1768 ARM-Cortex M3 100MHz 512k 32+16+16k 3.3-5V no
Selena Compact LPC1768 ARM-Cortex M3 100MHz 512k 32+16+16k 3.3-5V no
Azteeg X5 GT LPC1769 ARM-Cortex M3 120MHz 512k 32+16+16k 3.3-5V no
Smoothieboard LPC1769 ARM-Cortex M3 120MHz 512k 64k 3.3-5V no
[BTT SKR 1.3] LPC1768 ARM-Cortex M3 100MHz 512k 64k 3.3-5V no
[BTT SKR 1.4/1.4-Pro] LPC1769 ARM-Cortex M3 100MHz 512k 64k 3.3-5V no

SAMD51

boards processor speed flash sram logic fpu
Adafruit Grand Central M4 SAMD51P20A ARM-Cortex M4 120MHz 1M 256k 3.3V yes

STM32F1

boards processor speed flash sram logic fpu
Arduino STM32 STM32F1 ARM-Cortex M3 72MHz 256-512k 48-64k 3.3V no
Geeetech3D GTM32 STM32F1 ARM-Cortex M3 72MHz 256-512k 48-64k 3.3V no

STM32F4

boards processor speed flash sram logic fpu
STEVAL-3DP001V1 STM32F401VE Arm-Cortex M4 84MHz 512k 64+32k 3.3-5V yes

Teensy 3.1 / 3.2

boards processor speed flash sram logic fpu
Teensy 3.2 MK20DX256VLH7 ARM-Cortex M4 72MHz 256k 32k 3.3V-5V yes

Teensy 3.5 / 3.6

boards processor speed flash sram logic fpu
Teensy 3.5 MK64FX512VMD12 ARM-Cortex M4 120MHz 512k 192k 3.3-5V yes
Teensy 3.6 MK66FX1M0VMD18 ARM-Cortex M4 180MHz 1M 256k 3.3V yes

Teensy 4.0 / 4.1

boards processor speed flash sram logic fpu
Teensy 4.0 IMXRT1062DVL6A ARM-Cortex M7 600MHz 1M 2M 3.3V yes
Teensy 4.1 IMXRT1062DVJ6A ARM-Cortex M7 600MHz 1M 2M 3.3V yes

Submitting Patches

Proposed patches should be submitted as a Pull Request against the Dev branch.

  • This branch is for fixing bugs and integrating any new features for the duration of the mvCNC life-cycle.
  • Please submit Feature Requests and Bug Reports to the Issue Queue
  • Whenever you add new features, be sure to add tests to buildroot/tests and then run your tests locally, if possible.
    • It's optional: Running all the tests on Windows might take a long time, and they will run anyway on GitHub.
    • If you're running the tests on Linux (or on WSL with the code on a Linux volume) the speed is much faster.
    • You can use make tests-all-local or make tests-single-local TEST_TARGET=....
    • If you prefer Docker you can use make tests-all-local-docker or make tests-all-local-docker TEST_TARGET=....

Credits

The current mvCNC dev team consists of:

License

Modern Vintage CNC, mvCNC, is published under the GPL license because we believe in open development. The GPL comes with both rights and obligations. Whether you use mvCNC firmware as the driver for your open or closed-source product, you must keep mvCNC open, and you must provide your compatible mvCNC source code to end users upon request. The most straightforward way to comply with the mvCNC license is to make a fork of mvCNC on Github, perform your modifications, and direct users to your modified fork.

While we can't prevent the use of this code in products (3D printers, CNC, etc.) that are closed source or crippled by a patent, we would prefer that you choose another firmware or, better yet, make your own.