Update BSP#3550
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the BSP and dependency plumbing to add CH32F20X MCU family support, refactor/modernize the Renesas RX BSP (including CMake support and additional flash tooling), and migrate/rename Kinetis K32L support to use updated NXP mcux-devices sources.
Changes:
- Add CH32F20X family CMake support, update example skip lists accordingly, and adjust WCH build configuration for USBHS.
- Refactor Renesas RX BSP by introducing a shared
family.c/family.cmake, consolidating board responsibilities, and adding an RFP flashing target. - Update dependency fetching/docs/CI to reflect the Kinetis K32L migration (new NXP device repo, updated family naming).
Reviewed changes
Copilot reviewed 47 out of 47 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/get_deps.py | Updates dependency mapping to fetch K32L via mcuxsdk-core + mcux-devices-kinetis and adjusts CMSIS family lists. |
| test/hil/tinyusb.json | Reorders/relocates a HIL target entry (mimxrt1015_evk). |
| src/tusb_option.h | Removes Espressif vendor macros. |
| src/osal/osal_freertos.h | Switches Espressif detection to ESP_PLATFORM for spinlock handling. |
| src/common/tusb_verify.h | Switches Espressif detection to ESP_PLATFORM for RISC-V breakpoint handling. |
| hw/bsp/rx/family.mk | Adds shared RX family sources (rusb2_common.c, family.c). |
| hw/bsp/rx/family.cmake | Introduces RX family CMake build integration and flash helpers. |
| hw/bsp/rx/family.c | Adds shared RX board implementation (UART IRQ handling, USB IRQ forwarding, ticks, syscall stubs). |
| hw/bsp/rx/boards/rx65n_target/rx65n_target.c | Moves board init responsibilities toward shared family code; keeps board-specific pin/clock setup. |
| hw/bsp/rx/boards/rx65n_target/board.h | Adds board-specific macros for LED/button/UART/USB IRQ mapping and clocks. |
| hw/bsp/rx/boards/rx65n_target/board.cmake | Adds RX65N board CMake config and global interrupt-macro compile definitions. |
| hw/bsp/rx/boards/gr_citrus/hwinit.c | Removes redundant HardwareSetup implementation (moved into gr_citrus.c). |
| hw/bsp/rx/boards/gr_citrus/gr_citrus.c | Refactors to board-specific pin init + HardwareSetup only (shared logic moved to RX family). |
| hw/bsp/rx/boards/gr_citrus/board.h | Adds board-specific macros for LED/button/UART/USB and clocks. |
| hw/bsp/rx/boards/gr_citrus/board.cmake | Adds GR-CITRUS CMake board config. |
| hw/bsp/rx/FreeRTOSConfig/FreeRTOSConfig.h | Enables INCLUDE_xTaskGetCurrentTaskHandle. |
| hw/bsp/kinetis_k32l2/family.mk | Removes old K32L2 make-family definition (migration/rename in progress). |
| hw/bsp/kinetis_k32l2/family.c | Removes old K32L2 family implementation (migration/rename in progress). |
| hw/bsp/kinetis_k32l2/boards/kuiic/kuiic.ld | Removes old K32L2 Kuiic linker script. |
| hw/bsp/kinetis_k32l2/boards/kuiic/clock_config.h | Removes old K32L2 Kuiic clock config header. |
| hw/bsp/kinetis_k32l2/boards/kuiic/clock_config.c | Removes old K32L2 Kuiic clock config source. |
| hw/bsp/kinetis_k32l2/boards/kuiic/board.mk | Removes old K32L2 Kuiic make board config. |
| hw/bsp/kinetis_k32l2/boards/kuiic/board.h | Removes old K32L2 Kuiic board header. |
| hw/bsp/kinetis_k32l2/boards/kuiic/board.cmake | Removes old K32L2 Kuiic CMake board config. |
| hw/bsp/kinetis_k32l2/boards/frdm_k32l2b/clock_config.h | Removes old FRDM-K32L2B clock config header. |
| hw/bsp/kinetis_k32l2/boards/frdm_k32l2b/clock_config.c | Removes old FRDM-K32L2B clock config source. |
| hw/bsp/kinetis_k32l2/boards/frdm_k32l2b/board.mk | Removes old FRDM-K32L2B make board config. |
| hw/bsp/kinetis_k32l2/boards/frdm_k32l2b/board.h | Removes old FRDM-K32L2B board header. |
| hw/bsp/kinetis_k32l2/boards/frdm_k32l2b/board.cmake | Removes old FRDM-K32L2B CMake board config. |
| hw/bsp/kinetis_k32l2/boards/frdm_k32l2a4s/clock_config.h | Removes old FRDM-K32L2A4S clock config header. |
| hw/bsp/kinetis_k32l2/boards/frdm_k32l2a4s/clock_config.c | Removes old FRDM-K32L2A4S clock config source. |
| hw/bsp/kinetis_k32l2/boards/frdm_k32l2a4s/board.mk | Removes old FRDM-K32L2A4S make board config. |
| hw/bsp/kinetis_k32l2/boards/frdm_k32l2a4s/board.h | Removes old FRDM-K32L2A4S board header. |
| hw/bsp/kinetis_k32l2/boards/frdm_k32l2a4s/board.cmake | Removes old FRDM-K32L2A4S CMake board config. |
| hw/bsp/kinetis_k32l2/FreeRTOSConfig/FreeRTOSConfig.h | Removes old K32L2 FreeRTOSConfig. |
| hw/bsp/family_support.cmake | Adds family_flash_rfp() flashing target. |
| hw/bsp/ch32f20x/family.cmake | Switches CH32F20X family CMake to WCH SDK layout and USBHS driver; updates flashing to STLink. |
| hw/bsp/ch32f20x/boards/ch32f205r-r0/board.cmake | Adds a CH32F205R-R0 board CMake definition. |
| examples/host/cdc_msc_hid_freertos/skip.txt | Skips CH32F20X for this host FreeRTOS example. |
| examples/device/midi_test_freertos/skip.txt | Skips CH32F20X for this device FreeRTOS example. |
| examples/device/hid_composite_freertos/skip.txt | Skips CH32F20X for this device FreeRTOS example. |
| examples/device/cdc_msc_freertos/skip.txt | Skips CH32F20X for this device FreeRTOS example. |
| examples/device/audio_test_freertos/skip.txt | Skips CH32F20X for this device FreeRTOS example. |
| examples/device/audio_4_channel_mic_freertos/skip.txt | Skips CH32F20X for this device FreeRTOS example. |
| docs/reference/dependencies.rst | Updates the mcux-sdk “Required by” list to use kinetis_k32l naming. |
| docs/reference/boards.rst | Updates board family column from kinetis_k32l2 to kinetis_k32l. |
| .github/workflows/ci_set_matrix.py | Updates CI matrix family key from kinetis_k32l2 to kinetis_k32l. |
Comments suppressed due to low confidence (1)
hw/bsp/ch32f20x/family.cmake:76
- For GNU builds this family no longer uses
-nostartfiles, unlike other WCH families (e.g. ch32v20x/ch32v30x). This can pull in the toolchain's default startup objects in addition to the provided startup/vector code, potentially increasing size or causing init/entrypoint conflicts. Consider restoring-nostartfiles(or document why this family is intentionally different).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9eb6372b66
ℹ️ 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 |
|---|---|---|---|---|---|---|
| frdm_k32l2a4s/board_test | 6,820 → 7,468 (+648) | — | — | — | 6,820 → 7,476 (+656) | +9.6% |
| frdm_k32l2a4s/dfu_runtime | 10,096 → 10,724 (+628) | — | — | — | 10,096 → 10,732 (+636) | +6.3% |
| frdm_k32l2a4s/hid_generic_inout | 10,908 → 11,536 (+628) | — | — | — | 10,908 → 11,544 (+636) | +5.8% |
| frdm_k32l2a4s/hid_multiple_interface | 11,712 → 12,340 (+628) | — | — | — | 11,712 → 12,348 (+636) | +5.4% |
| frdm_k32l2a4s/hid_boot_interface | 11,724 → 12,352 (+628) | — | — | — | 11,724 → 12,360 (+636) | +5.4% |
| frdm_k32l2a4s/hid_composite | 11,900 → 12,528 (+628) | — | — | — | 11,900 → 12,536 (+636) | +5.3% |
| frdm_k32l2a4s/midi_test | 12,004 → 12,632 (+628) | — | — | — | 12,004 → 12,640 (+636) | +5.3% |
| frdm_k32l2a4s/msc_dual_lun | 12,496 → 13,124 (+628) | — | — | — | 12,496 → 13,132 (+636) | +5.1% |
| frdm_k32l2a4s/cdc_dual_ports | 12,924 → 13,552 (+628) | — | — | — | 12,924 → 13,560 (+636) | +4.9% |
| frdm_k32l2a4s/printer_to_cdc | 12,960 → 13,588 (+628) | — | — | — | 12,960 → 13,596 (+636) | +4.9% |
add cmake support for rx
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 size
Changes <1% in size
No changes
|
…interrupt definitions
Summary
kinetis_k32lto use the updatedmcux-devicesframework.