Configuring specific H/W pins for SWO or ETM Trace

Technical Note 190507

Arkitekturer:

Arm

Komponent:

debugger

Uppdaterad:

2019-05-23 13:14

Introduction

On some MCUs, you can choose which H/W pins are used for SWO or ETM trace.

Discussion

The C-SPY debugger normally configures the trace pins automatically using debugger macro files (*.dmac) from the directory:

$TOOLKIT_DIR$\config\debugger

To make C-SPY aware of which pins you have selected for SWO or ETM trace, there are usually macro parameters similar to these in the device-specific .dmac files:

__param _SWO_route=0;
__param _TRACE_route=0;

To change such a parameter without modifying the .dmac file, use:

Project>Options>Debugger>Extra Options>Use command line options:

--macro_param _SWO_route=1
--macro_param _TRACE_route=1

Read more about --macro_param in the C-SPY Debugging Guide for Arm.

The following list contains examples of device-specific .dmac files where SWO or ETM trace pins can be configured:

Altera CycloneVSoC*.dmac
Ambiq Micro  apollo*.dmac
Analog Devices CM40z.dmac
Cypress  CY*.dmac, S6*.dmac
Infineon  XMC*.dmac
Microchip  SAMD*.dmac, SAME*.dmac, SAMV*.dmac
NXP  iMX*.dmac, K*.dmac, LPC5*.dmac, S32K*.dmac
Renesas  EC*.dmac, RZ*.dmac
Silicon Labs  Trace*.dmac
ST  STM32M*.dmac, STM32W*.dmac
Texas Instruments  CC26*.dmac
Xilinx  Zynq7*.dmac

To find which .dmac file is used by your device, see the top of the Debug Log window. Look for the lines that begin with Loaded macro file. You can also see which .dmac file is used by looking for the DeviceMacros line in:

$TOOLKIT_DIR$\config\devices\<vendor>\<device>.i79

Conclusion

On some MCUs, you can choose which H/W pins are used for SWO or ETM trace. That is, you can configure the trace pins, and you can configure C-SPY to match the H/W trace pin configuration.

 

All product names are trademarks or registered trademarks of their respective owners.

Det här innehållet finns tyvärr inte på svenska.

Vår webbplats finns främst på vårt koncernspråk engelska, förutom det innehåll för investerare som vi är lagstadgade att kommunicera på svenska. Vi rekommenderar att du besöker vår globala webbplats på engelska för att få en bättre upplevelse.

Vi stöder inte längre Internet Explorer. För att få bästa möjliga upplevelse av iar.com rekommenderar vi att du uppgraderar till en modern webbläsare som Chrome eller Edge.