[Top][All Lists]

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

Re: [Qemu-discuss] problem with arm cortex-m3

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

Tried with the new board but the result almost the same. The programs stays at 0x0000 after Ctrl+C


On Tue, Feb 3, 2015 at 6:24 PM, Peter Maydell <address@hidden> wrote:
On 3 February 2015 at 17:05, Attila Csosz <address@hidden> wrote:
> GCC command line
> arm-none-eabi-gcc -o main.elf main.c -g -mcpu=cortex-m3 -mthumb
> --specs=rdimon.specs -lc -lrdimon

You're building for the Cortex-M3...

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

...and then trying to run the binary on a board which doesn't
have a Cortex-M3. This will not work, just as it would not work
on hardware.
> Everything is good when I compile this code to arm9 (-mcpu=arm9).

Unsurprising, since the Versatile PB is a board with an ARM926.

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

Depends. You need to build targeting the machine you're emulating.
If you must build for the Cortex-M3 then use a machine which
has an M3 in it (like lm3s6965evb). If building for some other
ARM CPU is OK then some other board might be better (eg have
more RAM).

-- PMM

reply via email to

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