Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds initial support for the Nordic nRF54H20 microcontroller to TinyUSB, primarily focusing on getting CMake builds working. The changes introduce a new MCU variant (OPT_MCU_NRF54) and update the Nordic nRF ecosystem to support the newer nRF54 series alongside the existing nRF5X series.
- Updates Nordic nRFx dependency to a newer version that supports nRF54H20
- Introduces nRF54H20 board configuration and USB driver integration using DWC2 controller
- Refactors Nordic board support to handle multiple MCU variants (nRF5X and nRF54) with improved build system organization
Reviewed Changes
Copilot reviewed 35 out of 49 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/get_deps.py | Updates nRFx dependency commit hash to newer version supporting nRF54 series |
| src/tusb_option.h | Adds new MCU option OPT_MCU_NRF54 for nRF54 series support |
| src/portable/synopsys/dwc2/dwc2_nrf.h | Adds NRF-specific DWC2 USB controller configuration |
| src/portable/synopsys/dwc2/dwc2_common.h | Integrates NRF DWC2 support into common DWC2 driver |
| src/common/tusb_mcu.h | Adds MCU configuration for nRF54 using DWC2 USB IP |
| hw/bsp/nrf/ | Extensive refactoring of Nordic BSP to support both nRF5X and nRF54 variants |
| hw/bsp/nrf/boards/nrf54h20dk/ | New board support files for nRF54H20 development kit |
| docs/ | Updates documentation to reflect new nRF54H20 board support and dependency changes |
Files not reviewed (5)
- .idea/debugServers/lpc1769.xml: Language not supported
- .idea/debugServers/lpc55s69.xml: Language not supported
- .idea/debugServers/nrf52833.xml: Language not supported
- .idea/debugServers/nrf5340.xml: Language not supported
- .idea/debugServers/stm32f411.xml: Language not supported
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ 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
| if (MCU_VARIANT STREQUAL nrf5340 OR MCU_VARIANT STREQUAL nrf54h20) | ||
| set(CMAKE_SYSTEM_CPU cortex-m33 CACHE INTERNAL "System Processor") | ||
| set(JLINK_DEVICE nrf5340_xxaa_app) | ||
| set(JLINK_DEVICE ${MCU_VARIANT}_xxaa_app) | ||
| else () | ||
| set(CMAKE_SYSTEM_CPU cortex-m4 CACHE INTERNAL "System Processor") | ||
| set(JLINK_DEVICE ${MCU_VARIANT}_xxaa) |
There was a problem hiding this comment.
Quote MCU variant checks in family.cmake
The new CMake logic compares MCU_VARIANT against literals without quoting them (if (MCU_VARIANT STREQUAL nrf5340 OR MCU_VARIANT STREQUAL nrf54h20)). In CMake an unquoted identifier is treated as a variable, so nrf5340 and nrf54h20 expand to empty strings. As a result the condition is always false and the cortex‑M33/JLink settings for nrf5340 and nrf54h20 are never applied; those boards will be built as cortex‑M4 with the generic startup files and linker scripts, which will fail to build or flash correctly. Surround the string literals with quotes so the variant‑specific configuration actually executes.
Useful? React with 👍 / 👎.
get cmake build with 54h20 not tested on actual hw, probably not running