Add FreeRTOS support for RP2040/RP2350 #3598
Conversation
…ply WARN_FLAGS to tinyusb sources and examples sources only (skip 3rd party library and mcu vendor)
There was a problem hiding this comment.
Pull request overview
Adds FreeRTOS (SMP) integration for the RP2040/RP2350 BSP by pulling in Raspberry Pi’s FreeRTOS-Kernel fork, refactoring RP2040 family CMake to use shared helpers, and updating examples to enable RP2040 FreeRTOS builds.
Changes:
- Integrate RP2040 FreeRTOS via the Raspberry Pi FreeRTOS-Kernel fork and add a RP2040 FreeRTOSConfig.
- Refactor RP2040 family CMake to use
family_configure_common()/family_add_rtos()fromfamily_support.cmake. - Unskip RP2040 for multiple FreeRTOS examples and address a couple of sign-conversion warnings in examples.
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/get_deps.py | Adds Raspberry Pi FreeRTOS-Kernel fork dependency and bumps upstream FreeRTOS-Kernel commit. |
| test/hil/hil_test.py | Fails fast when no matching serial device is found. |
| hw/bsp/rp2040/family.cmake | Refactors example configuration and warning application for RP2040. |
| hw/bsp/rp2040/family.c | Adds a FreeRTOS stack overflow hook for RP2040 BSP. |
| hw/bsp/rp2040/FreeRTOSConfig/FreeRTOSConfig.h | New RP2040/RP2350 FreeRTOS configuration (incl. SMP-related config). |
| hw/bsp/family_support.cmake | Adds RP2040-specific FreeRTOS integration path and routes RP2040 warnings via per-source application. |
| examples/host/msc_file_explorer/CMakeLists.txt | Moves fatfs warning suppression after family configuration. |
| examples/host/cdc_msc_hid_freertos/skip.txt | Removes RP2040 skip entry. |
| examples/device/midi_test_freertos/skip.txt | Removes RP2040 skip entry. |
| examples/device/hid_composite_freertos/skip.txt | Removes RP2040 skip entry. |
| examples/device/cdc_msc_freertos/src/msc_disk.c | Casts to address sign-conversion warning. |
| examples/device/cdc_msc_freertos/skip.txt | Removes RP2040 skip entry. |
| examples/device/audio_test_freertos/skip.txt | Removes RP2040 skip entry. |
| examples/device/audio_4_channel_mic_freertos/src/main.c | Cast change intended to address sign conversion (currently changes semantics). |
| examples/device/audio_4_channel_mic_freertos/skip.txt | Removes RP2040 skip entry. |
| .idea/cmake.xml | Enables a couple of IDE CMake profiles and adds new NRF54 profiles. |
Files not reviewed (1)
- .idea/cmake.xml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b55786e43a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
| target | .text | .rodata | .data | .bss | total | % diff |
|---|---|---|---|---|---|---|
| metro_m0_express/hid_composite_freertos | 13,696 → 13,932 (+236) | — | — | — | 13,696 → 13,932 (+236) | +1.7% |
| nutiny_sdk_nuc121/hid_composite_freertos | 14,688 → 14,940 (+252) | — | — | — | 14,696 → 14,948 (+252) | +1.7% |
| lpcxpresso11u37/hid_composite_freertos | 13,772 → 14,012 (+240) | — | — | — | 14,132 → 14,372 (+240) | +1.7% |
| nutiny_sdk_nuc120/hid_composite_freertos | 15,236 → 15,488 (+252) | — | — | — | 15,244 → 15,496 (+252) | +1.7% |
| metro_m0_express/audio_test_freertos | 15,104 → 15,352 (+248) | — | — | — | 15,104 → 15,352 (+248) | +1.6% |
| metro_m0_express/midi_test_freertos | 14,456 → 14,688 (+232) | — | — | — | 14,456 → 14,688 (+232) | +1.6% |
| nutiny_nuc126v/hid_composite_freertos | 14,704 → 14,940 (+236) | — | — | — | 14,712 → 14,948 (+236) | +1.6% |
| lpcxpresso11u37/midi_test_freertos | 14,596 → 14,832 (+236) | — | — | — | 14,956 → 15,192 (+236) | +1.6% |
| lpcxpresso51u68/hid_composite_freertos | 15,880 → 16,124 (+244) | — | — | — | 15,888 → 16,132 (+244) | +1.5% |
| lpcxpresso11u37/audio_test_freertos | 15,340 → 15,580 (+240) | — | — | — | 15,700 → 15,940 (+240) | +1.5% |
Size Difference ReportBecause TinyUSB code size varies by port and configuration, the metrics below represent the averaged totals across all example builds. Note: If there is no change, only one value is shown. Changes >1% in sizeNo entries. Changes <1% in size
No changes
|
Summary
https://github.com/raspberrypi/FreeRTOS-Kernel which provides proper SMP ports for both platforms
Changes
Pico SDK sync/time interop, and RP2350 Cortex-M33 port config
FreeRTOS_Kernel_import.cmake (auto-selects RP2040/RP2350/RISC-V port); add RP2040-specific warning handling in
family_configure_common()