2
votes

i'would to cross compile helloworld.c for arm target and run on qemu but i have always the same error when i run this command:

qemu-system-arm -M vexpess-a9 -kernel test

qemu-system-arm: -kernel test: unsupported machine type

thanks for your help and advices

1
you didnt compile your binary for arm, and beyond that if test is the helloworld program which I assume is some printf thing to run on top of some operating system (linux) then that is not how you run it. if it is bare metal then sure.old_timer
in fact i try to cross compile this helloworld.c (it main function like you say is to print hello world) with this command "arm-linux-gnueabi-gcc -static helloworld.c -o test" and i would to test this program on qemu without operating systemgerrard2461

1 Answers

3
votes

in fact i needed to link software for the adress 0x0010000 to be executed a guest code on host machine because The QEMU emulator is written especially to emulate Linux guest systems; for this reason its startup procedure is implemented specifically: the -kernel option loads a binary file (usually a Linux kernel) inside the system memory starting at address 0x00010000. The emulator starts the execution at address 0x00000000, so we need to place our binary in the correct adress

i follow this tutorial and it works for me