FreeRTOS-Kernel/FreeRTOS/Demo/CORTEX_M3_MPS2_QEMU_GCC
2020-11-10 14:45:34 -08:00
..
init [AUTO][RELEASE]: Bump file header version to "202011.00" 2020-11-10 14:45:34 -08:00
scripts [AUTO][RELEASE]: Bump file header version to "202011.00" 2020-11-10 14:45:34 -08:00
FreeRTOSConfig.h [AUTO][RELEASE]: Bump file header version to "202011.00" 2020-11-10 14:45:34 -08:00
main.c [AUTO][RELEASE]: Bump file header version to "202011.00" 2020-11-10 14:45:34 -08:00
main_blinky.c [AUTO][RELEASE]: Bump file header version to "202011.00" 2020-11-10 14:45:34 -08:00
Makefile Blinky Demo for Cortex M3 MPS2 on Qemu (#345) 2020-10-21 18:00:34 -07:00
Readme.md Blinky Demo for Cortex M3 MPS2 on Qemu (#345) 2020-10-21 18:00:34 -07:00
syscall.c [AUTO][RELEASE]: Bump file header version to "202011.00" 2020-11-10 14:45:34 -08:00

Emulating MPS2 Cortex M3 AN385 on QEMU

Requirements

  1. GNU Arm Embedded Toolchain download here
  2. qemu-arm-system download here
  3. Make (tested on version 3.82)
  4. Linux OS (tested on Ubuntu 18.04)

How to build

Navigate with the command line to FreeRTOS/Demo/CORTEX_M3_MPS2_QEMU_GCC For a release build run:

$ export PATH=/path/to/arm/toolchain:$PATH
$ make

and for a versions with debugging symbols and no optimizations activated, run:

$ make DEBUG=1

How to run

run:

$ qemu-system-arm -machine mps2-an385 -monitor null -semihosting \
        --semihosting-config enable=on,target=native \
        -kernel ./build/RTOSDemo.axf \
        -serial stdio -nographic

How to start debugging (gdb)

Append the -s and -S switches to the previous command (qemu-system-arm)
-s: allow gdb to be attached to the process remotely at port 1234
-S: start the program in the paused state

run: (make sure you build the debug version)

$ arm-none-eabi-gdb -q ./build/RTOSDemo.axf

(gdb) target remote :1234
(gdb) break main
(gdb) c

Demo

This Demo implements the blinky demo, the user should expect the word "blinking" to be repeatedly printed on the screen.