Created Saturday 11 November 2023
With this configuration it is possible to quickly perform build and run by pressing Ctrl+B and then Ctrl+F11.
Using STM32_Programmer_CLI
- Open Run → Debug Configurations double-click on first line "C/C++ Application" to create new configuration.
- Under the tab "Main" set "C/C++ Application" to STM32_Programmer_CLI.exe, including full path (look for it in STM32CubeIDE directory)
- Under the tab "Arguments" set "Program arguments" to -c port=swd -d ${project_loc}\${config_name:${project_name}}\${project_name}.elf -rst
- Under the tab "Common" check "Display in favorites menu" – "Run"
- Open Window → Preferences → General → Keys set Command "Run" Binding to Ctrl+F11 (error with command: gdb --version will not appear when using hotkey).
Using ST-LINK_CLI (works with ST-Link v1)
- Install st-link utilites
- Open Project→ Properties→ C/C++ Build→ Settings→ tab "Tool Settings" → MCU Post build outputs check "Convert to Intel Hex file"
- Open Run → Debug Configurations double-click on first line "C/C++ Application" to create new configuration.
- Under the tab "Main" set "C/C++ Application" to ST-LINK_CLI.exe, inculding full path (look for it in Program Filex (x86) directory)
- Under the tab "Arguments" set "Program arguments" to -c SWD -P ${project_loc}\${config_name:${project_name}}\${project_name}.hex -rst
- Under the tab "Common" check "Display in favorites menu" – "Run"
- Open Window → Preferences → General → Keys set Command "Run" Binding to Ctrl+F11 (error with command: gdb --version will not appear when using hotkey).