I was trying to run NuttX RTOS on iMXRT1060_EVK board (it has an
external 8MiB QSPI Flash), but because my JLink EDU is version V8 it
doesn’t supports Cortex-M7.
Using the DAPLink drag-and-drop I can copy small nuttx firmwares
(i.e.: up to 73KB worked), but when I compile NuttX to PROTECTED Mode
it doesn’t work. Because the kernel is at the beginning of the flash
and the userspace is at offset +2MB. Then during the copy it reports
timeout.
Then I tried to use OpenOCD. I got it working for debugging, but it
doesn’t have support to flash the QSPI for NXP chips, only for
STMicro.
While searching for a solution I found this post:
https://community.nxp.com/thread/518836
“You can actually run the LPC-Link2 firmware on the onboard debug
probe of the RT1064-EVK board, in place of the default DAP-Link
firmware. For more details see:”
That points to this post:
https://community.nxp.com/community/mcuxpresso/mcuxpresso-ide/blog/2019/01/23/overview-of-using-the-mimxrt1060-evk-with-mcuxpresso-ide
Reading this PDF I discovered that if I wire the jumper J42 near the
LPC4322, the firmware will work as a native LPC-Link2, instead of a
DAPLink.
It is strange because in the User’s Guide there is nothing about this
jumper: https://www.avnet.com/opasdata/d120001/medias/docus/192/NXP-MIMXRT1060-EVK-User-Guide.PDF
And in fact it works as DFU mode:
[ 638.833516] usb 1-1: new high-speed USB device number 9 using xhci_hcd
[ 638.982422] usb 1-1: New USB device found, idVendor=1fc9,
idProduct=000c, bcdDevice= 1.00
[ 638.982428] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 638.982434] usb 1-1: Product: LPC
[ 638.982436] usb 1-1: Manufacturer: NXP
[ 638.982439] usb 1-1: SerialNumber: ABCD
$ sudo dfu-util -d 0x1fc9:0x000c -l
dfu-util 0.9
…
Found DFU: [1fc9:000c] ver=0100, devnum=9, cfg=1, intf=0, path="1-1",
alt=0, name="DFU", serial="ABCD"
But I need to find the .hdr file to implement the LPCScrypt for this
iMXRT1060 chip, like I did some time ago for LPC43:
https://acassis.wordpress.com/2017/03/28/using-lpcscrypt-to-flash-firmware-on-bambino-board/
I have a LPCXpresso54628 board here, then I thought about the idea of
using its LPC-Link2 to program the iMXRT1060. But that should be more complicated.