STM32Fx_FreeRTOS_Base
FreeRTOS starter project for STM32 microcontrollers.
Prerequisites
- GNU Make
- gcc-arm-embedded
Creating a new project:
- Create (if necessary) board and CPU definitions (see existing examples for details).
- Create an application folder in the apps directory
- Create a config.mk file for your application (see existing examples)
- Store your application code in the newly created directory and edit your config.mk file appropriately
Building
- 'cd' to the root of base project directory
- type 'make APP=your_app_name'
Debugging
- Install openocd with support for your JTAG dongle
- Add an openocd.cfg to your project (see existing examples)
- Install DDD (data display debugger) (optional)
- Type: sudo make APP=your_app_name openocd (this starts the
debugger)
- Attach your favorite debugger (gdb/ddd/insight) to the openocd
session (a make command for ddd is included in the makefile)
ITM Trace output
- Download, build, and install
swo-tracer
- Compile and flash your firmware
- Start openocd with trace support (see example openocd.cfg files)
- Start gdb and enable semihosting (make APP=your_app gdb)
- Launch swo-tracer and point it at the swo.log file that is
generated by openocd (swo-tracer -t swo.log). You may need to use
sudo
- Use GDB to reset your firmware and any printf output should be
displayed in the swo-tracer screen