After cloning nuttx and nuttx-apps repositories:

$ cd nuttxspace/nuttx
$ ./tools/configure.sh rv-virt:nsh64
$ make -j

/* Lets see its size */

$ ls -l nuttx
-rwxrwxr-x 1 alan alan 3019360 mai 16 12:19 nuttx

$ riscv64-unknown-elf-size nuttx
   text	   data	    bss	    dec	    hex	filename
 164688	    677	   8544	 173909	  2a755	nuttx

Time to run it!

$ qemu-system-riscv64 -semihosting -M virt,aclint=on -cpu rv64 -smp 8 -bios none -kernel nuttx -nographic

NuttShell (NSH) NuttX-12.1.0
nsh> uname -a
NuttX 12.1.0 76ece3cf8d May 16 2023 12:19:28 risc-v rv-virt
nsh>