First post here to share an issue I have when trying some debugging with an STM32F103C8 board using OPENOCD and an STlinkV2 dongle.
Linux Mint 19.1 (Linux x64 4.18.0-13-lowlatency), Visual studio code V1.30.1(181218) with PlatformIO 1.6.0 (Home 2.0.0, Core 3.6.3). Installed platforms are ST STM32(V4.5.0) and ATMEL AVR (V1.12.1). I also installed cortex-debug (0.1.21)
I created a project and the build_flags = -g3 are set in the platformio.ini file in order to have the debugging symbols created. The Cortex-debug gives me always timeout errors so I started to test gdb manually…
- Compile the file via vscode/platformIO : all goes well and firmware.elf file created in .pioenvs/genericSTM32F103C8/firmware.elf
- upload the code via the STlink via vscode/platformIO : all goes well in 3.75 Sec
- start a terminal to launch openocd via the command :
/home/democles/.platformio/packages/tool-openocd/bin/openocd -f /home/democles/.platformio/packages/tool-openocd/scripts/interface/stlink.cfg -f /home/democles/.platformio/packages/tool-openocd/scripts/target/stm32f1x.cfg
This goes well and openocd starts listening on 3333.
- open terminal to launch gdb:
the debugger starts and gives this as output:
GNU gdb (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 22.214.171.12471128-git
Copyright © 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later link
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type “show copying”
and “show warranty” for details.
This GDB was configured as “–host=x86_64-linux-gnu --target=arm-none-eabi”.
Type “show configuration” for configuration details.
For bug reporting instructions, please see: link
Find the GDB manual and other documentation resources online at: link
For help, type “help”.
Type “apropos word” to search for commands related to “word”…
Reading symbols from /home/democles/Documents/PlatformIO/Projects/Brokkingdrone/.pioenvs/genericSTM32F103C8/firmware.elf…(no debugging symbols found)…done.
What am I doing wrong? Any help much appreciated!