Hi
I have followed the guide on:
https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/Reallocating-the-FlexRAM/ta-p/1117649
And read a lot of post on this forum. But I can still not find anyone with a problem like the one I got.
I got a custom board with a RT1064DVL6. Using a J-link debugger on the SWD I/F. Boot config is configured by external resistors to boot on internal flash.
I want to maximize the amount of DTCM, and just a little ITCM and no extra OCM.
The fist attempt worked 100%. I committed the code, and the next day nothing worked. I verified the memory areas in the debugger, and all was OK. At that time I did NOT change the reference in XIP to ResetISR(). But it still worked.
The symptoms are following: The code does not run to main when debugging. When asking the debugger not to run to main, it does not start at ResetISR() as normal. If I look at the PC it reads something like 0x21aac8 (Part of the ROM code?)
If I manually change the PC to 0x70002350 = ResetISR, the application starts and runs perfectly.
If I compare the first 0x2000 bytes in the hexfile from a working application with the faulty one, it only differs on the changed reference to ResetISR() in the image_vector_table.
I can reload a backup of the memory layout to the project file, and the debugger runs perfectly to main().
Any hints?
Question: It seems odd to change the reference in image_vector_table from a pointer to an array (g_pfnVectors) to a pointer to a function. And why does the changed memory layout for the FlexRAM needs this change? If I omit this change the code end up in a really bad state where all the CPU registers is "0xdeadbeef". Today!!! but not yesterday as described at the top.
Regards Kasper