Configuring specific H/W pins for SWO or ETM Trace

기술노트 190507






2019-05-23 오후 1:14


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


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


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:



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.

죄송하지만, 이 콘텐츠는 한국어로 제공되지 않습니다.

당사 웹 사이트 중 한국어가 제공되는 않는 페이지는 기본적으로 영어로 제공됩니다. 보다 정확한 정보를 위해 영어로 제공되는 글로벌 웹 사이트를 방문하실 것을 권장합니다.

죄송하지만, 당사 사이트에서는 Internet Explorer를 지원하지 않습니다.보다 편안한 사이트를 위해 Chrome, Edge, Firefox 등과 같은 최신 브라우저를 사용해 주시길 부탁드립니다.