µVISION DEBUGGER: Enable SWO trace on NXP IMXRT1050/1060-EVKB board
Information in this knowledgebase article applies to:
I try enabling SWO trace on my NXP IMXRT1060-EvKB board. But I always get "Trace: No Synchronization" error in the Trace Status bar in the MDK µVision debug session.
How can I enable and use SWO trace on my NXP IMXRT1060-EvKB board in MDK µVision?
Basically the SWO trace can be enabled and configured in MDK µVision in the following ways:
The DFP Pack NXP::MIMXRT1062_DFP for the NXP IMXRT1060-EvKB board is generated and released by NXP, which doesn't have SWO trace related configurations built in the Pack description *.pdsc file. Thus, enabling the "Options for Target - Debug - Settings - Pack - Debug Description" option in MDK µVision alone won't be sufficient to enable the SWO trace on this board.
Instead, you can write the following code into the BOARD_InitPins function of the board support source code file pin_mux.c to configure the SWO trace pins:
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_10_ARM_TRACE_SWO, 0U); IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B0_10_ARM_TRACE_SWO, 0x00F9u);
Then, calling the following function, e.g. in main(), to enable the SWO trace clock:
*((uint32_t *) (0x400E0600)) = (1 << 11); // enable TPIU clock - PMC_SCER = PMC_SCER_PCK3 CLOCK_EnableClock(kCLOCK_Trace);
The same principle applies to the NXP IMXRT1050-EVKB board as well. Check the schematics and the reference manual of the board, and adapt the code above for the NXP IMXRT1050-EVKB board accordingly.
Last Reviewed: Wednesday, November 13, 2019
of your data.