Page 1 of 1

Rp2350 Support and RP2040 Update

Posted: Fri Dec 26, 2025 2:24 pm
by emulator
I've made a set of changes to update ChibiOS to the latest Pico SDK, update the RP2040 support and add support for the RP2350. The work is presented as a series of patch files with descriptions in an incremental fashion to allow for easier review. The RP2350 CMSIS header was created by a combination of svdconv with manual corrections to better match the expectation and existing format in ChibiOS. The order to the RP2350 headers are the same as the RP2040 which allow for simple visual diffing. Support for the RP2350 LLDs was added to the existing drivers to keep things simple and reduce code duplication.

There is one HACK in 09-RP2350-HAL.patch, the existing ARMv8 support doesn't have a good way that I could find to invoke stBind to setup clocks in tickless mode so I added a weak symbol __port_platform_init but there must be a better way to do this. :D

You can also find the complete set of changes in my GitHub repository within the em-pico-update branch https://github.com/emolitor/ChibiOS/tree/em-pico-update

Attached is pico-patches.zip a file of 15 patches structured in a logical order to allow easy review. Each patch file is presented in pseudo LKML style including a description header and they can be applied with either patch -p1 or git apply. The patches are reasonably standalone/self contained, particularly the RP2040 updates. This makes them easier to review and they can be applied individually for the most part. I'd be delighted for feedback on the patches and approaches taken.

Code: Select all

00-RP2040-CMSIS.patch     - Fix CMSIS header and add registry entries for RP2040 platform support
01-RP2040-LLD-GPIO.patch  - Replace hardcoded GPIO line count with RP_GPIO_NUM_LINES from registry.
02-RP2040-LLD-DMA.patch   - Update DMA driver to use RP_DMA_NUM_CHANNELS from registry
03-RP2040-LLD-TIMER.patch - Rename RP2040 TIMER peripheral to TIMER0
04-RP2040-SDK.patch       - Upgrade Pico SDK integration from 1.1.0 to 2.2.0
05-RP2040-DEMO.patch      - Update RP2040 demo to run from flash
06-RP2350-CMSIS.patch     - Add device headers for the RP2350
07-RP2350-Startup.patch   - Add RP2350 startup support:
08-RP2350-Board.patch     - Add board support for the Raspberry Pi Pico 2
09-RP2350-HAL.patch       - RP2350 HAL port using as much of the existing ARMv8-M-ML support as possible
10-RP2350-LLD-DMA.patch   - Extend the DMA channel table to support 16 channels on RP2350
11-RP2350-LLD-GPIO.patch  - Update PAL driver to support RP2350
12-RP2350-LLD-TIMER.patch - Extend Timer driver to support RP2350's dual timer configuration
13-RP2350-LLD-WDG.patch   - Update watchdog driver to support both RP2040 and RP2350
14-RP2350-DEMO.patch      - Add RP2350 demo

Re: Rp2350 Support and RP2040 Update

Posted: Mon Jan 05, 2026 12:54 pm
by Giovanni
Hi,

Addressed in Discord, you have now access to the repository, welcome to the team.

Giovanni

Re: Rp2350 Support and RP2040 Update

Posted: Thu Jan 08, 2026 6:44 pm
by emulator
Huzzah!

I've merged into trunk the initial version of the bare metal port for the RP2040. I will continue testing and work on the RP2350 tomorrow. You can find a more detailed reporting of progress on rp-pico-public on discord.

Re: Rp2350 Support and RP2040 Update

Posted: Sun Mar 29, 2026 6:31 pm
by electronic_eel
Hi emulator,

I've used ChibiOS with the RP2040 in the past, with my own set of patches to the linker scripts and Makefiles to get it to work from flash and not only from ram. This worked, but was cumbersome to maintain. Today I used your updated set of RP2040 support for the first time with a new project. Setting it all up and getting it to boot was a breeze.

:D

Thank you very much for your work! And also thanks to Giovanni for reviewing and integrating it into ChibiOS proper.

Re: Rp2350 Support and RP2040 Update

Posted: Mon Mar 30, 2026 12:21 pm
by alex31
Hello,

Thanks all for this huge work.

As a potential new user of pico platform, what make this appealing is the wireless support, does the chibios port give access to the bt/wifi stack ?

Alexandre

Re: Rp2350 Support and RP2040 Update

Posted: Mon Mar 30, 2026 6:29 pm
by electronic_eel
alex31 wrote: Mon Mar 30, 2026 12:21 pm does the chibios port give access to the bt/wifi stack ?
While looking through the code I haven't seen any parts relating to wifi/bt. But I haven't done the port or looked at each line, so I can't say for sure.

But the wifi/bt part requires some closed-source binary blobs from Broadcom. They have a special license you should check beforehand.

Also I'm a bit in doubt of how reliable the path for getting security updates for these binary blobs is. The wifi/bt modules are complex processors handling potentially hostile data received over the air. Look at how often manufacturers like Qualcomm and Broadcom have to ship critical security fixes for their wifi drivers in mobile phones. This is a similar domain, maybe even shared code, and still these blobs are the same since 3 years. Broadcom is known for restricting information only to big corporations that buy directly from them.

So while this may be totally fine for a one-off experiment, I'd be quite wary of using this for something that should work reliably for a few years or even a commercial product.