-
Notifications
You must be signed in to change notification settings - Fork 64
RP2040: Compiling
µCNC for RP2040 can be built this way
At the time of release of vesion v1.6.0 that supports RP2040, the Arduino Pico framework has several issues that might cause problems while trying to compile the code. These are some tips on how to be able to do it.
On Windows, PlatformIO seems to have some trouble downloading and installing the framework and tools needed to perform the task. After alot of digging, I found and issue that reports the problem and the solution that is related to issues with long names in Windows.
- To fix this issue you have to insure long path names are enabled in windows
- Also enable long path names in git. Install git, add it to your PATH environment variable and run the following command:
git config --system core.longpaths true
Other issues seem to arrise when trying to compile with either Pico or Pico W.
- For Pico W I recommend using framework version 3.1.1 or newer (Bluetooth support was added with version 3).
- For Pico I recomment using previous version 2.7.3 since there seems to be an issue with filtering used libraries resulting in compilation errors.
For Pico W using Arduino IDE and enabling Bluetooth don't forget to select the appropriate IP/Bluetooth stack option
WARNING: If you have issues read the notes above.
- Get Visual Studio Code and install it.
- Install the PlatformIO extension.
- Open uCNC folder in VSCode.
- Edit
cnc_config.h file
andcnc_hal_config.h file
to fit your needs and board. - If needed edit the platformio.ini file environment for your board. Compile the sketch and upload it to your board.
WARNING: If you have issues read the notes above.
- Get Arduino IDE and install it. In this case I recommend using version 2 of the IDE.
- If you don't have, install RP2040 with Arduino board manager has explained here
- Go to uCNC folder and open uCNC.ino sketch.
- Edit
cnc_config.h file
andcnc_hal_config.h file
to fit your needs and board. - Use these settings:
- Compile the sketch and upload it to your board (via UF2).
µCNC is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. µCNC is distributed WITHOUT ANY WARRANTY.
Also without the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
µCNC Wiki
- Home
- Basic user guide
- Porting µCNC and adding custom HAL
- Customizing the HAL file
- Adding custom Tools and Modules to µCNC
- FAQ
µCNC for ALL MCU
µCNC for AVR
µCNC for STM32F1 and STM32F4
µCNC for SAMD21
µCNC for ESP8266
µCNC for ESP32
µCNC for NXP LPC176x
µCNC for NXP RP2040