Skip to content

ameba: Add minimal port for Realtek Ameba RTOS SoCs.#19394

Open
wangbaizhe wants to merge 2 commits into
micropython:masterfrom
wangbaizhe:ports-ameba-minimal
Open

ameba: Add minimal port for Realtek Ameba RTOS SoCs.#19394
wangbaizhe wants to merge 2 commits into
micropython:masterfrom
wangbaizhe:ports-ameba-minimal

Conversation

@wangbaizhe

Copy link
Copy Markdown

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.

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

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.51%. Comparing base (552fd21) to head (b49eed2).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown

Code size report:

Reference:  py/mpstate: Move mp_verbose_flag to MP_STATE_VM struct. [552fd21]
Comparison: ci: Add build CI for ports/ameba. [merge of b49eed2]
  mpy-cross:    +0 +0.000% 
   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
      esp32:    +0 +0.000% ESP32_GENERIC
     mimxrt:    +0 +0.000% TEENSY40
        rp2:    +0 +0.000% RPI_PICO_W
       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS
  qemu rv32:    +0 +0.000% VIRT_RV32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant