For debugging the STM32 development board latest Eclipse with gdb connected to the gdb server running on a USB connected Segger J-Link hardware debugger is needed.

The following description is taken over from the Eclipse Embedded CDT guide.

First download and install the latest “J-Link Software and Documentation pack for Linux, DEB Installer, 64-bit” .deb package from Segger:

~# dpkg -i Downloads/JLink_Linux_V640_x86_64.deb

This installs documentation, a GDB server and further tools for the Segger J-Link EDU debugger. Also a udev rule for the USB debugger will be installed.

CMSIS packs

If the MCU Eclipse plugin is installed its time to refresh the CMSIS packs manager containing the MCU device descriptions provided by some manufacturers. Open the packages view packages_btn and press refresh:

packages_view Install the needed packs:

install_device

All the packages are stored in ~/Packages. Assign the device to your project in project properties → C/C++ Build → Settings → Devices: pack_device

Create debug configuration

After a successfully compiled project in debug configuration, select the resulting .elf file in the Debug folder of the project:

select_elf

Open the “Debug Configuration ….” dialog and check the following tabs "Main" .... debugconf1

... and "Debugger": debugconf2

After that you are able to flash and debug the target with the debugging button.

Previous Post Next Post