Hi PlatformIO team,
I’d like to submit a new development platform for inclusion in the registry.
Platform
-
Name:
stc8 -
Repository: GitHub - thevien257/platform-stc8: PlatformIO platform for STC microcontrollers · GitHub
-
License: Apache 2.0
-
Latest release: v1.0.0
What it is
STC’s STC8 family of 8051 microcontrollers (e.g. STC8H8K64U-USB) ship with a built-in rv51 RISC-V soft-core. User C/C++ is compiled with riscv64-unknown-elf-gcc and runs on the rv51 pipeline; native 8051 ISRs handle USB CDC, timers and GPIO via ecall. This makes it the only 8051 part with practical, modern C++ support.
The build pipeline reuses the official Arduino-STC8 core’s tools/wrapper/sdcc.py wrapper, so behaviour is identical to the Arduino IDE flow.
Currently supported
-
Boards:
stc8h8k64u(STC8H8K64U-USB, 64 KB Flash, 8 KB XRAM, USB-HID bootloader) -
Frameworks:
arduino(viathevien257/STC_Arduino_Coreon GitHub) -
Host OS: Windows x86_64 (Linux/macOS toolchain packages planned)
Checklist
-
Public Git repo with Apache-2.0 license
-
platform.jsonwith all required fields (name, version, frameworks, packages) -
Hosted package tarballs (framework + toolchain) on GitHub Releases — no
file://paths -
Working
examples/directory:arduino-blinkandarduino-multi-sensor -
GitHub Actions CI building both examples on every push (see Actions tab in the repo)
-
README with quick-start, supported boards, clock-speed table, hardware notes
-
77 of 80 popular Arduino libraries from the PIO Registry verified compatible (see
tools/library_test_results.txtin the repo) -
No proprietary blobs — toolchain is upstream RISC-V GCC 13.4.0; rv51 interpreter source is in the Arduino core repo
Verification
pio platform install https://github.com/thevien257/platform-stc8.git
[env:stc8h8k64u]
platform = https://github.com/thevien257/platform-stc8.git
board = stc8h8k64u
framework = arduino
Builds the blink example to 13075 bytes (5975 B rv51 interpreter + 7100 B user app) and flashes via the STC USB-HID bootloader.
Known incompatible libraries
-
fastled/FastLED— AVR-onlystatic_assertinbitset.h -
ncmreynolds/ld2410— needs FreeRTOS (pdMS_TO_TICKS,vTaskDelay) -
felias-fogg/SoftI2CMaster— hard#error "Not an AVR MCU!"from upstream
These are upstream-author choices, not platform bugs.
Happy to address any feedback. Thanks!