Modified: 2023-02
This repository serves as an open source test bench for developing applications using the FreeRTOS-Kernel on the STM32F411VET6U MCU as part of the STM32F411E-DISCO Evaluation Board. Many of the integrations in this repository can be ported to different MCUs.
- XRTOS Task View
- MCU Memory View
- Hardware Peripheral Map
- GDB Debugging Utilities
- Intellisense configured with compile commands generated by CMake project
- FreeRTOS-Kernel and STM32F4 source fetched as part of project build.
- Automatic toolchain discovery and configuration.
This toolchain leverages the following software tools:
See the installation guide for installation instructions.
Clone this project:
git clone [email protected]:dronectl/freertos-testbench.git
cd freertos-testbenchBuild the project. For debug symbols and FreeRTOS task statistics build for debug mode:
If no build type is specified the project will default to a release build.
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=DEBUG
...Compile the project
make -j`nproc`Flash the board:
OpenOCD automatically detects an STLINK device over USB.
make flashIn order to setup VSCode for this project, it is recommended you install the following extensions:
ms-vscode.cpptoolsmarus25.cortex-debugtwxs.cmake
Copy the dev/.vscode directory to the repository root. The files included provide the following capability:
c_cpp_properties.json-> configuration for intellisense and static analysis tools.launch.json-> configuration for vscode debugging interface.
Because the c_cpp_properties.json requires the compile commands file generated by cmake to operate, you will need to build the project (see Quickstart). Intellisense will look for a compile_commands.json file in the build directory.
If you make a change to the source files simply rebuild the project. The compile commands will be updated by CMake and VSCode will detect and apply these changes automatically.
Note you must build the project with
-DCMAKE_BUILD_TYPE=DEBUGto enable debug symbols.
Once the project binary is built using make, we can launch the vscode debugger using the F5 key. Here is a sample view of the debugging utilities:
Below is a list of capabilities provided by the cortex-debug extension:
- Cortex peripheral register read and set
- Variable inspection and watchpoints
- Live breakpoints
- Task seperated call stacks
- Task runtime statistics
- MCU memory inspection
This project is licensed for use under the terms of the LGPL-3.0 license.
