Hi @rshipman ,
Thank you for your interest in the NXP MIMXRT product, I would like to provide service for you.
When you use the LPC-Link 2 test with RT1020, which SDK code you are using? please use the helloworld test it, don't use the led_blinky, as the led_blinky will use the pin which is connected to the LPC-LINK2, then it will influence the debug.
If you have external Segger JLINK, I think you also can try the directly JLINK.
Answer your questions:
1 What have I missed - is the above all I need to do to get SWO Trace to work?
Answer: Normally, these steps to enable the SWO.
1) check pinmux.c , enable the SWO pin.
In fact, newest SDK code already add it:
void BOARD_InitPins(void) {
CLOCK_EnableClock(kCLOCK_Iomuxc);
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_06_LPUART1_TX, 0U);
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_07_LPUART1_RX, 0U);
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B0_11_ARM_CM7_TRACE_SWO, 0U);
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B0_06_LPUART1_TX, 0x10B0U);
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B0_07_LPUART1_RX, 0x10B0U);
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B0_11_ARM_CM7_TRACE_SWO, 0x10B1U);
}
2) trace clock enable, I find the clock_confg.c also enable it.
3) main
Add the ITM_SendChar('A');
After entering the debugger, open the SWO configuration, whether you can see the swo target speed?
If you can see the speed, it means it works. Otherwise it still have issues.
Just use the LPC-LINK2 test the helloworld, not the led_blinky.
2 Are the 3 SWD signals all that I need to get SWO Trace to work in MCUXpresso?
Answer: SWD_CLK, SWD_DAT, RESET, SWD_SWO, GND, VDD, these pins is enough.
3 Or do we need 2-wire or 4-wire SWD? I believe the RT1021 only supports 1-wire.
Answer: check point 2.
4 Do we actually need SWO for the profiler and interrupt history?
Answer: check point 1.
5 Will this work with the LPC-Link2? In the document (MCUXpresso IDE SWO Trace Guide, Rev. 11.4.1) is this note: "Note: SWO cannot be used with other CMSIS-DAP based probes or with LPC-Link2 debug probes using the non default Non Bridged (NB) or Serial (ser) firmware. Non LinkServer probes may also provide SWO trace capabilities via other software – check the vendors' websites for more details." What does this mean?
Answer: As I know, LPC-LINK2 firmware with JLINK or CMSIS DAP shoud works. which firmware you are using now? Do you try the MIMXRT1020-EVK, whether that works or not?
If yu still have issues, just kindly let me know.
About the issues, you can give me some screenshot.
Best Regards,
Kerry