lately I have been trying to execute code on Leon3 processor using qemu. My code looks like this:
#include <stdio.h>
#include <stdint.h>
int main(void) {
int a,b,c,d,e;
printf("hello world!");
if(a){
a++;
};
if(b){
b++;
};
if(c){
c++;
};
if(d){
d++;
};
if(e){
e++;
};
while(1){
}
return 0;
}
so it's a pretty simple program.
I start Qemu with following command:qemu-system-sparc.exe -nographic -M leon3_generic -m 64M -kernel testapp.elf
but I don't get any outupt. Qemu seems to start and immidiately quits, not even hanging on infinite loop.
Trying to debug leads to crash(?) with following code: qemu-system-sparc.exe: QEMU: Terminated via GDBstub
I think that maybe i don't undesrtand something about qemu, but I cannot find any help regarding running .elf files.
Maybe anyone have done this and can help me?