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
Hello example in Nuttx kernel build #21
Comments
Hi: Thank you so much for your sponsorship, it really means a lot to me :-) May I know which operation failed for NuttX on QEMU? A screenshot or log capture would be helpful too. Thanks! |
Ah OK, this happens because the
Lemme know if it works. Thanks :-) |
Hi: Could you confirm that these are the steps we ran: mkdir nuttx
cd nuttx
git clone https://github.com/apache/nuttx nuttx
git clone https://github.com/apache/nuttx-apps apps
cd nuttx
tools/configure.sh rv-virt:nsh64
grep HELLO= .config
## Shows: CONFIG_EXAMPLES_HELLO=m
make menuconfig
## Browse to `Application Configuration > Examples > "Hello World" Example`
## Press Space to select, until "M" turns to "*"
## Save and Exit
grep HELLO= .config
## Shows: CONFIG_EXAMPLES_HELLO=y
make
qemu-system-riscv64 \
-semihosting \
-M virt,aclint=on \
-cpu rv64 \
-smp 8 \
-bios none \
-kernel nuttx \
-nographic When I run this with the latest version of NuttX, the
|
This method can work. Thank you a lot. |
Ah yes NuttX Kernel Mode requires a few more steps, as explained here: https://nuttx.apache.org/docs/latest/platforms/risc-v/qemu-rv/boards/rv-virt/index.html NuttX Kernel Mode uses Semihosting to access the apps, so we need to build the NuttX Apps Filesystem: https://lupyuen.github.io/articles/semihost#nuttx-calls-semihosting Here are the steps I tested: mkdir nuttx
cd nuttx
git clone https://github.com/apache/nuttx nuttx
git clone https://github.com/apache/nuttx-apps apps
cd nuttx
## Configure NuttX for QEMU Kernel Mode
tools/configure.sh rv-virt:knsh64
grep HELLO= .config
## Shows: CONFIG_EXAMPLES_HELLO=m
## This is OK for Kernel Mode
## Build the NuttX Kernel
make
## Build the NuttX Apps Filesystem
make V=1 -j7
make export V=1
cd ../apps
./tools/mkimport.sh -z -x ../nuttx/nuttx-export-*.tar.gz
make import V=1
cd ../nuttx
## Start NuttX in QEMU
## (Uses Semihosting to access the NuttX Apps Filesystem)
qemu-system-riscv64 \
-semihosting \
-M virt,aclint=on \
-cpu rv64 \
-smp 8 \
-bios none \
-kernel nuttx \
-nographic And the
The
|
This is I need!!!! |
Cool! Lemme know if you have any questions :-) |
First I want to thanks your articles, they help me to start up this project a lot and it's really excellent.
Currently, I read this article and build Nuttx for RISC-V successfully.
But there is a little problem, when I run Nuttx with Qemu, it should can run hello example but this operation failed.
The text was updated successfully, but these errors were encountered: