Thanks, would that be done just by linking the program to run from RAM? How do you get the MCU to skip over the ROM code at the start?
In any case, I've made some more progress. I was never able to find where the configuration of the internal flash took place and assumed the tool did it automatically. When I looked closer at the demo projects I noticed that there was a file that looked like it configured the flash:
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 = 4u * 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 = 64u * 1024u,
.isUniformBlockSize = false,
};
When I included that I can get my hello world to run fine, sometimes.
Now I seem to have an interesting problem where I need to run the debug configuration twice to get an update. The first click erases flash and then ends up in the serial loader ROM region, the second run is able to program flash and executes the hello world, but seems to skip over all the breakpoints I have set in main.