Setting up to debug Mbed OS programs
Update DAPLink interface firmware
You need to update the new DAPLink interface firmware, which includes the new target support, on your interface MCU.
To include the new target support:
- Clone the latest DAPLink firmware with the new target support completed above.
- Use the DAPLink instructions to build the DAPLink firmware release package.
- Locate the generated .bin or .hex firmware under
DAPLink\uvision_release\<your_board_name_if>
. - To update the interface firmware:
- Press the Reset button.
- Plug the USB cable to the host.
- Drag-n-drop the interface firmware.
Create GDB pyOCD debug configuration
-
Install pyOCD. You need the version with the new target support. If you contributed to PyOCD and an updated version hasn't been released yet, you can invoke the local copy:
pip install --editable <path_to_pyOCD_with_new_target_support>
Make a note of the installation path of
pyocd-gdbserver
; you'll need it when you set up the debug configuration inside the IDE. -
The following example is for Eclipse IDE; find similar settings for Keil and IAR.
-
Under Debugger, point the Executable path and Actual executable path to the
pyocd-gdbserver
you installed earlier.For example:
/Library/Frameworks/Python.framework/Versions/2.7/bin/pyocd-gdbserver
on macOS. -
In GDB Client Setup, change the executable to
arm-none-eabi-gdb
, which was part of the GNU Arm Embedded Toolchain you installed earlier.For example, on Windows, it looks like:
C:\Program Files (x86)\GNU Tools ARM Embedded\7 2017-q4-major\bin\arm-none-eabi-gdb.exe
On macOS, it may be:
/usr/local/mbed-tools/gcc-arm-none-eabi-7-2017-q4-major/bin/arm-none-eabi-gdb
-
-
You can use the default values for all other settings.