top of page

Supercharge STM32 Debugging with STM32CubeIDE & PE Micro Tools

STM32CubeIDE is a powerful Eclipse-based development environment used for building and debugging applications on STM32 ARM microcontrollers. It provides integrated tools for code generation, compilation, and debugging.

For advanced debugging scenarios, external debug probes such as PEMicro Cyclone and PEMicro Multilink can be used. These devices extend debugging capabilities through a dedicated Eclipse GDB plugin, enabling seamless integration with STM32CubeIDE. 



This article explains how to install the required plugins, configure the environment, and start a debug session using PEMicro hardware.

**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 then Apply and Close. 




Overview of the Debugging Setup

Debugging STM32 devices using PEMicro tools in STM32CubeIDE involves two main steps:

  1. Installing the PEMicro GDB server plugin (one-time setup) 

  2. Creating and configuring a debug launch configuration (per project) 

Once these steps are complete, developers can initiate debugging sessions directly from the IDE.

Installing the PEMicro GDB Plugin

To enable support for Cyclone and Multilink interfaces, the PEMicro GDB server plugin must be installed into STM32CubeIDE.

Start by opening STM32CubeIDE and navigating to Help → Install New Software. In the installation wizard, point to the PEMicro update site and select the following components:

  • GNU ARM PEMicro Interface Debugging Support 

  • PEMicro ARM Device Expansion Plugin 


After completing the installation, the IDE will prompt for a restart. Once restarted, STM32CubeIDE will recognize PEMicro debug interfaces and allow their use within debug configurations. 

Creating a Debug Configuration

After installing the plugin, the next step is to configure a debug session.

Open your STM32 project and launch the Debug Configuration Manager. Under the PEMicro debugging category, create a new configuration. This configuration acts as the bridge between the IDE, the debug probe, and the target MCU.



Within the configuration:

  • Select the project and corresponding .elf binary 

  • Choose the target MCU device 

  • Specify the debug probe (USB or Ethernet connection) 

  • Provide the path to the GDB client (arm-none-eabi-gdb) 



STM32CubeIDE already includes GNU tools, so the GDB client path can be taken from the IDE’s plugin directory. 

Key Debug Settings

The PEMicro debug configuration provides several advanced options that allow fine control over debugging behaviour.

These include:

  • SWO-based tracing (ITM/printf debugging) 

  • Automatic power control of the target MCU 

  • Memory preservation during programming 

  • Semihosting for debug message output 

  • Reset or attach-to-running-target modes 

  • Temporary breakpoints and exception handling 

Such flexibility allows developers to tailor the debugging process for both development and production-level diagnostics.




Selecting Debug Interface

PEMicro tools support multiple connection types:



  • USB-based debugging (common for Multilink probes) 

  • Ethernet-based debugging (available with Cyclone programmers) 


The IDE can automatically detect connected USB devices. For network-based debugging, the IP address of the Cyclone device must be specified manually. 


Starting the Debug Session

Once configuration is complete, debugging can be started directly using the Debug button in STM32CubeIDE.

The IDE will:

  1. Connect to the PEMicro hardware 

  2. Initialize the target MCU 

  3. Load the application binary 

  4. Halt execution at the entry point or breakpoint 

From there, standard debugging features such as step execution, variable inspection, and breakpoint control can be used.

Benefits of Using PEMicro Cyclone

Using PEMicro Cyclone or Multilink with STM32CubeIDE offers several advantages:

  • Reliable and fast programming/debugging 

  • Support for both USB and Ethernet connectivity 

  • Advanced debug features beyond standard probes 

  • Compatibility with multiple Eclipse-based IDEs 

These capabilities make PEMicro tools particularly useful in professional embedded development and production environments.


Conclusion

Integrating PEMicro Cyclone with STM32CubeIDE significantly enhances debugging flexibility and performance. By installing the appropriate GDB plugin and configuring the debug environment correctly, developers can leverage powerful features such as remote debugging, advanced trace capabilities, and robust device control.

This setup is especially valuable for complex embedded systems where deeper visibility and control over execution are required.


Comments


bottom of page