Problem with SWO on MIMXRT1064-EVK

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem with SWO on MIMXRT1064-EVK

Jump to solution
4,573 Views
mark_callaghan
Contributor III

I am looking for help to get successful SWO support on my MIMXRT1064-EVK, using the eval board debug probe in LPC-Link2 mode as described in
 https://community.nxp.com/t5/MCUXpresso-Community-Articles/Overview-of-using-the-MIMXRT1060-4-EVK-wi... . I have not updated the LinkServer flash driver, on the assumption that my 2.8.5 SDK would be later/better. (And I have no problems in DAPLink mode)

When starting the debug session, The flash loads ok, but I get various subsequent errors, and perhaps the most indicative:

flash - system reset failed - Ee(20). No response from Line reset - target may be unpowered.
Target error from Commit Flash write: Ee(20). No response from Line reset - target may be unpowered.

I do not get such errors when debugging in DAPLink mode. But I need some form of instruction trace for my project.

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

I am using MCUXpresso 11.2.1 and SDK 2.8.5.

I have captured the output from "Debug Messages" and "RedlinkServer" consoles (attached)  if that might help.

Can you give me some pointers to get SWO working? or another instruction trace? I also have an ACP MultiLink, but I'm not sure which jumpers to remove on the MIMXRT1064-EVK in order to support an external debugger.

Cheers,

Mark

 

1 Solution
4,312 Views
mark_callaghan
Contributor III

Aha! (I have been on leave - hence the quiet time).

The example code, and my code, change the clock speed. So detecting and setting the clock speed in "SWO Trace Config" at the first breakpoint in main gives 528MHz. Soon thereafter, BOARD_BootClockRUN() changes the clock to 600MHz. 

This does not explain all my issues (some of which were probably fixed in my many attempts with fresh IDE, SDK, and project configs), but it certainly was a problem. And I can now debug with the MIMXRT1060-EVK on-board probe in LPC-Link2 mode.

View solution in original post

12 Replies
4,313 Views
mark_callaghan
Contributor III

Aha! (I have been on leave - hence the quiet time).

The example code, and my code, change the clock speed. So detecting and setting the clock speed in "SWO Trace Config" at the first breakpoint in main gives 528MHz. Soon thereafter, BOARD_BootClockRUN() changes the clock to 600MHz. 

This does not explain all my issues (some of which were probably fixed in my many attempts with fresh IDE, SDK, and project configs), but it certainly was a problem. And I can now debug with the MIMXRT1060-EVK on-board probe in LPC-Link2 mode.

4,300 Views
mark_callaghan
Contributor III

BTW: I now have SWO debug running on an MIMXRT1060-EVK. I'm not sure there aren't other issues on the MIMXRT1064-EVK I was originally using.

0 Kudos
4,279 Views
mark_callaghan
Contributor III

It seems my problem was temporarily solved. After a few successful debug runs, again I had

flash - system reset failed - Ee(20). No response from Line reset - target may be unpowered.

Setting "Reset handling" to "VECTRESET" in the LinkServer Debugger launch config seems to have got me going.

 

4,473 Views
mark_callaghan
Contributor III

I have now tried a "fresh from the box" MIMXRT1060-EVK, MCUXpresso 11.2.1, SDK 2.8.5, example project "evkmimxrt1060_lwip_httpsrv_freertos"

on-board probe in CMSIS-DAP mode works

on-board probe in LPC-Link2 fails (J42 fitted)

external LPC-Link2 fails (externally powered, J47,48,49 removed)

external PEMicro Multilink ACP works (I am yet to try SWO)

Perhaps someone from NXP support could look into the issue with LPC-Link2?

 

4,508 Views
mark_callaghan
Contributor III

Hi @ErichStyger , thanks for the demo projects. I tried your "MIMXRT1064_SWO_SDK2.6.1" and didn't get as far as my own project:

Unable to connect wire for probe index 1.
Error: Wire Ack Fault - target connected?

