Debug Custom RT1010 board from XIP

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Debug Custom RT1010 board from XIP

1,269 Views
trevorhey
Contributor II

I have a custom RT1010 board with Adesto AT25SF161. That I want to run as XIP.   I read many posts here but I cannot run/debug my application from XIP (from external SPI.). When I try debug from XIP the debugger does not stop in main it just "runs" but I can see my code is not running (simple LED blink)

  • I get error/message "Break at address "0xe2a62000" with no debug information available, or outside of program code."
  • The application runs from SRAM ok.
  • To try from XIP I simply untick "Link application to RAM" in "Managed linker Script" settings
  • My GPIO Boot fuses are "00" so I enabled the eFUSE  BT_FUSE_SEL to '1' and It is seen to be so in the SRC->SBMR2 register
  • I changed the ..flexspi_nor_config.c file as follows:

const flexspi_nor_config_t qspiflash_config = {
.memConfig =
{
.tag = FLEXSPI_CFG_BLK_TAG,
.version = FLEXSPI_CFG_BLK_VERSION,
.readSampleClksrc=kFlexSPIReadSampleClk_LoopbackFromDqsPad,
.csHoldTime = 3u,
.csSetupTime = 3u,
.sflashPadType = kSerialFlash_4Pads,
.serialClkFreq = kFlexSpiSerialClk_100MHz,
.sflashA1Size = 2u * 1024u * 1024u,
.lookupTable =
{
// Read LUTs
FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xEB, RADDR_SDR, FLEXSPI_4PAD, 0x18),
FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_4PAD, 0x06, READ_SDR, FLEXSPI_4PAD, 0x04),
},
},
.pageSize = 256u,
.sectorSize = 4u * 1024u,
.blockSize = 256u * 1024u,
.isUniformBlockSize = false,
};

0 Kudos
Reply
3 Replies

1,252 Views
crist_xu
NXP Employee
NXP Employee

hi,

     Use the SDRAM? seems that the sdram is not inited correctly. if so, you need to add a DCD.c into your

project, then compile it together.

 

Regards,

    Crist

0 Kudos
Reply

1,247 Views
trevorhey
Contributor II

Hi Crist,

 

Thanks for your reply.

 

There is no SDRAM on the design, I only want to use external SPI data flash as XIP , so boot and run from this external SPI device

 

THanks

 

Tags (1)
0 Kudos
Reply

1,233 Views
crist_xu
NXP Employee
NXP Employee

Hi,

    Have you ever replaced the flash algorithm? I found some important flash op codes from the DS:

    1) Quad I/O Read : 0xEB with 6 dummy circles and 24bit address

    2) BLOCK ERASE(4KB): 0x20

    3) Byte/Page Program(1 to 256B): 0x02 and seems that it only need to use 1 single line to 

    send the data:

crist_xu_0-1630376959814.png

    So, i think you can first check if the flash download algorithm is correct, and the image has already 

downloaded to your device by try to read something from flash when your code run in the ram.

 

Regards,

    Crist

 

0 Kudos
Reply