nuttx/boards/risc-v/qemu-rv/rv-virt
Ville Juven c15b6701ce RISC-V: Implement option to run NuttX in supervisor mode (S-mode)
- Add config "ARCH_USE_S_MODE" which controls whether the kernel
  runs in M-mode or S-mode
- Add more MSTATUS and most of the SSTATUS register definitions
- Add more MIP flags for interrupt delegation
- Add handling of interrupts from S-mode
- Add handling of FPU from S-mode
- Add new context handling functions that are not dependent on the trap
  handlers / ecall

NOTE: S-mode requires a companion SW (SBI) which is not yet implemented,
      thus S-mode is not usable as is, yet.
2022-04-01 16:19:42 -03:00
..
configs boards: rv-virt: Fix stack corruption for rv64 configs 2022-03-25 12:26:12 +02:00
include arch/risc-v/qemu-rv: Support both rv32/rv64 core 2022-01-15 11:42:01 +08:00
scripts xtensa|risc-v: Make CXX exception and RTTI depend on Kconfig options 2022-03-30 11:19:29 +08:00
src RISC-V: Implement option to run NuttX in supervisor mode (S-mode) 2022-04-01 16:19:42 -03:00
Kconfig arch/risc-v/qemu-rv: Support both rv32/rv64 core 2022-01-15 11:42:01 +08:00
README.txt risc-v/qemu-rv: Supports SMP up to 8 cores 2022-02-18 13:25:01 +08:00

1. Download and install toolchain

  $ curl https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-ubuntu14.tar.gz

2. Build and install qemu

  $ git clone https://github.com/qemu/qemu
  $ cd qemu
  $ ./configure --target-list=riscv32-softmmu,riscv64-softmmu
  $ make
  $ sudo make install

3. Configure and build NuttX

  $ mkdir ./nuttx; cd ./nuttx
  $ git clone https://github.com/apache/incubator-nuttx.git
  $ git clone https://github.com/apache/incubator-nuttx-apps.git
  $ cd nuttx
  $ make distclean
  $ ./tools/configure.sh rv-virt:nsh
  $ make

4. Run the nuttx with qemu

  $ qemu-system-riscv32 -M virt -cpu rv32 -smp 8 -bios none -kernel nuttx -nographic

  or

  $ qemu-system-riscv64 -M virt -cpu rv64 -smp 8-bios none -kernel nuttx -nographic

5. TODO

  Support FPU
  Support RISC-V User mode
  Support Network