Hi,
This is kind of a continuation of the previous post (https://community.nxp.com/t5/i-MX-RT/Debug-without-blowing-efuses-setting-efuses-from-J-Link/m-p/126...).
I cannot get reliable debugging via JLink from MCUXpresso. The behaviour is as follows:
- On launching the debugger for the first time, it will open up the Jlink programming dialog for a few seconds, then it will close and the program will not run.
- The Jlink output script seems to have some errors in it and then an eventual timeout when erasing sectors
ERROR: Timeout while erasing sectors, RAMCode did not respond in time. (PC = 0x00000000, CPSR = 0x00200300, LR = 0x81000000)!
Failed to erase sectors
- On launching the debugger for the second time, it does correctly program but does have an error in it too?
Core did not halt on reset vector. Assuming faulty image.
Resetting and halting core on image verification value read.
Core did not halt after reset step 1
- When this happens, the debugger does not stop at main and seems to randomly pick a breakpoint it wants to stop at (it does successfully stop at breakpoint 3 that was set. restarting the core via MCUXpresso does stop at the first breakpoint.
When debugging, I consistently bounce between these 2 states. For example, after a failed load, the next load will always succeed (insofar as you can call that success). However, the next load will fail in one of two ways:
- If I do not change anything in the source files, the debugger gets into a weird state where it stops responding altogether and I have to disconnect / reconnect it from USB and close / reopen MCUXpresso.
- If I do change the source files, I get back into state 1 above, where the load fails due to RAMCode timeout, then the next load 'succeeds'.
This is really getting to be annoying, so far it has been 2 days and we don't have a way to reliably hook a debug session to our board.
The debugger connections are as follows:
| Schematic Pin Name | J Link Pin | Pin Name | |
| VDD_3V3 | 1 | VTref | |
| GND | 4 | GND | |
| NXP_JTAG.TMS | 7 | SWDIO | GPIO AD B0 06 |
| NXP_JTAG.TCK | 9 | SWCLK | GPIO AD B0 07 |
| NXP_JTAG.TDO | 13 | SWO | GPIO AD B0 10 |
| Solder to RST node Rt / C16 | 15 | RST | \POR / M7 |
I have also tried hooking up the RST pin from the J link to TRSTB / GPIO AD B0 11 on the NXP and that made the debugger unable to connect.
I have attached a debug launch file that I tried to use, but I have tried various settings in the launch file and they don't seem to have any effect.
e.g. both checked / unchecked versions of:


Is there something I'm missing? Can anyone confirm they have successfully used MCUXpresso and a JLink to program / debug an RT1064's internal SPI flash?
Edit: More info:
I found someone on the segger forums with the exact same issue as me, but I don't see a resultion:
https://forum.segger.com/index.php/Thread/7264-ABANDONED-Timeout-while-erasing-sectors/
I'm using a J-Link base which doesn't support external memory programming - can anyone confirm if the Jlink base works with the RT1064?
Also, for what it's worth, we're developing with the RT1064CVL5B, whereas the SDK only has the option for RT1064CVL5A, though I'm not sure what difference that would make, if any.
Thanks,
Nick