Hello, I want to connect the same RT1052-based board to a J-Link probe now. I can flash it with J-Flash, it can also read the result back, so it seems to be Ok.
But I have to flash and debug it under MCUXpresso and it doesn't work at all!
Here is my log:
Executing flash operation 'Program' (Program executable into flash evkbimxrt1050_lvgl_demo_widgets.axf) - Fri Mar 03 22:30:42 CET 2023
Checking MCU info...
Scanning for targets...
Executing flash action...
SEGGER J-Link Commander V7.86 (Compiled Feb 15 2023 17:16:22)
DLL version V7.86, compiled Feb 15 2023 17:14:56
J-Link Command File read successfully.
Processing script file...
J-Link>ExitOnError 1
J-Link Commander will now exit on Error
J-Link>r
J-Link connection not established yet but required for command.
Connecting to J-Link via USB...O.K.
VTref=3.300V
Target connection not established yet but required for command.
Device "MIMXRT1052XXXXA" selected.
Connecting to target via SWD
Found SW-DP with ID 0x0BD11477
DPv0 detected
CoreSight SoC-400 or earlier
Scanning AP map to find all available APs
AP[1]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x04770041)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FD000
CPUID register: 0x411FC271. Implementer code: 0x41 (ARM)
Found Cortex-M7 r1p1, Little endian.
FPUnit: 8 code (BP) slots and 0 literal slots
CoreSight components:
ROMTbl[0] @ E00FD000
[0][0]: E00FE000 CID B105100D PID 000BB4C8 ROM Table
ROMTbl[1] @ E00FE000
[1][0]: E00FF000 CID B105100D PID 000BB4C7 ROM Table
ROMTbl[2] @ E00FF000
[2][0]: E000E000 CID B105E00D PID 000BB00C SCS-M7
[2][1]: E0001000 CID B105E00D PID 000BB002 DWT
[2][2]: E0002000 CID B105E00D PID 000BB00E FPB-M7
[2][3]: E0000000 CID B105E00D PID 000BB001 ITM
[1][1]: E0041000 CID B105900D PID 001BB975 ETM-M7
[1][2]: E0042000 CID B105900D PID 004BB906 CTI
[0][1]: E0040000 CID B105900D PID 000BB9A9 TPIU-M7
[0][2]: E0043000 CID B105F00D PID 001BB101 TSG
Cache: Separate I- and D-cache.
I-Cache L1: 32 KB, 512 Sets, 32 Bytes/Line, 2-Way
D-Cache L1: 32 KB, 256 Sets, 32 Bytes/Line, 4-Way
Memory zones:
Default Description: Default access mode
Cortex-M7 identified.
Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
ResetTarget() start
Invalid flash header detected.
Target halted on flash header read.
ResetTarget() end
AfterResetTarget() start
AfterResetTarget() end
J-Link>loadfile "E:\Workspace\evkbimxrt1050_lvgl_demo_widgets\Debug\evkbimxrt1050_lvgl_demo_widgets.hex"
'loadfile': Performing implicit reset & halt of MCU.
ResetTarget() start
Invalid flash header detected.
Target halted on flash header read.
ResetTarget() end
AfterResetTarget() start
AfterResetTarget() end
Downloading file [E:\Workspace\evkbimxrt1050_lvgl_demo_widgets\Debug\evkbimxrt1050_lvgl_demo_widgets.hex]...
****** Error: Timeout while preparing target, core does not stop. (PC = 0x2000017A, XPSR = 0x41000000, SP = 0x20000B18)!
Failed to perform RAMCode-sided Prepare()
Unspecified error -1
Script processing completed.
****** Error: Could not start CPU core. (ErrorCode: -1)
Unable to perform operation!
Command failed with exit code 1
How could I brig it ti work?
Thanks in advance!
No, problem is not solved yet, it works witn another IDE, but I want it to work with MCUXpresso. Debugging mode doesn't work with J-Link and it doesn't work with a third-party OpenSDA debugger.
I have an original board with RT1021, I can use the on-board OpenSDA debugger with RT1021, but it has the same problem if I connect this debugger to my board.
The same J-Link doesn't have any problems and can debug under SEGGER IDE, so I suppose it's not the faulty hardware.
If you can debug with Segger's IDE, I suggest you compare the J-Link logs with the ones from MCUXpresso IDE. If you identify a relevant difference and there's something to fix on our side, we'd be happy to fix it. Given that you have a custom board design, it's quite difficult to tell what's wrong with the IDE or with the HW design...
We rechecked debugging with J-Link and external MCU-Link and everything seems fine on a reference EVKB board:
Regards,
MCUXpresso IDE Support
Hi,
I have exactly the same problem with the 1052 on the embedded artists IMX OEM Carrier board rev B1.
With their 1062 module and the freertos hello world example, everything is ok. It is flashed and I can debug.
With 1052, nothing happen and I have the same error as Polarix.
If I compile the code and use segger Jflash, the code works and hello world is showing on uart.
It seems there is a problem the way the flash is communicating for reset or initiate the writing.
What can we provide to find the difference ?
Regards,
Hello @Polarix
How about first use a simple SDK demo like hello world to test, refer to "getting started " to config:
BR
Alice
Thank you for your reply, I have already used a simplest firmware with a blinking LED, it works only as RAM-target application, so it doesn't clear anything.
And one more thing: I could write it from MCUXpresso (v.11.6) with a J-Link debugger, but it was not possible to do it with MCU-Link, it doesn't write anything. After upgrading to MCUXpresso v.11.7 with corresponding MCU-Link version it doesn't do anythin at all. J-Link doesn't work anymore either.
But I can use it with an original J-Flash software.
I'm going to share my solution here for those still looking for an answer.
I had the exact same problem as the two other guys. same error log as Polarix, even if just trying to erase the flash. I wanted to connect an MIMXRT1052-based board to J-Link probes. Worked in other IDE but not MCUXpresso.
For some reason, and I have no idea why, we found that J-Link Software v7.6.8c is the most current version that works with the MIMXRT1052/MIMXRT1062. After installing v7.6.8 you will need to point to the older JLinkGDBServer.exe, usually located at C:\Program Files (x86)\SEGGER\JLink\JLinkGDBServer.exe (I deleted the more current version of J-Link Software that I had installed - when I went to debug it asked me for the new location of the JLinkGDBServer). Now works.
On a related note we also figured out how to configure the SRAM in software without permanently writing eFuses (we were doing this to optimize our firmware but I was also increasing DTC while flash wasn't working). The link below has a reply by Victor that is 100% correct - just don't forget his follow-up post about when modifying the FlexRAM, you also need to change the BOARD_ConfigMPU to match these new configurations.
I suggest you use the latest versions of the tools instead of mixing potentially incompatible components. In a parallel thread you opened, I already offered the link to the blog post that describes the issue you see with MCU-Link.
Regarding the flash programming issue, we've just verified the use case on our side. We confirm that "lvgl_demo_widgets" from SDK 2.13 is correctly programmed and executed afterwards on an IMXRT1050EVKB board. We used IDE v11.7.0 with J-Link and external MCU-Link.
Do you have a custom board design with the RT1052 device?
Regards,
MCUXpresso IDE Support
Hello,
I have used SEGGER Embedded Studio with J-Link and it does the job. So I suppose, that the hardware is Ok and the problem is the MCUXpresso.
I'm glad you found a setup that's working for you. For future references, I'd like to mention that there's a helpful post related to actual design considerations from a debug perspective - see [1].
Moreover, it would be useful to have a look on the EVKB board schematics, as a reference. Note that some JTAG signals (e.g. TDI) are also connected to other signals, like user LEDs. This affects debugging with some probes, MCU-Link included.
Regards,
MCUXpresso IDE Support
[1] https://community.nxp.com/t5/LPCXpresso-IDE-FAQs/Design-Considerations-for-Debug/m-p/469565
Thank you for your reply. I was able to take a small step forward, I have reactivated the RT1052 with flexspi_nor_polling_transfer, now I can at least write it again.
I don't use MCU-Link anymore, I have another DAP debugger, so I'm trying to use it or to use J-Link. I can write the compiled firmware to RAM and debug/execute it without problems. But if I flash it to NOR-Flash (I have a custom board) debugging session goes broken:
What could be wrong here?
I have tested it by reading the flash with J-Link, it seems to be flashed correctly.
have you remap dtcm or itcm ?