STM32CubeIDE from STMicroelectronics is an Eclipse-based enablement platform which supports development and debugging of code on STM32 ARM microprocessors. PEmicro's Multilink debug probes and Cyclone programmers can be leveraged for advanced debug capabilities via an Eclipse GDB plugin that is freely available for installation into any Eclipse IDE from PEmicro update site (https://www.pemicro.com/eclipse/updates). This blog demonstrates the steps needed to install and configure PEmicro Multilink and Cyclone debug support in STM32CubeIDE to the point of launching a debug session.
WORKAROUND for newer STM32CUBE IDEs with CDT version 10.6 and greater
The workaround is to disable the CDT update site. In STM32CubeIDE, go to Help->Install New Software -> Manage...
In the "Preferences" dialog, uncheck the checkbox next to CDT:
Figure 1. Preferences Dialog
Then install the PEMICRO plugin.
Installation Step | Frequency |
1. Install the PEmicro GDB server for Arm device Plugin | Only Once |
2. Create a Launch Configuration | Once Per Project |
Installing PEmicro GDB server for ARM devices plugin
a. Launch STM32CubeIDE and proceed to Help -> Install New Software to bring up plugin installation and update wizard.
b. Point Work with dialog to PEmicro plugin update site: https://www.pemicro.com/eclipse/updates
c. Select two items: GNU ARM PEMicro Interface Debugging Support, and PEmicro ARM Device Expansion Plugin. And click on the Next button:
Figure 2. Select Support and Plug-In
d. This will install support for PEmicro’s Multilink and Cyclone hardware into STM32CubeIDE. A dialog will pop up prompting you to restart STM32CubeIDE. Click Yes.
Launching a Debug Session
a. It’s incredibly simple to launch a debug session via PEmicro’s debug probes with STM32CubeIDE. Open a project of your choice and bring up its debug configuration manager:
Figure 3. Launching Debug Configuration Wizard
b. This brings up the dialog where launch settings are configured. PEmicro interfaces require a dedicated launch debug configuration that can initially be created by double clicking on GDB PEmicro Interface Debugging category in the left pane:
Figure 4. Creating PEmicro Launch Debug Configuration
Once PEmicro launch debug configuration is created, under the Main tab, please browse to a current project as well as C/C++ Application .elf file that one is looking to debug.
c. Under Debug tab, user may wish to modify many launch settings to control the features that include:
At a minimum, the user should properly configure the following settings in order to launch a debug session:
Figure 5. PEmicro Debug Configuration Settings
When a new launch debug configuration is created, the user should begin by selecting the Debug Hardware Interface to be used. The PEmicro GDB server supports debug connections through PEmicro’s USB Multilink debug probes, as well as Cyclone programmers via USB and Ethernet.
Figure 6. PEmicro Debug Interface Selection
PEmicro’s USB and local Ethernet devices are automatically detected. Remotely networked Ethernet debug interfaces may be specified via their IP address.
Next, the user should select specific STM32 MCU device to be debugged and programmed.
Figure 7. STM32 Device Selection
When creating a new debug configuration, the user should ensure that a path to a GDB Client is specified under GDB Client Setting within debug configuration. STM32CubeIDE comes with a GNU plugin for external tools pre-installed: com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2- update.win32_1.0.0.201904181610. Therefore, please point GDB Client Setting text box with a direct path to arm-none-eabi-gdb.exe client. Please note that the actual path might vary depending on the version of the plugin as well as the location of your STM32Cube installation directory (STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.0.0.201904181610\tools\bin\arm-none-eabi-gdb.exe).
Figure 8. GDB Client Path
Once these debug settings are complete, a debug session can be started with a press of Debug button.
Any users having issues setting up their GDB plugin and Multilink/Cyclone hardware could easily reach out to our very helpful technical support team. Simply go to our Support page, and look for Support Request. Please write in detail the problem and we would be happy to help.