ameba: Add minimal port for Realtek Ameba RTOS SoCs.#19394
Open
wangbaizhe wants to merge 2 commits into
Open
Conversation
This adds a new port targeting the Realtek Ameba family of microcontrollers, which use the Realtek ameba-rtos SDK and run MicroPython as a FreeRTOS task. The initial port is intentionally minimal, following the guidance in https://github.com/orgs/micropython/discussions/19332: it brings up the interpreter, provides a REPL over the LOGUART serial port, and defines one board (PKE8721DAF, based on the RTL8721DAF / AmebaDplus SoC). Features deferred to follow-up PRs: filesystem, machine module (GPIO etc.), network/socket (Wi-Fi), OTA update, and threading. Tested on PKE8721DAF with LOGUART at 115200 baud. Signed-off-by: Penn Wang <penn_wang@realsil.com.cn>
Add a GitHub Actions workflow (ports_ameba.yml) and the corresponding ci_ameba_setup / ci_ameba_build functions in tools/ci.sh to build the new ameba port in CI. The setup step clones the ameba-rtos SDK at a pinned commit and runs env.sh which downloads the Realtek prebuilt GCC toolchain; the toolchain directory is cached between runs to reduce CI time. Also add "ameba" to the codespell ignore-words-list in pyproject.toml, as "ameba" is the name of the Realtek platform and is not a misspelling of "amoebae". Signed-off-by: Penn Wang <penn_wang@realsil.com.cn>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #19394 +/- ##
=======================================
Coverage 98.51% 98.51%
=======================================
Files 177 177
Lines 22927 22927
=======================================
Hits 22586 22586
Misses 341 341 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Code size report: |
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
This adds a new, intentionally minimal port for the Realtek Ameba family of microcontrollers, which
run on the Realtek ameba-rtos SDK with MicroPython as a FreeRTOS task. Following the guidance in
https://github.com/orgs/micropython/discussions/19332, this first PR just brings up the interpreter
and a REPL over the LOGUART serial port, and defines one board (PKE8721DAF, based on the RTL8721DAF /
AmebaDplus SoC).
Filesystem, the machine module, network/socket (Wi-Fi), OTA update and threading are all deferred to
follow-up PRs to keep this initial port small and reviewable.
CI builds the port against a pinned ameba-rtos SDK revision; the Realtek prebuilt GCC toolchain is
downloaded by the SDK's env.sh and cached between runs.
Testing
Built in CI for the PKE8721DAF board. Flashed and tested on real PKE8721DAF hardware - the REPL comes
up over LOGUART at 115200 baud and runs interactively. No other Ameba boards were available to test.
Generative AI
I used generative AI tools when creating this PR, but a human has checked the code and is responsible
for the code and the description above.