arch/arm: add Realtek RTL8721Dx and RTL8720F (Ameba IOT) support#19236
Merged
Conversation
Contributor
|
@raulcxw nice contribution! Kudos!! Please fix this CI issue: Please remove reference to this .venv python |
acassis
previously approved these changes
Jun 29, 2026
linguini1
reviewed
Jun 29, 2026
b267f29 to
3b22294
Compare
xiaoxiang781216
previously approved these changes
Jun 30, 2026
acassis
previously approved these changes
Jun 30, 2026
Contributor
|
@raulcxw please fix this issue: |
acassis
reviewed
Jun 30, 2026
Donny9
previously approved these changes
Jul 1, 2026
Add the ARM architecture-level support and build system for the Realtek
Ameba WHC (Wi-Fi Host Controller) dual-core SoCs:
- RTL8721Dx (KM4 Cortex-M33 host + KM0 NP)
- RTL8720F (KM4TZ Cortex-M33 secure host + KM4NS NP)
New directories under arch/arm/src/:
- common/ameba/ -- IC-agnostic glue (os_wrapper, netdev, KV store,
flash MTD, WHC Wi-Fi, SDK bootstrap)
- rtl8721dx/ -- RTL8721Dx register-level drivers
- rtl8720f/ -- RTL8720F register-level drivers
New directories under arch/arm/include/:
- rtl8721dx/ -- RTL8721Dx IRQ and chip headers
- rtl8720f/ -- RTL8720F IRQ and chip headers
Also includes tools/nxstyle.c white-list entries for the Realtek SDK
CamelCase symbols and tools/ameba/Config.mk for the make flash target.
Signed-off-by: raul_chen <raul_chen@realsil.com.cn>
Add board-level support for two Realtek Ameba WHC evaluation boards:
- pke8721daf (RTL8721Dx)
- rtl8720f_evb (RTL8720F)
Each board provides:
- defconfig for NSH with WiFi networking support
- CMakeLists.txt (make-only build helper that fails fast on cmake)
- Board-specific bring-up and initialization (leds, SDIO, flash)
- Scripts/Make.defs including the IC-level build fragment and the
make flash target (tools/ameba/Config.mk)
Signed-off-by: raul_chen <raul_chen@realsil.com.cn>
Add the chip-level and board-level documentation for both Ameba WHC SoCs and their evaluation boards. Each board document follows the board.rst template with tags, features, configurations, building and flashing instructions, and license exceptions. Signed-off-by: raul_chen <raul_chen@realsil.com.cn>
xiaoxiang781216
approved these changes
Jul 1, 2026
acassis
approved these changes
Jul 1, 2026
Contributor
|
OK, I will merge since the reported error: is not related to this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add NuttX support for two Realtek Ameba dual-core WHC (WiFi Host
Controller) SoCs and their evaluation boards:
pke8721dafrtl8720f_evbOn these parts NuttX runs on the application (AP) core; the WiFi
MAC/PHY firmware runs on the network (NP) core, and the two cores talk
over the vendor IPC. The host WiFi stack is driven through a WHC glue layer.
What this PR adds:
arch/arm/src/rtl8721dx/andarch/arm/src/rtl8720f/chip support, plus ashared
arch/arm/src/common/ameba/layer (IPC, WHC WiFi host glue, flashMTD, LOGUART console, SDK fetch/build tooling).
boards/arm/rtl8721dx/pke8721daf/andboards/arm/rtl8720f/rtl8720f_evb/with an
nshdefconfig each.Documentation/platforms/arm/.Working features (both boards): NSH over LOGUART, WiFi STA scan + connect,
WiFi SoftAP, littlefs on the on-chip flash (MTD), and AP↔NP IPC.
How the dual-core / vendor-SDK integration works
pinned commit of the public
ameba-rtosSDK (shallow clone) intoarch/arm/src/common/ameba/, provisions its toolchain/venv, and compiles theneeded register-layer (fwlib) and WHC glue sources from SDK source into
per-board archives. The SDK tree is kept pristine (zero patches) — it
natively supports the single-core / boot build entry points we use.
arch/arm/src/<chip>/ameba_app_start.cis aNuttX-licensed adaptation of the SDK
app_start()that performs theOS-independent silicon init and then calls NuttX
main(). No SDK source fileis modified.
disassembly so the SDK's "noused" WiFi-API generator keeps exactly the host
APIs NuttX references (avoids an NP deadlock). This guarantees the two cores
never drift.
prebuilt/staging dir;the SDK kconfig snapshots the packaging step needs are regenerated from the
pinned SDK on every build (never committed).
Impact
arch/arm/src/...and
boards/arm/...; the only edits to existing files are the additiveregistration entries in
arch/arm/Kconfigandboards/Kconfig. No existingboard or architecture is affected.
makeonly. The boardCMakeLists.txtintentionally emitsa clear "CMake build not yet supported"
FATAL_ERRORfor these boards.Testing
Built and run on real hardware for both boards.
Build (host: Ubuntu,
arm-none-eabifrom the SDK-provisioned toolchain):The same configs are built in CI on a clean container using the official
apache-nuttx-ci-linuximage (fresh SDK fetch from the pinned commit), and theresulting firmware was flashed and verified on hardware:
wapi/iwconfigWiFi scan and connect to a WPA2 AP; DHCP lease andping over the air.
reboot).
Notes for reviewers
binary blobs in the tree, and
prebuilt/is git-ignored.(e.g.
Img2EntryFun0,SYSTIMER_Init) referenced from the adaptation files.These are the SDK's public API spellings and cannot be renamed.
lib_rom.awith--whole-archive(its ROM symbolsmust all be present); this is required by the silicon's ROM layout.
not part of this PR.