SWO ITM Debug on MCUXpresso and J-Link does not seem to work

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

SWO ITM Debug on MCUXpresso and J-Link does not seem to work

跳至解决方案
2,422 次查看
Hat
Contributor II

Could you point me to some documentation that describes what needs to be done to get the SWO debug "printf" to work over ITM. 

I've been trying to get his working and have tried to follow these but to no success.

 

Guides already looked at.

https://mcuxpresso.nxp.com/api_doc/dev/766/group__SWO.html

https://community.nxp.com/t5/MCUXpresso-Community-Articles/Overview-of-using-the-MIMXRT1060-4-EVK-wi...

0 项奖励
回复
1 解答
2,364 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi,

I set the Trace clock just like you. It can work. After update code in configure tool, don't forget to enable the Trace clock. When debug, user should set clock speed to 24M manually.

jingpan_0-1617957342254.png

 

Regards,

Jing

 

 

在原帖中查看解决方案

0 项奖励
回复
3 回复数
2,418 次查看
ErichStyger
Specialist I

Is it for the i.MX RT1064?

Maybe this one helps:

https://mcuoneclipse.com/2019/06/03/swo-with-nxp-i-mx-rt1064-evk-board/

 

Erich

0 项奖励
回复
2,400 次查看
Hat
Contributor II

Sorry, yeah it is for an i.MX RT1064.

During my workflow I would prefer to be able to use the SDK Config Tools so that I can generate the peripherals as needed, and overwriting the custom changes does break the SWO. 

Having these settings seem to produce the same divider and mux values as in the blogpost. I did have to choose PLL2 Bypass clock selector. This produces a 24Mhz Clock. 

Hat_0-1617274192364.png

which is confirmed by the RM.

Hat_1-1617274710772.png  Hat_2-1617274765218.png

 

However the PLL2 Bypass is breaking the SWO functionality.

Commenting out the 

```CLOCK_SetPllBypass(CCM_ANALOG, kCLOCK_PllSys, 1);``` line makes the SWO work again.

 

Choosing the "PLL2 PFD1 output" instead of "PLL2 Bypass clock selector output" produces an error in the config tools as the final clock frequency is at 528 Mhz and is over the 132Mhz limit for the TRACE_CLK_ROOT.

Hat_0-1617705163261.png

 

Hat_1-1617705193306.png

 

 

Is there a way to make the SWO setup compatible with the Config Tools? Or any settings in the Config Tools?

标记 (1)
0 项奖励
回复
2,365 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi,

I set the Trace clock just like you. It can work. After update code in configure tool, don't forget to enable the Trace clock. When debug, user should set clock speed to 24M manually.

jingpan_0-1617957342254.png

 

Regards,

Jing

 

 

0 项奖励
回复