Step 5 : Test NuttX: Single Core with “Hello, World” program
In this program, you are going to learn
How to ?
Topics in this section,
Start QEMU (Single Core) with NuttX
$ qemu-system-aarch64 \
-cpu cortex-a53 \
-nographic \
-machine virt,virtualization=on,gic-version=3 \
-net none \
-chardev stdio,id=con,mux=on \
-serial chardev:con \
-mon chardev=con,mode=readline \
-kernel ./nuttx
QEMU shows this…
- Ready to Boot Primary CPU
- Boot from EL2
- Boot from EL1
- Boot to C runtime for OS Initialize
NuttShell (NSH) NuttX-12.5.0-RC0
nsh>
nsh>
Welcome to NuttX Land! You have entered the NuttX RTOS
Enter “help” or “?” to see the NuttX Commands:
nsh> help
help usage: help [-v] [<cmd>]
. cp exit mkdir rmdir umount
[ cmp expr mkrd set unset
? dirname false mount sleep uptime
alias dd fdinfo mv source usleep
unalias df free pidof test xd
basename dmesg help printf time
break echo hexdump ps true
cat env kill pwd truncate
cd exec ls rm uname
Builtin Apps:
getprime hello nsh ostest sh
Enter the following command to be really sure that we’re emulating Arm64 :
nsh> uname -a
NuttX 12.5.0-RC0 446e0280b0 Apr 2 2024 18:22:30 arm64 qemu-armv8a
List the contents using same linux command “ls” as NuttX is POSIX Compliant :
nsh> ls
/:
dev/
proc/
Run “hello” to check whether hello program is running or not :
nsh> hello
Hello, World!!