Compatibility with the popular IDEs: Eclipse, Atom, VSCode, Sublime Text, etc
Windows, MacOS, Linux (+ARMv6-8)
We have started a big work on the PIO Unified Debugger, a tool which supports multiple debugging interfaces, IDEs, development platforms, architectures and works with ZERO-Configuration. Yes, the simple click on “Debug” button in your favorite IDE and you are ready to debug PlatformIO Project.
The project can contain multiple environments with different boards/architectures. Also, you can debug simultaneously the same project with multiple debug environments.
!!! No need to install extra software, prepare firmware for debugging or spend time on debug tool configuration. All should work without extra steps, PIO resolves this complicated work automatically “on-the-fly” !!!
My board is not supported yet
Please reply to this thread with all details:
Board name (URL)
If it doesn’t have On-Board debug link and you have own JTAG/SWD adapter, please post here all information.
Atom 1.15.0, IDE 2.0.0beta2.3, Core 3.4.0a4, macOS sierra
I tried debugging with a STM32 Nucleo303k8 board, but I did not have real luck with it.
When starting debugging the debugger stops at main(), this is ok.
With the “>” button I start the debugger again an he stops at the breakpoint as expected.
When doing the next “>” the program run thru the while loop and doesn’t stop again, I think the debugger must stop every time when reaching the break point, or did I miss understood something?
Also, there a not all variables displayed (in my example int counter), sometimes I get an error
message, sometimes not. Here the screenshot:
The next problem is the setting of the breakpoint, it is a big problem to Clear the breakpoint, sometimes you need a dozen of mouse clicks to delete a breakpoint. Sometimes the breakpoint symbol is dimmed so you see it a little bit, but it is not set, it seems it is an graphic artefact.
ststm32 @ b31bc3b has been successfully installed!
PackageManager: Installing toolchain-gccarmnoneeabi @ >=1.40803.0,<1.40805.0
toolchain-gccarmnoneeabi @ 1.40804.0 is already installed
The platform ‘GitHub - platformio/platform-ststm32: ST STM32: development platform for PlatformIO’ has been successfully installed!
The rest of packages will be installed automatically depending on your build environment.
But still the same message
PlatformIO Plus (https://pioplus.com) v0.7.3
Error: Currently, PlatformIO does not support debug for nucleo_l476rg.
I used default project settings only and “PIO Debug” as target. Only added “upload_protocol = stlink” in the platformio.ini (BTW: should be default for Nucleo boards, trap for young players)
I’m new hobbyist and new to A) SMT32 and B) Platform IO. I really like your IDE. I really love your approach to intergrate a ton of different toolchains into one IDE. Using one modern IDE for Atmel, ESPs and STMs and … is great.
Moved to STMs32 because of the in circuit debugging feature but was not willing to mess around with IDEs more complicated to install than the effort the complete project takes.
Thank you for your contribution.
It is allowing me to probe the variables, constants, even mcu registers!!! while single stepping!!
I have been playing with it for the last hour or so and it is brilliant!!!
Of course, I would like to point out that any probing into the pin values is dependant on the framework being used.
I spent most of my time trying to understand how to read the value of a pin while debugging.
Got it finally, but it is mostly dependant on the registers and pin declarations in the framework.A little poking around will reveal the details anyway!!!
The gpioc.regs.ODR shown in the top right side is the libmaple definition of the Output Data Register. This definition varies from framework to framework. It still reflects the status of the pin while stepping.
Of course, its not a complaint with the debugging feature, more of a headsup for the others. It might seem daunting for some people.
The new frontend looks fine . Variable watching is very cool . Some suggestion:
it would nice when the debugging information (breakpoints, variables watch etc.) are stored in the project, so that we need not to do all that things again after restarting.
support for cmsis-dap for mbed boards with nxp and other ucontrollers
Could you tell me which “.gdbinit” is loaded at startup?
(wanted also to store breakpoints and autoload them, but $HOME/.gdbinit does not work,
maybe the project directory would be a good place)
Support for 100+ different embedded board now. See “Board Explorer” in IDE and sort by icon.
New configuration option for platformio.ini
debug_init_cmds - custom init commands
debug_extra_cmds - extra commands for debugger. Is useful to add permanent breakpoints. For example, debug_extra_cmds = b main.cpp:13 (debugger will start with hardware breakpoint in main.cpp at 13 line)
Don’t forget to update development platforms to the latest GIT which you are going to use for debugging.
I’d only time for a quick view, will continue testing later.
The new version works as expected.
debug_extra_cmds is a very useful command and works perfect!
(btw. is there a way in platformio.ini to specify the project directory?
e.g.: debug_extra_cmds = source ${env:PROJECT_DIR}/gdb_sourct.txt )
2.) If something went wrong with debugging, some processes keep hanging around.
maybe you could check before starting the debugger.
(“killall openocd arm-none-eabi-gdb pioplus” did it for me)
3.) env_default does not care about debugging.
If I hit the debugging button the first entry in platformio.ini is used for debugging configuration not the environment specified by env_default
4.) On my screen there is some space left beside the debugger buttons.
Would it make sense to add a button with a user defined gdb command?
The user can define the command in “debug_extra_cmds” and the button will execute it.