Hi, I have been trying to create my own machine and execute a hello_world on QEMU-4.2.0. I created mymachine.c in hw/arm and have my hello_world.c, mymachine.ld and startup_ARMCM3.S in qemu-4.2.0/proj.
So, firstly after adding mymachine.c in hw/arm I did "make" in the build directory and it generated mymachine.o file and "LINK qemu-system-arm". I'm using gcc-q2-2017-update for compiling and qemu to print "hello world" on the terminal. The commands are as follows: gcc-arm-none-eabi-6-2017-q2-update/bin/arm-none-eabi-gcc hello_world.c startup_ARMCM3.S -mthumb -mcpu=cortex-m3 -D__STARTUP_CLEAR_BSS -D__START=main -Os -flto -ffunction-sections -fdata-sections --specs=nano.specs --specs=rdimon.specs -Wl,--gc-sections -Wl,-Map=main.map -T mymachine.ld -o main.axf qemu command: qemu-4.2.0/build/arm-softmmu/qemu-system-arm -M mymachine -cpu cortex-m3 -kernel main.axf -monitor none -serial stdio -semihosting -nographic The output I'm getting is (printf() statements from the hw/arm/mymachine.c): I'm Here05 I end here I'm Here my_hw_init my_hw_init step1 step2 step3 step4 step5 step6 qemu-system-arm: terminating on signal 2 (obviously killing it to exit). Thanks in advance. Thank you, Abhijeet
hello_world.c
Description: Binary data
mymachine.c
Description: Binary data
mymachine.ld
Description: Binary data
Startup_ARMCM3.S
Description: Binary data