Installation:
- Install latest STM32CubeIDE (link)
- Install
cmake4eclipse
extension (Help
>Eclipse Marketplace...
> search forcmake4eclipse
and install it) - For FreeRTOS-aware debugging, install the
FreeRTOS
plugin from here. - Install some spell checker (e.g. Eclipse CDT includes one).
Generate and open the project:
- Generate a project file by running:
python utils/build.py --generate-bbf --generate-dfu --generate-cproject
- Open the project in the IDE (
File
>Import Projects from File System...
> Select the root directory of this repository >Finish
) - Right click on the project and select
Properties
. Make sure the settings forIndexer
is the same as on the screenshot below (sometimes, it does not get loaded).
💡Changes to the generated project are not tracked by git. The build is still driven by CMake; therefore, if you want to add a file or change some compiler settings, change it in CMakeLists.txt directly.
This happens when a debug configuration contains an absolute path to the firmware. Just change it to a relative one (beginning with build/
, or build\
on windows).
Checkout the README.md of the Cortex-Debug extension:
As a general rule do not try to use stepping instructions before the scheduler of your RTOS has started - in many cases this tends to crash the GDB servers or leave it in an inconsistent state.
You can always disable FreeRTOS debugging by removing the line "rtos": "FreeRTOS"
from .vscode/launch.json
.