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.
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
