Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

risc-v/qemu-rv: Add Build Config for leds64_rust #75

Closed
wants to merge 1 commit into from

Conversation

lupyuen
Copy link

@lupyuen lupyuen commented Aug 7, 2024

Summary

This PR adds a new Build Config rv-virt:leds64_rust that builds the Rust App leds_rust for QEMU RISC-V 64-bit. The build requires the Rust Target riscv64gc-unknown-none-elf:

rustup target add riscv64gc-unknown-none-elf

New Files

boards/risc-v/qemu-rv/rv-virt/configs/leds64_rust/defconfig: Add new Build Config rv-virt:leds64_rust

Updated Docs

applications/examples/leds_rust/index.rst: Add leds_rust example app

platforms/risc-v/qemu-rv/boards/rv-virt/index.rst: Add rv-virt:leds64_rust config

Impact

No impact on existing code, since rv-virt:leds64_rust is unused by the current code.

leds_rust will be compiled for every run of NuttX CI. This will validate whether Rust Apps are built correctly for QEMU RISC-V 64-bit. We have added the Rust Target riscv64gc-unknown-none-elf to the Docker Image for NuttX CI: apache#12858

Testing

We tested the leds_rust example app on rv-virt:leds64_rust (QEMU RISC-V 64-bit): Test Log

$ tools/configure.sh rv-virt:leds64_rust
...
NuttShell (NSH) NuttX-12.4.0
nsh> uname -a
NuttX 12.4.0 e0432cfc75b Aug  8 2024 08:57:51 risc-v rv-virt

nsh> leds_rust
Hello, Rust!!
Opening /dev/userleds
Set LED 1 to 1
board_userled: LED 1 set to 1
board_userled: LED 2 set to 0
board_userled: LED 3 set to 0
Sleeping...
Set LED 1 to 0
board_userled: LED 1 set to 0
board_userled: LED 2 set to 0
board_userled: LED 3 set to 0

We also tested rv-virt:leds64_rust on the Docker Image for NuttX CI: apache#12858

@lupyuen lupyuen changed the title safer-rust-blinky10 risc-v/qemu-rv: Add Build Config for leds64_rust Aug 8, 2024
This PR adds a new Build Config `rv-virt:leds64_rust` that builds the Rust App `leds_rust` for QEMU RISC-V 64-bit. The build requires the [Rust Target `riscv64gc-unknown-none-elf`](apache#12858):

```bash
rustup target add riscv64gc-unknown-none-elf
```

New Files:

`boards/risc-v/qemu-rv/rv-virt/configs/leds64_rust/defconfig`: Add new Build Config `rv-virt:leds64_rust`

Updated Docs:

`applications/examples/leds_rust/index.rst`: Add `leds_rust` example app

`platforms/risc-v/qemu-rv/boards/rv-virt/index.rst`: Add `rv-virt:leds64_rust` config
@lupyuen lupyuen force-pushed the safer-rust-blinky10 branch from 7534091 to e0432cf Compare August 8, 2024 00:55
@lupyuen lupyuen closed this Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant