Visual Studio OpenOCD Debug Mbed on STM32F103

Visual Studio OpenOCD Debug Mbed on STM32F103

Playing with MiniMaple clone board from eBay, found that eclipse is really hard to edit code. So spending a lot of time trying to compile and debug on Visual studio code.
Finally got it working, not 100% perfect though.

How to do the setup.

  1. Install gnu arm toolchain;
  2. Install make;
  3. Install OpenOCD;
  4. Go to OpenOCD folder to create this file: maplemini.cfg
    eg: D:\Program Files\GNU MCU Eclipse\OpenOCD\scripts\board\maplemini.cfg

    source [find interface/stlink-v2-1.cfg]
    transport select hla_swd
    source [find target/stm32f1x.cfg]
    reset_config none separate
  5. Clone the project GitHub link
  6. Open in vscode
  7. Change these files to meet your local settings: .vscode/c_cpp_properties.json, runDebuggerServer.bat, launch.json
  8. Press F5

No Comments

Add your comment