04_projects:03_rpi2040_pico_mmu
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
04_projects:03_rpi2040_pico_mmu [2025/08/19 10:45] – created jattie | 04_projects:03_rpi2040_pico_mmu [2025/08/19 20:53] (current) – [Connect the board to the main host application] jattie | ||
---|---|---|---|
Line 25: | Line 25: | ||
After some [[https:// | After some [[https:// | ||
- | The theory is that I can flash | + | The theory is that you can flash a RPI Pico 2040 with Klipper and once that is achieved you simply define the IO pins for stepper and servo control in Klipper scrips. |
+ | ===== The Basic Steps ===== | ||
+ | |||
+ | * Install Klipper on a PC | ||
+ | * Create a Configuration | ||
+ | * Build the configuration | ||
+ | * Flash the binary to the Raspberry PI Pico 2040 | ||
+ | * Connect the board to the main host application | ||
+ | |||
+ | |||
+ | ===== Install Klipper on a PC ===== | ||
+ | |||
+ | <code shell> | ||
+ | git clone https:// | ||
+ | cd klipper | ||
+ | make menuconfig | ||
+ | </ | ||
+ | |||
+ | ===== Create a Configuration ===== | ||
+ | |||
+ | Make Menuconfig brings up this application to easily chose and select options from. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | For my test I chose the options as shown above. | ||
+ | |||
+ | The documentation I could find states the following: | ||
+ | |||
+ | ^Option ^Recommended Setting^Why^ | ||
+ | |Enable extra low-level configuration options |✅ Enabled |Required for RP2040-specific tuning| | ||
+ | |Micro-controller Architecture |Raspberry Pi RP2040/ | ||
+ | |Processor model |rp2040 |Correct for Raspberry Pi Pico| | ||
+ | |Bootloader offset |No bootloader |Pico uses drag-and-drop UF2 flashing| | ||
+ | |Flash chip |W25Q080 with CLKDIV 2 |Default for most Pico boards; safe choice| | ||
+ | |Communication Interface |USBSERIAL |Needed to connect via USB to your K1 Max| | ||
+ | |USB IDs |Leave default |Optional unless you need custom device IDs| | ||
+ | |Optimize stepper code for 'step on both edges' | ||
+ | |GPIO pins to set at micro-controller startup |Leave blank |Only needed for special pin initialization| | ||
+ | |||
+ | |||
+ | |||
+ | ===== Build the configuration ===== | ||
+ | |||
+ | <code bash> | ||
+ | jattie@Jattie-PC: | ||
+ | Building out/ | ||
+ | Compiling out/ | ||
+ | make: arm-none-eabi-gcc: | ||
+ | make: *** [Makefile: | ||
+ | |||
+ | </ | ||
+ | |||
+ | <WRAP center round tip 60%> | ||
+ | That error means your system is missing the ARM cross-compiler toolchain—specifically arm-none-eabi-gcc, | ||
+ | |||
+ | </ | ||
+ | |||
+ | This is resolved by installing the missing tools | ||
+ | |||
+ | <code bash> | ||
+ | jattie@Jattie-PC: | ||
+ | sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi | ||
+ | </ | ||
+ | |||
+ | Build then runs to completion as expected. | ||
+ | |||
+ | <code bash> | ||
+ | jattie@Jattie-PC: | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Compiling out/ | ||
+ | Building out/ | ||
+ | Version: v0.13.0-213-gd34d3b05b | ||
+ | Building rp2040 stage2 out/ | ||
+ | Preprocessing out/ | ||
+ | Linking out/ | ||
+ | Building out/ | ||
+ | Creating uf2 file out/ | ||
+ | |||
+ | </ | ||
+ | ===== Flash the binary to the Raspberry PI Pico 2040 ===== | ||
+ | |||
+ | * Plug the Pico into your computer while holding the BOOTSEL button, it will mount as a USB drive. | ||
+ | * Copy klipper.uf2 to the Pico drive, it will reboot automatically. | ||
+ | |||
+ | |||
+ | ===== Test the Connection ===== | ||
+ | |||
+ | * Plug the flashed pico into K1 Max USB Port | ||
+ | * Establish an SSH connection to the K1 Max and found the new serial device. | ||
+ | |||
+ | <code ssh> | ||
+ | root@creality /root [#] ls / | ||
+ | usb-Klipper_rp2040_E66058388361172C-if00 | ||
+ | root@creality /root [#] | ||
+ | </ | ||
+ | |||
+ | We seem to have a successful Klipper installation on the Pico 2040. | ||
+ | |||
+ | |||
+ | ===== Connect the board to the main host application ===== | ||
+ | |||
+ | <WRAP center round tip 60%> | ||
+ | Some basic testing to confirm all is well, add the basic config and simply blink the LED on the Pico 2040. | ||
+ | </ | ||
+ | |||
+ | |||
+ | <code ini> | ||
+ | [mcu pico_2040_mmu] | ||
+ | serial: / | ||
+ | |||
+ | [output_pin pico_led] | ||
+ | pin: pico_2040_mmu: | ||
+ | pwm: False | ||
+ | shutdown_value: | ||
+ | |||
+ | </ | ||
+ | |||
+ | Adding the config and restarting Klipper however yield this error: | ||
+ | |||
+ | <code bash> | ||
+ | MCU Protocol error | ||
+ | |||
+ | This type of error is frequently caused by running an older | ||
+ | version of the firmware on the micro-controller (fix by | ||
+ | recompiling and flashing the firmware). | ||
+ | |||
+ | Your Klipper version is: 09faed31-dirty | ||
+ | MCU(s) which should be updated: | ||
+ | mcu: Current version 1.3.0.40-5-g6977eaff-dirty-20230711_100121-ubuntu | ||
+ | nozzle_mcu: Current version 1.3.0.40-5-g6977eaff-dirty-20230711_100254-ubuntu | ||
+ | leveling_mcu: | ||
+ | Up-to-date MCU(s): | ||
+ | |||
+ | |||
+ | Once the underlying issue is corrected, use the " | ||
+ | command to reload the config and restart the host software. | ||
+ | |||
+ | mcu ' | ||
+ | </ |
04_projects/03_rpi2040_pico_mmu.1755600326.txt.gz · Last modified: by jattie