Debugging feature

You don’t need to specify it. Please check that you use the latest ststm32 development platform (git version).

Also, PIO should detect debug port automatically too.

Will test and report back!! :slight_smile:
Please give me some time.

Well, sorry for the delay.

I still have to specify the DEBUG_PORT. but it is working just fine without the BUILD_FLAGS part.
The project indexing rebuilding itself is failing when I dont specify the DEBUG_PORT.

Please connect BMP and run pio device list. What do you see?

krishis-MBP:mbed_f103c8 krishi$ pio device list
/dev/cu.Bluetooth-Incoming-Port
-------------------------------
Hardware ID: n/a
Description: n/a
 
/dev/cu.usbmodemBFDEA5F1
------------------------
Hardware ID: USB VID:PID=1D50:6018 SER=BFDEA5F5 LOCATION=20-1
Description: Black Magic Probe (JC66CoreBoard), (Firmware v1.6-rc0-98-g4055a58)
 
/dev/cu.usbmodemBFDEA5F3
------------------------
Hardware ID: USB VID:PID=1D50:6018 SER=BFDEA5F5 LOCATION=20-1
Description: Black Magic Probe (JC66CoreBoard), (Firmware v1.6-rc0-98-g4055a58)

PIO is able to see and detect the BMP, it is not auto-picking up the debug port and I have to specify the debug_port.

It works just fine when I specify it in the platformio.ini file anyway @ivankravets. :slight_smile:
I dont mind specifying it in the platformio.ini file anyway.

Just for information:

nucleo:
for nucleo_f103rb/mbed it works with “simple” platformio.ini.
debug_gdbinit works as intended.
The “command line gdb window” is very useful.

bluepill:
Unfortunately I can’t do any further testing because BMP did not arrived.
Uploading to bluepill_f103c8 works via nucleo as stlink, but debugging did not work.
(did not investigate further because maybe it’s not a usual setup)

Likewise, I just checked my Disco_F030R8 for debugging

It uploaded fine, but debugging does not work.

Here is a screenshot of the error I got when I tried debugging with “stlink-v2-1” as the debug-tool.

BMP uploading and debugging works fine, as long as I specify the debug_port. Stlink uploads fine without any intervention but debugging does not work.

It will not work because Disco is based on the old ST-Link v2 where Nucleo is based on ST-Link V2-1. As result, OpenOCD doesn’t work because we provide incorrect debug information for it.

Also, I’m surprised that we don’t have support for Disco F030R8. I’ll add a new board for Disco and prepare debug configuration for it.

P.S: You are right, auto-detecting of debug port doesn’t work correctly. I’m working on it, will inform you soon about progress.

Auto-detecting of debug port is fixed. Please re-update PIO Core: Redirecting...


Update:

Please switch from Nucleo to disco_f030r8 and don’t forget to $ pio update. The ST STM32 dev platform has been updated.

I’ve just added support for ST-Link v2-1 for F103 series. Please

  1. pio update , you should use the latest ST STM32 development platform
  2. Put to platformio.ini this
[env:...]
board = bluepill_f103c8
debug_tool = stlink-v2-1

So, Nucleo should work as debugger for your bluepill_f103c8

Yep, Triggered the same error.
Before you pushed the changes and posted here, I already tried creating a custom board for the disco-f030r8 and got this error.

I just saw you post and deleted my board, re-updated as you suggested and tried. It gave the same error.

I think the error is because mbed itself does not have native support for the disco-f030r8. The closest that comes to being supported is the nucleo f030r8 which I have used to build and compile so far.

You need the latest ST STM32 dev platform. PIO IDE > Home > Platforms > Updates and update ST STM32

Did that already, same issue! :frowning:

The changes were applied to mbed build script too. Which version of ST STM32 IDE shows? It should be f356e66.

See Commits · platformio/platform-ststm32 · GitHub

The same.

  1. Did you remove your custom board?
  2. Try to delete this folder ~/.platformio/.cache

Yeah I removed the custom board before I even tried what you suggested, now again tried after removing the .cache folder and restarting atom

Same error.

[quote=“ivankravets, post:50, topic:1700”]
So, Nucleo should work as debugger for your bluepill_f103c8[/quote]

Sorry, did not work for me, any suggestions how to investigate further?

PS: upload only works when i plug out and in the USB connector.
for debugging i tried plug out and in USB, resetting the bluebell via pushbutton with all variations BOOT-Jumpers