[ Prev ] [ Index ] [ Next ]

Flash and run without debug

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

  1. Open Run → Debug Configurations double-click on first line "C/C++ Application" to create new configuration.
  2. Under the tab "Main" set "C/C++ Application" to STM32_Programmer_CLI.exe, including full path (look for it in STM32CubeIDE directory)
  3. Under the tab "Arguments" set "Program arguments" to -c port=swd -d ${project_loc}\${config_name:${project_name}}\${project_name}.elf -rst
  4. Under the tab "Common" check "Display in favorites menu" – "Run"
  5. 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)

  1. Install st-link utilites
  2. Open Project→ Properties→ C/C++ Build→ Settings→ tab "Tool Settings" → MCU Post build outputs check "Convert to Intel Hex file"
  3. Open Run → Debug Configurations double-click on first line "C/C++ Application" to create new configuration.
  4. Under the tab "Main" set "C/C++ Application" to ST-LINK_CLI.exe, inculding full path (look for it in Program Filex (x86) directory)
  5. Under the tab "Arguments" set "Program arguments" to -c SWD -P ${project_loc}\${config_name:${project_name}}\${project_name}.hex -rst
  6. Under the tab "Common" check "Display in favorites menu" – "Run"
  7. Open Window → Preferences → General → Keys set Command "Run" Binding to Ctrl+F11 (error with command: gdb --version will not appear when using hotkey).