Blank screen for hello world qemu-4.2.0
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
Re: Blank screen for hello world qemu-4.2.0
On Thu, 22 Jul 2021 at 13:57, abhijeet inamdar wrote: > 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. QEMU 4.2 is pretty old, I'm not sure if anybody's going to be very interested in debugging changes to that old a version... Generally if you're making changes to QEMU like adding a new machine you should work with the head-of-git or at least the most recent version. -- PMM
Re: Blank screen for hello world qemu-4.2.0
Hi, I downloaded the qemu-6.0.0. When I did ./configure inside qemu-6.0.0 directory it say ERROR: Cannot find ninja wherein I did install pip3 install Ninja. What should I do? Thank you, Abhijeet. On Thu, Jul 22, 2021, 15:26 Peter Maydell wrote: > On Thu, 22 Jul 2021 at 13:57, abhijeet inamdar > wrote: > > 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. > > QEMU 4.2 is pretty old, I'm not sure if anybody's going to be very > interested in debugging changes to that old a version... Generally > if you're making changes to QEMU like adding a new machine you > should work with the head-of-git or at least the most recent version. > > -- PMM >