RTEMS support - #2392
Draft
petermm wants to merge 9 commits into
Draft
Conversation
Cross-compile AtomVM as an RTEMS application, embed a host-packed
AVM, and boot on SIS. This is the first non-Unix RTOS target besides
the MCU ports, so applications cannot load .avm files from disk.
Keep SMP, JIT, and sockets off until a later BSP has libbsd. CI
caches the sparc/erc32 toolchain and checks {atomvm_rtems_boot,rtems}.
Signed-off-by: Peter M <petermm@gmail.com>
Keep a single RTEMS platform and add the arm/imx7 BSP as a second bring-up target. QEMU -kernel of an ELF leaves r2=0, so the helper raw-loads a patched Linux imx7d-sdb DTB and sets the U-Boot FDT pointer via gdb. CI builds both erc32 and imx7. The imx7 DTB is compiled from a sparse checkout of Linux v6.1, including include/uapi/linux for linux-event-codes.h, avoiding unsupported armhf apt indexes on Noble amd64 runners. Signed-off-by: Peter M <petermm@gmail.com>
petermm
force-pushed
the
rtems
branch
4 times, most recently
from
September 5, 2026 12:15
b0a1d11 to
cef0e0f
Compare
Implement the RTEMS peripheral HAL modules and native NIF collections. Wire them into the platform build and atomvmlib archive, document the supported i.MX7 and erc32 behavior, and exercise NIF registration during boot tests. Signed-off-by: Peter M <petermm@gmail.com>
Link rtems-libbsd on arm/imx7, initialize ffec0 with DHCP, and enable BSD socket NIFs with poll-based select. CI covers DHCP, DNS, TCP, a guest echo server, hostfwd on port 8080, and erc32 enotsup. Signed-off-by: Peter M <petermm@gmail.com>
Signed-off-by: Peter M <petermm@gmail.com>
Signed-off-by: Peter M <petermm@gmail.com>
Add a GRiSP 2 board profile using the existing RTEMS 6.2 arm/imx7 BSP and LibBSD toolchain. Package a bootloader-ready image with a validated device tree, pinned DTB sources and hardware smoke tests. Load app.avm from the SD card's FAT partition at boot so applications can be replaced without rebuilding the firmware. Bound file size and discovery time, validate AVM/BEAM container bounds, and fall back to the embedded application when the replacement cannot be loaded. Keep runtime failures visible and use capability names for shared storage and driver code. Complete atom/module table and import teardown, including partially built modules, so failed startup releases memory before fallback. Check failed NIF lookups before accessing their descriptors. Extend the existing imx7 CI job with board artifacts and host regression tests. Document image installation, application replacement and DTB rebuilds. Validation: - Native core tests and the full Erlang test suite passed. - Loader and 256 KiB fallback tests passed under ASan/UBSan; fallback was checked with SMP on and off and detects the original teardown leak. - Native boot, image packaging, DTB override and workflow lint checks passed. - Full RTEMS cross-build and physical board validation remain pending. Signed-off-by: Peter M <petermm@gmail.com>
Upload a commit-qualified ZIP with boot files at its top level and name the debug executable with an .elf extension. Include the barebox boot entry needed to discover the image and device tree, source/build links, and the device-tree sources and license notices. Document SD installation, serial verification, replacing app.avm, and installing the earlier CI artifact layout. Include the guide in the ZIP. Validation: exercised the workflow packaging step against firmware from CI run 33965512962; checked binary identity, U-Boot checksums, boot-entry paths and ZIP integrity. Actionlint, REUSE lint (1510 files), and git diff --check pass. Physical board boot remains unverified. Signed-off-by: Peter M <petermm@gmail.com>
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.
These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).
SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later