I’m working with an STM32G431 and want to do hardware debugging so I purchased a DAPLink device from WeAct, the maker of the STM32G431 board I’m working with. I have it uploading using the OpenOCD Daplink SWD option but when I run the debugger it wants to use stlink.cfg instead of cdmsis-dap.cfg. Why?
After I run the debugger command in a console with the switch from stlink.cfg to cmsis-dap.cfg I then get:
Debug adapter doesn't support 'dapdirect_swd' transport
This is with the latest 2.3.6 Arduino IDE and the latest stm32 board package(v2.11.0). The board I’m using is the WeACT DAPLink board and uploading works fine.
The solution I have now is to change the launch.json file so it’s using cmsis-dap.cfg and instead of select-dapdirect.cfg use select_swd.cfg
In cases where a different configuration is needed depending on which type of debug probe is in use, the platform developer can define a separate "programmer" (the "programmer" system is also used for debug probes) for each of the supported debug probe types. The user can then select the appropriate probe type from Arduino IDE's Tools > Programmer menu, and the sketch debugger will be configured according to the definition of the selected "programmer".
Great work finding the solution! Thanks for taking the time to share your findings.
Thanks for pointing that out. I will open an issue with the stm32duino package devs to see if they’ll add a debugger probe entry and make this a bit easier for others.
It is SOOOooo nice having hardware debugging within the Arduino environment so a big thanks goes out to all the Arduino IDE devs for working through this.