Skip to content

Instantly share code, notes, and snippets.

@lupyuen
Created May 3, 2024 23:18
Show Gist options
  • Save lupyuen/7403b78ae9b1a1cf411cfe39235efe49 to your computer and use it in GitHub Desktop.
Save lupyuen/7403b78ae9b1a1cf411cfe39235efe49 to your computer and use it in GitHub Desktop.
Rust Apps for Apache NuttX RTOS: Run on QEMU RISC-V 64-bit. See https://github.com/lupyuen/nuttx-rust-app
$ qemu-system-riscv64 -semihosting -M virt,aclint=on -cpu rv64 -smp 8 -bios none -kernel nuttx -nographic
ABCnx_start: Entry
uart_register: Registering /dev/console
uart_register: Registering /dev/ttyS0
nx_start_application: Starting init thread
task_spawn: name=nsh_main entry=0x8000745c file_actions=0 attr=0x8003d798 argv=0x8003d790
nxtask_activate: nsh_main pid=1,TCB=0x8003e820
NuttShell (NSH) NuttX-12.4.0-RC0
nsh> nx_start: CPU0: Beginning Idle Loop
nsh> hello_rust
posix_spawn: pid=0x8003f734 path=hello_rust file_actions=0x8003f738 attr=0x8003f740 argv=0x8003f838
nxposix_spawn_exec: ERROR: exec failed: 2
task_spawn: name=hello_rust entry=0x80018622 file_actions=0x8003f738 attr=0x8003f740 argv=0x8003f840
spawn_execattrs: Setting policy=2 priority=100 for pid=2
nxtask_activate: hello_rust pid=2,TCB=0x8003fda0
Hello, Rust!!
abcd
You entered...
abcd
nxtask_exit: hello_rust pid=2,TCB=0x8003fda0
nsh>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment