Skip to content

r3-os/r3_port_rx

Repository files navigation

Prerequisites

  • rustup
  • rustc_codegen_gcc (experimental GCC codegen for rustc)
    • binutils configured with --target=rx-none-elf
    • A patched version of libgccjit, configured with --target rx-none-elf --enable-languages=c,jit --enable-host-shared --disable-werror --disable-multilib --disable-libssp
    • A custom fork of rustc_codegen_gcc for rx-none-elf target, built by ./build.sh --release-sysroot

Nix

Using Nix, you can start a shell with the prerequisites by the following command: nix shell github:yvt/nix-rustc_codegen_gcc#rx-embedded-gcc-rustenv nixpkgs#{pkgsCross.rx-embedded.buildPackages.binutils,rustup}. (note: You need Nix version 2.9 or later.)

The example programs can be built by cd examples/$name; rx-embedded-gcc-cargo build --release -Zbuild-std.