Skip to content

Latest commit

 

History

History
68 lines (61 loc) · 3.02 KB

README.md

File metadata and controls

68 lines (61 loc) · 3.02 KB

STM32F103 BluePill LED example

Recommended reading

Requirements

On Window initialize/build debug

Prepare Utilities

  • Create sibling folder "tools" where you have cloned git project. Create subfolders:
    • tools
      • | gdb
      • | stm32-tools
  • install Dot Net Core 6.0 SDK
  • install Visual Studio Code
  • install STM32 Cube Programmer copy everyhting from install dir to "tools\stm32-tools" (default install path is: C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer)
  • install STM32 Cube MX
  • install ST Link GDB Server copy everything from bin folder to "tools\gdb" (default install path is: "C:\ST\STM32CubeIDE_1.6.1\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.win32_x.x.x.xxxxxxx\tools\bin")
  • open workspace
  • Run task "initialize" (this will download gnumake, cmake and ARM toolchain and install them in tools folder)
  • For CMake kit select: GNU ARM

On Linux initialize/build debug

  • Create sibling folder "tools" where you have cloned git project. Create subfolders:
    • tools
      • | gdb
      • | stm32-tools
  • install Dot Net Core 6.0 SDK
  • install Visual Studio Code
  • install STM32 Cube Programmer
    • copy everyhting from install dir to "tools\stm32-tools"
  • install STM32 Cube MX
  • install ST Link GDB Server
    • run: sudo sh st-stlink-server.xxxx-linux-amd64.install.sh
    • copy file stlink-server-x.x.x-x to "tools\gdb\ST-LINK_gdbserver"
  • open workspace
  • Run task "initialize" (this will download gnumake, cmake and ARM toolchain and install them in tools folder)
  • For CMake kit select: GNU ARM

Usage

  • connect USB ST-Link programmer
  • Run task "build debug" to build debug version (ctrl+shift+B)
  • Run task "attach to gdb" to debug the project (F5)
    • Note: Always "build debug" before you start debuging the project.