Hi,
I'm using the MIMRX1160-EVK to run a dual-core application.
Previously, I uploaded the CM4 firmware to external RAM (0x80000000) using an external JLink EDU and CM7 would boot CM4 from there (using MCMGR). I've followed the instructions of this post. There were no problems at all doing this and debugging both CM7 and CM4 cores simultaneously using the MCUXpresso IDE.
Due to a project restriction, I need to move the CM4 firmware back to its original ITCM memory (0x20200000), as most of the SDK examples do. Unfortunately, I'm unable to do this using the external JLink. I've checked numerous memory/linker configurations, and they all seem to be correct. To confirm this, I attempted to debug this dual-core project using the NXP LinkServer (USB cable), and it worked perfectly. In other words, there are no issues with my memory/linker settings.
I've tried following the steps presented in [link] to debug my dual-core app using an external JLink, but it just doesn't seem to work. Additionally, it doesn't seem practical to perform those steps every time I want to debug this app (e.g., step 6 - disabling the "attach to a running target" flag every debug session). I simply want to follow the same steps I was using when running CM4 in BOARD RAM: clicking the Debug button on the CM7 project, which would also boot the CM4 project, allowing me to debug both cores simultaneously using the "dual-core" buttons (Resume All Debug Sessions, Suspend All Debug Sessions, etc.).
Can anyone help me with this?
Solved! Go to Solution.
After some research and lots of tests, I've managed to get my RT1160 MCU debugging through J-Link.
The NXP tutorial forgets to mention that you need to uncheck the "Enable auto-debug secondary project(s) for multicore project" checkbox inside the MCUXpresso IDE (“Window” → “Preferences” → “MCUXpresso IDE” → “Debug Options” → “J-Link Options”). After unchecking this option, I was able to debug the CM7 project first, then wait for its debug instance to be ready, and finally debug CM4 project. Now both cores can be debugged simultaneously.
After some research and lots of tests, I've managed to get my RT1160 MCU debugging through J-Link.
The NXP tutorial forgets to mention that you need to uncheck the "Enable auto-debug secondary project(s) for multicore project" checkbox inside the MCUXpresso IDE (“Window” → “Preferences” → “MCUXpresso IDE” → “Debug Options” → “J-Link Options”). After unchecking this option, I was able to debug the CM7 project first, then wait for its debug instance to be ready, and finally debug CM4 project. Now both cores can be debugged simultaneously.
@Omar_Anguiano Hello, do you have any news on this? I would appriciate some help from NXP, like a comprehensive step-by-step tutorial or something like that.
BTW, I can see that my firmware is uploaded inside the MCU. After debug fails, I reset the EVK board and I can see that my firmware is running on it, but I still can't debug it using JLink.
Unfortunately, there is a limitation for debugging multicore on Jlink so the steps on the link attached need to be followed.
Which version of Jlink are you using? Is the jlink script used located on the most recent SDK version?
Best regards,
Omar
Hi Omar,
I'm using J-Link EDU.
I'm using the script evkmimxrt1160_connect_cm4_cm4side.jlinkscript from SDK v2.13.0 (2023-01-28 version).
The steps in the mentioned tutorial are not clear to me, especially steps 6 and 7. Debugging two projects simultaneously, as the tutorial suggests (first debugging CM7, then switching to CM4 and debugging again), is not working for me, as the IDE pops an error "There is already a debug session running".
It's strange that I had no problems debugging the MIMRX1160-EVK board through this J-Link when the CM4 firmware was uploaded to external RAM. Could you assist me with this?
For JLink debugger, un-populate J5-J8.
It is important that the checkbox "attach to a running target" is clear. When starting the debug session for CM7 you need to make sure that the checkbox for the MC4 configuration is clear.
Once CM7 is on, you could use the function of attach to target or click
Best regards,
Omar
Hi Omar,
I'm still having trouble with this issue. I've already removed jumpers J5 and J8.
These are the steps that I'm doing:
What do you mean by "Once CM7 is on, you could use the function of attach to target or click"? If I start a debug session in CM7, I can't start another one in CM4 as I get the error "There is already a running debug session for the launch configuration".