I have a custom board using STM32L031F6 with 32K flash 8K ram. Using a Mac with Black Magic Probe which works for uploading. However when I try to start PIO Debug (skip Pre-Debug) the debug control panel pops up briefly and then disappears before initializing is complete.
Here is my platformio.ini
[platformio] default_envs = [env] platform_packages = toolchain-gccarmnoneeabi@~1.90301.200702 debug_tool = blackmagic upload_protocol = blackmagic extra_scripts = blackmagic_srst.py ; needed for M0/M0+ detection debug_port = /dev/cu.usbmodemBFE4B7ED1 upload_port = /dev/cu.usbmodemBFE4B7ED1 [env:L031F6] platform = ststm32 ;platform = https://github.com/platformio/platform-ststm32.git board = STM32L031F6 framework = stm32cube build_type = release build_flags = -DSTM32L0 -DL0 -std=gnu++11 -Os -flto -Wl,-Map,output.map -Iinclude -ICore/Inc [env:debug] platform = ststm32 ;platform = https://github.com/platformio/platform-ststm32.git board = STM32L031F6 framework = stm32cube build_type = debug debug_build_flags = -DSTM32L0 -DL0 -std=gnu++11 -Os -ggdb3 -flto -Wl,-Map,output.map -ICore/Inc -Iinclude ;; blackmagic debug_init_cmds = target extended-remote $DEBUG_PORT monitor conn e monitor swdp_scan attach 1 set mem inaccessible-by-default off