I am using RT1062 with custom made board. I cannot debug,
This is some of the console data,
Opening flash driver MIMXRT1060_SFDP_QSPI.cfx
Sending VECTRESET to run flash driver
Flash variant 'JEDEC_SFDP_Device' detected (16MB = 256*64K at 0x60000000)
Closing flash driver MIMXRT1060_SFDP_QSPI.cfx
Connected: was_reset=false. was_stopped=true
Awaiting telnet connection to port 3330 ...
GDB nonstop mode enabled
Opening flash driver MIMXRT1060_SFDP_QSPI.cfx (already resident)
Sending VECTRESET to run flash driver
Flash variant 'JEDEC_SFDP_Device' detected (16MB = 256*64K at 0x60000000)
Writing 13652 bytes to address 0x60002000 in Flash
Sectors written: 0, unchanged: 1, total: 1
Erased/Wrote sector 0-0 with 13652 bytes in 349msec
Closing flash driver MIMXRT1060_SFDP_QSPI.cfx
Flash Write Done
Flash Program Summary: 13652 bytes in 0.35 seconds (38.20 KB/sec)
Starting execution using system reset and halt target
Stopped (Was Reset) [Reset from Unknown]
Not sure if it is because I need to set nothing at the default Flash Driver.
I looked up the user guide, section 10.1(Starting a debug session) page number 78, the program stops at main() at xxx.c. But when I try to debug the program stops at Thread #11
Not sure why I am getting stuck in Thread.
Hi @NVazquez ,
Thanks for your effort.
Please let me know your used QSPI detail chip partnumber.
Please download this SDK code to test your QSPI flash at first in the RAM:
SDK_2_10_1_EVK-MIMXRT1060\boards\evkmimxrt1060\driver_examples\flexspi\nor\polling_transfer
Test it, whether you can finish the external flash erase, read and program operation at first.
Please also check your RT boot mode, whether it is the internal boot mode? BOOT_MODE[1:0]=10.
Any test result, just kindly let me know.
Best Regards,
kerry
The Qspi I am using is 25Q128JV.
When I tried to debug after selecting the "link application to RAM" option I was able to debug and I am transmitting something(some dots and not the correct data).
But I can't program when "Link application to RAM" is selected.
This is what I get.
Connected: was_reset=false. was_stopped=true
( 70) License Check Complete
File 'SerialCommProject.axf' load failure: Ef(11). No flash configured.
(100) Target Connection Failed
Unable to perform operation!
Command failed with exit code 1
I also had to change the size of the Flash in order to debug the code in main(), this is what I have set, I don't know if it's correct.
What should be the boot mode set to? where can I check it?
I tried using MCUboot utility I was able to read and erase the flash. I can also see in console,
Loading 'SerialCommProject.axf' ELF 0x60000000 len 0x4C6C
Opening flash driver MIMXRT1060_SFDP_QSPI.cfx (already resident)
Sending VECTRESET to run flash driver
Flash variant 'JEDEC_SFDP_Device' detected (16MB = 256*64K at 0x60000000)
Writing 19564 bytes to address 0x60000000 in Flash
1 of 1 ( 0) Writing sectors 0-0 at 0x60000000 with 19564 bytes
( 0) at 60000000: 0 bytes - 0/19564
(100) at 60000000: 65536 bytes - 65536/19564
Sectors written: 0, unchanged: 1, total: 1
Erased/Wrote sector 0-0 with 19564 bytes in 35msec
Closing flash driver MIMXRT1060_SFDP_QSPI.cfx
(100) Finished writing Flash successfully.
Flash Write Done
Loaded 0x4C6C bytes in 454ms (about 43kB/s)
Reset target (system)
Starting execution using system reset
Hi @NVazquez ,
1. Do you mean you are using :W25Q128JV
This chip is the 3.3V chip:
https://datasheet.lcsc.com/szlcsc/Winbond-Elec-W25Q128JVFIQ_C111478.pdf
So, in your RT1062, do you power on it with 3.3V?
2. About the :
SDK_2_10_1_EVK-MIMXRT1060\boards\evkmimxrt1060\driver_examples\flexspi\nor\polling_transfer
running in the internal RAM, you need to modify the LUT at first.
const uint32_t customLUT[CUSTOM_LUT_LENGTH] = {
Modify :
/* Erase Sector */
[4 * NOR_CMD_LUT_SEQ_IDX_ERASESECTOR] =
FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0xD7, kFLEXSPI_Command_RADDR_SDR, kFLEXSPI_1PAD, 0x18),
to:
/* Erase Sector */
[4 * NOR_CMD_LUT_SEQ_IDX_ERASESECTOR] =
FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x20, kFLEXSPI_Command_RADDR_SDR, kFLEXSPI_1PAD, 0x18),
Modify:
/* Enable Quad mode */
[4 * NOR_CMD_LUT_SEQ_IDX_WRITESTATUSREG] =
FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x01, kFLEXSPI_Command_WRITE_SDR, kFLEXSPI_1PAD, 0x04),
to
/* Enable Quad mode */
[4 * NOR_CMD_LUT_SEQ_IDX_WRITESTATUSREG] =
FLEXSPI_LUT_SEQ(kFLEXSPI_Command_SDR, kFLEXSPI_1PAD, 0x31, kFLEXSPI_Command_WRITE_SDR, kFLEXSPI_1PAD, 0x04),
Modify QE bit position:
#define FLASH_QUAD_ENABLE 0x40
to
#define FLASH_QUAD_ENABLE 0x02
Then test it again, and also give me your test printf result. I need to check it.
3. MCUboot utility test result is OK.
4. Please use the JLINK as the debugger, then I think you also can use the RT-UFL, you can refer to this post:
As I know, the RT-UFL can support your QSPI directly.
Any updated information, please kindly let me know.
Best Regards,
Kerry
I tried using J-link debugger, I am getting same result.
I confirmed the board I am using has QSPI chip, so "MIMXRT1060_SFDP_QSPI.cfx" is set correct.
This is what I get when I try to debug in the debug console,
Program stopped.
0x0020ed48 in ?? ()
Program received signal SIGINT, Interrupt.
0x0021a5c8 in ?? ()
Note: automatically using hardware breakpoints for read-only addresses.
Hi @NVazquez ,
Please note, MIMXRT1060_SFDP_QSPI.cfx is used for the CMSIS DAP debugger, eg, the NXP official RT1062 board is MIMXRT1060-EVK, this on board debugger is CMSIS DAP, so your mentioned .cfx is used for the CMSIS Debugger.
As I know, different debugger using the different the flash driver file, so our ULINK2 should calls your ULINK2 driver related flash driver.
So, do you have any other debugger? I suggest you use the JLINK or CMSIS DAP, as this is the normal used debugger for the RT chip. The NXP LPC-LINK2, MCU-LINK also support it.
Please also check your customer board, whether you are using the QSPI chip which is the same as teh MIMXRT1060-EVK board, or other flash chip.
Wish it helps you!
Best Regards,
kerry