[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-discuss] problem with arm cortex-m3

From: Attila Csosz
Subject: [Qemu-discuss] problem with arm cortex-m3
Date: Tue, 3 Feb 2015 18:05:22 +0100


I'm trying to debug the following program

int main()
 int c;

 c = 0;
 while (1) {
  c += 4;

 return 0;

Toolchain: Launchpad
OS: Ubuntu 14.04 64bit

GCC command line
arm-none-eabi-gcc -o main.elf main.c -g -mcpu=cortex-m3 -mthumb --specs=rdimon.specs -lc -lrdimon

Starting QEMU
qemu-system-arm -machine versatilepb -nographic -monitor null -serial null -semihosting -kernel main.elf -gdb tcp::51234 -S &

Starting GDB
arm-none-eabi-gdb -ex "target remote localhost:51234" -ex "load"  main.elf

Commands in the GDB session
b main

The problem the breakpoint never reached, I have to press Ctrl+C to stop the debugger. 
It seems the problem that in memset() the program jumps to 0x0008.

Everything is good when I compile this code to arm9 (-mcpu=arm9).

What may wrong?
Anyway what is versatilepb? Can I use it for my simple programs?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]