PEmicro Blog

Multilink/Cyclone Debug with NXP's S32 Design Studio for Power IDE

Sep 17, 2019

The "S32 Design Studio for Power IDE" from NXP provides a comprehensive enablement platform for Power Architecture with full integration of PEmicro’s GDB Server for Power Devices. This provides advanced debug capabilities via PEmicro’s Multilink, Cyclone, and embedded OpenSDA debug interfaces.

These features include:

  • multicore debugging
  • hardware breakpoints
  • watchpoints
  • semihosting
  • the ability to attach to running target
  • the ability to provide target power
  • remote debug

...and more.

Launching A Debug Session

It's incredibly simple to launch a debug session via PEmicro’s debug probes with S32 Design Studio. After compiling a project, a debug configuration should be opened by using the down arrow of the Debug button on the Eclipse button bar and then selecting “Debug Configurations” option. All PEmicro launch configurations can be found in the “GDB PEMicro Interface Debugging”.

Figure 1 – To Select Debug Configurations.

Figure 2 – Hardware Settings Under Debug Configurations.

While the default debug configuration will work for most hardware configurations, there are many launch settings the user may wish to modify, including:

  • Automatically provide/switch power to the target MCU
  • Memory region preservation during programming
  • The application object files to be programmed and debugged
  • Any additional object files to be programmed into the device (bootloaders, etc.)
  • Whether to reset/program a target MCU or to attach (hotsync) to a running device
  • Semihosting options allowing running code to emit debug messages
  • Temporary breakpoints
  • MCU device selection
  • Debug probe selection via USB or Ethernet
  • Initialization scripts

In addition to being able to modify an existing launch configuration, a new debug configuration can be created in the Debug Configuration window by double-clicking the “GDB PEmicro Interface Debugging” title. This will create a new configuration which can subsequently be renamed and modified.

Figure 3. Double-click the “GDB PEmicro Interface Debugging” Title to Create a New Configuration.

Different launch configurations can be created for different launch scenarios (e.q., one configuration to reprogram the target MCU, and another to attach/hotsync to a running device). The following items, at a minimum, need to be configured in a new configuration in order to launch a debug session:

  • Debug hardware interface
  • MCU device part number
  • Project and application binary to launch
  • A link to the GDB client executable

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, Cyclone programmers via USB and Ethernet, OpenSDA and OSBDM debug hardware embedded on many NXP development boards. 

Figure 4. Debug Hardware 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 the specific Power MCU device to be debugged/programmed.

Figure 5. 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. This path is usually pre-populated within examples and SDK projects created by S32DS IDE’s project wizard.

Figure 6. GDB Client Path Specification.

Finally, prior to launching a debug session, the user should make sure that the appropriate project and C/C++ application object to debug are properly specified in the Main Tab. Please note that during a single core debug session, only a single C/C++ Application object file is specified. At the same time, for multi-core projects a user should specify additional object files for secondary cores on the Main tab of the primary core setup. In a multi-core project, object files for primary and secondary device cores are programmed into device via a primary core debug session.

Figure 7. Object File Specification.

In a multi-core device configuration, the primary core is used to program and configure all device cores for further debugging. This requires the secondary cores to be launched in a special “Attach” mode to ensure that no additional programming takes place, and the state of pre-initialized device cores is not disturbed. The “Attach to Running Target” runtime option can be found in the Startup tab of Debug Configuration. For the primary core debug configuration the “Attach to Running Target” check box should be left blank.

Figure 8. Attach to Running Target Runtime Option.

After specifying all these options, a new debug session can be launched. For more information about PEmicro GDB launch configuration options, please refer to the GDB Server User Manual for Power.

PEmicro is continually adding support and features to the PEmicro GDB Eclipse plugin-ins for Power and ARM devices.

Installing The Latest GDB Server Plug-In

In order to install the latest PEmicro plugin into S32 Design Studio for Power, or another Eclipse IDE, the user should go to Help -> Install New Software and point to the “Work with” dialog box to PEmicro’s update site. Make sure to expand the “PEmicro Software” category and select the appropriate GBD Power plugin.

Figure 9. PEmicro Plugin Update Selection.

PEmicro’s Eclipse-based GDB Server plug-in allows developers to use PEmicro’s Multilink and Cyclone interfaces to program and debug Power and ARM processors in many different Eclipse based IDEs. S32 Design Studio for Power, S32 Design Studio for ARM and MCUXpresso IDE comes fully integrated with PEmicro’s GDB plugin and together they provide the ability to rapidly develop and debug code for NXP Power and ARM devices.

Tags related to this Blog Post

Cyclone     Cyclone FX     Multilink     Multilink FX     NXP     Production Programming     Debug