Cortex-M3 and Qemu

June 23, 2010

[Warning: This post is a backup recovery from my previous Wordpress blog. All content was automatically converted accessing a MySQL database using a Python script (details). Mostly are in Portuguese but if you are interest I can translate to English. If you found any problem dont’t hesitate to contact me in comments.]

Just a small tip to test code generated for ARM Cortex-M3 using QEmu:

$ arm-none-eabi-gcc main.c -ggdb -mcpu=cortex-m3 -mthumb -T generic-m-hosted.ld $ qemu-arm -cpu cortex-m3 ./a.out

You can download Code Sourcery toolchain here and QEmu here (alsoavailable from packagemanagement system of your favorite Linux distribution). Just unpack the toolchain associating the arm-201XqX/binwith your $PATH and run qemu.