mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-17 02:07:48 -04:00
.. | ||
init | ||
scripts | ||
FreeRTOSConfig.h | ||
main.c | ||
main_blinky.c | ||
Makefile | ||
Readme.md | ||
syscall.c |
Emulating MPS2 Cortex M3 AN385 on QEMU
Requirements
- GNU Arm Embedded Toolchain download here
- qemu-arm-system download here
- Make (tested on version 3.82)
- 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.