feat: riscv-virt-rt 0.1.0 — board support for QEMU's RISC-V virt machine - #219
Merged
Conversation
The first bare-metal package in this index. With it, a firmware project is an
ordinary mcpp project:
mcpp add riscv-virt-rt@0.1.0
mcpp build --target riscv64-none-elf # + .bin, .map, a size summary
mcpp run --target riscv64-none-elf # boots in qemu
mcpp test --target riscv64-none-elf
and its manifest names no linker script, load address, libc, -nostdlib or
emulator — there is no [target.*] section at all. Verified end to end against
this tree as a path index: added, downloaded, built and booted, printing from
the firmware.
Two descriptor choices are load-bearing, both measured rather than assumed:
* Form A (`mcpp = "*/mcpp.toml"`), because the package ships a build.mcpp and
mcpp looks for that at the package ROOT. Form B leaves the root at the
extract dir and absorbs the tarball's wrap layer inside each source glob,
which would leave build.mcpp one level down and unfound — the package would
resolve and compile, then link against nothing.
* `deps` at the xpm PLATFORM level, carrying xim:picolibc-riscv and
xim:qemu-riscv. mcpp materializes `[xlings] deps` for the ROOT project only,
so the package's own declaration does not reach a consumer. Verified by
removing picolibc from the store: `mcpp add` + `mcpp build` reinstalled it
and linked; without this edge the build stops at build.mcpp saying the
sysroot is declared but not installed.
Requires mcpp >= 2026.8.19.2 (build.mcpp calls `mcpp::runner`). No workspace
member under tests/examples/: those run on all three platforms with no
capability gate, and this one needs an emulator and a target sysroot. The
package's own repo CI installs both and boots rv64 and rv32 on every push.
0.2.0 adds templates/blinky, so `mcpp new <name> --template riscv-virt-rt` produces a firmware project that builds, boots and tests unmodified. The template ships with the package rather than with mcpp, whose builtin registry is frozen at `bin`; `mcpp new` writes the dependency line at the version it resolved, so the two cannot drift. 0.1.0 stays listed: a version that has been published is a version someone may have pinned.
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.
The first bare-metal package in this index. With it, a firmware project is an
ordinary mcpp project:
and its manifest names no linker script, load address, libc, -nostdlib or
emulator — there is no [target.*] section at all. Verified end to end against
this tree as a path index: added, downloaded, built and booted, printing from
the firmware.
Two descriptor choices are load-bearing, both measured rather than assumed:
Form A (
mcpp = "*/mcpp.toml"), because the package ships a build.mcpp andmcpp looks for that at the package ROOT. Form B leaves the root at the
extract dir and absorbs the tarball's wrap layer inside each source glob,
which would leave build.mcpp one level down and unfound — the package would
resolve and compile, then link against nothing.
depsat the xpm PLATFORM level, carrying xim:picolibc-riscv andxim:qemu-riscv. mcpp materializes
[xlings] depsfor the ROOT project only,so the package's own declaration does not reach a consumer. Verified by
removing picolibc from the store:
mcpp add+mcpp buildreinstalled itand linked; without this edge the build stops at build.mcpp saying the
sysroot is declared but not installed.
Requires mcpp >= 2026.8.19.2 (build.mcpp calls
mcpp::runner). No workspacemember under tests/examples/: those run on all three platforms with no
capability gate, and this one needs an emulator and a target sysroot. The
package's own repo CI installs both and boots rv64 and rv32 on every push.