ArduLinux v0.2.0
This is the first release of ArduLinux v0.2.0 as its own project, picking up where portduino left off and now published to the PlatformIO registry as l5y/ardulinux.
ArduLinux implements the Arduino API as a Linux user-space library, so firmware written for embedded targets (nRF52, ESP32, AVR, …) builds and runs on Linux unmodified, talking to real hardware (GPIO via libgpiod, SPI via spidev, I2C via i2c-dev, Serial via POSIX fds) or fully simulated devices for CI and development.
What's different from portduino
ArduLinux is a clean-room continuation, not a fork:
- No vendored dependencies. ArduinoCore-API and WiFi are tracked as upstream git submodules, not copied or patched into the tree.
- Self-contained PlatformIO platform. Ships its own
platform.json, boards, and SCons builder, and provides thearduinoframework inline, no separate platform-native dependency or private package mirror required. - Smaller surface area. Dead code, unused board variants, and IDE project files removed.
Highlights
- Use it in one block of
platformio.ini:[env:ardulinux] platform = git+https://github.com/l5yth/ardulinux.git framework = arduino board = ardulinux - Real or simulated, automatically. Hardware GPIO/I2C compile in when libgpiod is detected; otherwise you get simulated devices, same code, no flags.
printf()on every Print/Stream. Serial, File, etc. gain aprintf()on top ofprint()/println().- Bind real pins at startup via an optional
ardulinuxSetup()hook (e.g.gpioBind(new LinuxGPIOPin(7, "gpiochip0", "PIN_7"))). - Proper CLI + identity. Built apps accept
--fsdir,--erase,--version,--help; programs customize their name/version/description/bug-address via four optional weak symbols, no header needed. - XDG-compliant virtual filesystem, rooted at $
XDG_DATA_HOME/<app>/default. - Tested. Catch2 unit suite run under ctest, with CI covering
libgpiod-enabled, simulated, and coverage builds.
Install / build
git clone --recurse-submodules https://github.com/l5yth/ardulinux.git
cmake -B build && cmake --build build
./build/ArduLinux --help
Full build, hardware, and test instructions are in the README (https://github.com/l5yth/ardulinux/blob/main/README.md).
What's Changed
- clean up old portduino references by @l5yth in #1
- Address code review issues by @l5yth in #2
- Add CI build workflow by @l5yth in #3
- Bump actions/cache from 4 to 5 by @dependabot[bot] in #4
- Bump actions/checkout from 4 to 6 by @dependabot[bot] in #5
- Bump codecov/codecov-action from 4 to 5 by @dependabot[bot] in #6
- Fix package.json license identifier and add PlatformIO registry fields by @l5yth in #7
- add platform wiring to omit native by @l5yth in #8
- Add printf to Serial, File and fix framework CPPPATH by @l5yth in #11
- Add documentation by @l5yth in #16
- Add unit tests by @l5yth in #17
- Implement XDG Base Dir Spec by @l5yth in #18
- Implement custom app name and desc by @l5yth in #19
- Implement --version flag and app version weak symbol by @l5yth in #20
- Add ardulinuxAppBugAddress weak symbol by @l5yth in #21
- Update API submodule to 1.2.0 upstream by @l5yth in #22
- allow builder to set progname by @l5yth in #23
- Bump codecov/codecov-action from 5 to 6 by @dependabot[bot] in #24
- Bump ArduinoCore-API submodule to 1.5.2 by @l5yth in #25
- Harden the Print.h printf shadow by @l5yth in #26
- Default LinuxHardwareI2C fd to -1 (fix Wire-on-stdin hang) by @l5yth in #27
- Add keywords and authors to platform.json by @l5yth in #28
- Docs: fix fresh-clone build, document tests, CLI flags, and app identity by @l5yth in #29
New Contributors
- @l5yth made their first contribution in #1
- @dependabot[bot] made their first contribution in #4
Full Changelog: https://github.com/l5yth/ardulinux/commits/v0.2.0