Arm Mbed OS support forum

How to adjust debug options for Mbed studio/pyocd

Similiar question as this: Debug Settings for J-Link Target

So, every embedded tool I have ever worked with has a pane similar to this:

Where one can adjust all the parameters of the debug probe. Now I see that PyOCD pulls those settings from somewhere, since in Mbed log file there is a Line:

[2020-10-07T00:46:55.161] [INFO] root/mbs-debug - Debug config: {"name":"Mbed Debug","type":"cmsis-debug","request":"launch","runToMain":true,"verbose":false,"program":"\\MBED_WKSP\\BLANK\\Project\\BUILD\\HRVEND433\\GCC_ARM\\Project.elf","gdb":"C:\\ARM_Embedded\\9-2019-q4-major\\bin\\arm-none-eabi-gdb.exe","objdump":"C:\\ARM_Embedded\\9-2019-q4-major\\bin\\arm-none-eabi-objdump.exe","gdbServer":"c:\\ProgramData\\Mbed Studio\\mbed-studio-tools\\python\\Scripts\\pyocd.exe","gdbCore":-1,"gdbServerArguments":["gdbserver","--uid","31ff72064d4e353843580543","--target","STM32L433CCTx","--erase=chip","--frequency","1800000","--pack","c:\\ProgramData\\Mbed Studio\\mbed-studio-tools\\cmsis-packs\\Keil.STM32L4xx_DFP.2.3.0-small.pack","-O","connect_mode=under-reset"],"gdbArguments":["-nh"]} []

so few questions:

  1. Is the debug options pane planned for MBED studio?
  2. Which config file do I need to change to change connection speed/gdb port/other settings
  3. If pyocd is not working, and I can start OpenOCD server, is there a way to connect the MBed studio to connect to remote target? that way I can use the MBed Studio GUI with custom settings?

Hi @aoreskovic,

In Mbed Studio 1.3.0 you can modify the “Debug Flags” used to start pyocd gdbserver. These can be set separately for each connected device that is a supported development board or debug probe. See the custom targets dialog documented here:

Also see the documentation in the pyOCD GitHub repository, e.g. the Configuration page:

Mbed Studio doesn’t support OpenOCD at this time.

Mbed Studio team