at com.nxp.mcuxpresso.core.debug.support.linkserver.redlink.client.RedlinkServerClient.checkServerReply(RedlinkServerClient.java:214)

>snip

at com.nxp.mcuxpresso.core.debug.support.linkserver.override.LSFinalLaunchSequence$TargetDiscoveryJob.run(LSFinalLaunchSequence.java:110)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

and

02: Failed on connect
02: Failed on connect
Could not connect to core.
31: No connection to chip's debug port
Debugging context: MIMXRT1064_SWO_SDK2.6.1 LinkServer Debug

I'm wondering about my adapter board (an old Atmel cortex thing).

4,567 Views
mark_callaghan
Contributor III

Hi @ErichStyger ,

Thanks for the pointer. I saw your article. I haven't tried another project yet. I have brought my project a fair way long using CMSIS-DAP mode, so project comparisons get a little messy. I think I have my pins & clock set appropriately. I have just tried an external probe - the PEmicro Multillink ACP, but MCUXpresso doesn't seem to find the probe. I'd like to try an external NXP LPC-Link2, but I don't have a 0.05" 10 pin to 0.1" 20 pin adaptor. Any idea where I might purchase such?


I note from my debug startup the RedllinkServer console output

HasSWV = FALSE

But my "evkrt64_noisyguts LinkServer Release.launch" has

<booleanAttribute key="internal.has_swo" value="true"/>

BTW, I enjoyed your notes on FreeRTOS task cpu usage.

Cheers,

Mark

 

4,564 Views
ErichStyger
Senior Contributor V

Hi Mark,

I hope I can find my board and time to try with the latest SDK.

As for the adapter: I have found that one very useful:

https://www.adafruit.com/product/2094

 

Erich

0 Kudos
4,570 Views
ErichStyger
Senior Contributor V

Hi @mark_callaghan ,

I got it working (see https://mcuoneclipse.com/2019/06/03/swo-with-nxp-i-mx-rt1064-evk-board/) but this was an older board and older SDK. Have not tried it with the latest SDK yet. The latest SDK should not need the changes described in this article.

Maybe this his helpful,

Erich

0 Kudos
4,557 Views
mark_callaghan
Contributor III

I have moved a little, by using an external LPC-Link 2. It seems to run - but the change has broken my application console. And I get some "target reported errors" such as

  19: Could not stop execution from running

  Wire ACK Fault in DAP access

So it's interesting that the external probe works (better) on the same build/config. I wonder if my eval board probe needs a sw update.

Some things to look at tomorrow.

0 Kudos
4,544 Views
ErichStyger
Senior Contributor V

Hi @mark_callaghan ,

ok I have tried it with the IDE 11.2.1 with my two SWO projects I have on Github (https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples/MCUXpresso/i.MX%20RT1064_EVK , attached here as well), and I can report the following:

- using an external J-Link Plus, it works without issues for both projects

- using an external LPC-Link2 it works most of the time, the other time it reports similar errors as for you. If it causes the problem, I usually get it working again with a repower of the board and the LPC-Link2. it seemed to work better with a shorter SWD cable (the J-Link worked fine with a 18 cm flat cable)

I did not use the on-board debug probe much in the past: I mostly have used the external J-Link.

I hope this helps,

Erich

0 Kudos
4,551 Views
ErichStyger
Senior Contributor V

If using an external debug probe, I recommend removing J48 and J47.

See https://mcuoneclipse.com/2018/12/28/first-steps-with-the-nxp-i-mx-rt1064-evk-board/ 

It can 'work' sometimes without, but removing the jumpers is a good thing to do.

Additionally: I recommend to power the board from the barrel connector and not with the USB cable.

I hope this helps,

Erich

0 Kudos
4,516 Views
mark_callaghan
Contributor III

Yes, I had J47 & J48 removed, and power via barrel connector. I have a 100mm cable from the 0.05" pitch LPC-Link2 JTAG/SWD connector to an adapter board onto the 20 pin 0.1" JTAG connector on the MIMXRT1064-EVK. No joy. I'll try your project(s).