Hi,
the port for the RP2040 is currently not nice to use, because you can't boot from flash, but have to upload the code with a SWD debugger into RAM on each boot. To boot from flash, the RP2040 requires a short bootloader at the beginning of the flash (stage2). This bootloader is included in the Pico-SDK. But to be usable with ChibiOS, building the bootloader must be included in the make build system and the code be linked to the correct addresses.
The attached patches implement this. I have also added a .mk file to create the UF2 files that can be used to flash with the usb bootloader integrated in the RP2040.
I had to add small hooks to the generic ARM GCC makefiles. I have documented this in more detail the individual patch files. If any of my changes there are not acceptable or should be done differently, please explain why and I will try to adapt them.
The linker script patches are based on the work done by forum user szilveszter in this post.
The patches are attached as zip file. Alternatively you can view the whole tree with the patches applied at https://github.com/electroniceel/ChibiOS/tree/RP2040-flash
Please consider applying to ChibiOS.
RP2040 stage2 bootloader / allow booting from flash
-
- Posts: 83
- Joined: Sat Mar 19, 2016 8:07 pm
- Has thanked: 1 time
- Been thanked: 18 times
RP2040 stage2 bootloader / allow booting from flash
- Attachments
-
- RP2040-flash.zip
- (7.01 KiB) Downloaded 439 times
Re: RP2040 stage2 bootloader / allow booting from flash
Hi,
thank you very much for submitting this. atm it's the only working solution for getting my RPico board running from flash, and I really would like to
use these devices with chibios.
Fred
thank you very much for submitting this. atm it's the only working solution for getting my RPico board running from flash, and I really would like to
use these devices with chibios.
Fred
Return to “Small Change Requests”
Who is online
Users browsing this forum: No registered users and 4 guests