Hello
I’ve been working through the instructions in Nathaniel’s blog post, but I’m getting a failure with ‘make run’, as follows:
[ 1%] Built target kobj_types_h_target
[ 2%] Built target syscall_macros_h_target
[ 6%] Built target syscall_list_h_target
[ 8%] Built target driver_validation_h_target
[ 10%] Built target offsets
[ 11%] Built target offsets_h
[ 40%] Built target kernel
[ 42%] Built target app
[ 43%] Built target linker_script
[ 74%] Built target zephyr
[ 88%] Built target lib__libc__minimal
[ 90%] Built target drivers__serial
[ 93%] Built target zephyr_prebuilt
[ 94%] Built target linker_pass_final_script
[ 98%] Built target kernel_elf
[100%]
To exit from QEMU enter: 'CTRL+a, x'
[QEMU] CPU: riscv32
qemu-system-riscv32: -nographic: unsupported machine type
Use -machine help to list supported machines
make[3]: *** [zephyr/CMakeFiles/run.dir/build.make:60: zephyr/CMakeFiles/run] Error 1
make[2]: *** [CMakeFiles/Makefile2:382: zephyr/CMakeFiles/run.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:389: zephyr/CMakeFiles/run.dir/rule] Error 2
make: *** [Makefile:160: zephyr/CMakeFiles/run.dir/rule] Error 2
The QEMU command appears to be using ‘sifive’ as the machine name, which I guess explains the unsupported machine type. However, if I try and run QEMU by hand with any of the valid machine types I can’t get it to boot zephyr.elf. Using zephyr.elf with the -kernel option results in a ‘rom: requested regions overlap’ error.
The relevant command in zephyr/CMakeFiles/run.dir/build.make seems to be:
/opt/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/qemu-system-riscv32 -m 32
-nographic -machine sifive -pidfile qemu${QEMU_INSTANCE}.pid -serial ${if ${QEMU_PTY},
pty, ${if ${QEMU_PIPE}, pipe:${QEMU_PIPE}, mon:stdio}} -kernel
/home/mark/zephyr/samples/hello_world/build/zephyr/zephyr.elf
Any ideas welcome.
Thanks
Mark
(Also the ‘source zephyr_env.sh’ command needs to be ‘source zephyr-env.sh’ with a dash instead of an underscore).