That has something to do with your clocks probably. Its not enabled or not engaged during register access.
For instance for FLEXIO in MIMXRT: CLOCK_EnableClock(s_flexioClocks[FLEXIO_SPI_GetInstance(base)]);
Nothing in the debug tools will be setting up your external RAM.
So if you stop at ResetISR() and don't then step through your code (until you reach main), then you haven't actually determined what your startup code may or may not be doing.
But fundamentally something in your code needs to be setting up the external memory controller and RAM. You need to determine what that code is, and whether it is being run for both a Debug and a Release build.
Regards,
MCUXpresso IDE Support
Debugging (when using the memory viewer) already stops before executing the startup code.
So the startup code should not be relevant.
Also the startup code does not differ depending on debug symbols because I use one build configuration. In that build configuration I only change the "Optimize" setting. So nothing changes to the defined symbols, or other settings.
I search which lines of code must be optimized, so that a debug crash is prevented.
Now I can set for the complete project optimize off, only for one line code I have added pragma's, as below:
With the above added pragma's the debugger does not crash anymore. For me it works, but I still found it very strange. If you have any ideas, I would like to know.
Regards,
Guus
Is the memory at 0x1D000040 actually enabled correctly? Does it support a halfword access?
Where is the code you are executing running from?
Can you successfully view the memory using the Memory view?
Regards,
MCUXpresso IDE Support
So I would guess that there is some difference in the actions taking place in your application's startup code before you reach the default breakpoint on main().
Try changing the default breakpoint so that you instead stop in the startup code (probably at the symbol ResetISR in the startup file). Then try stepping through both the Debug and Release builds and try to spot a difference in what your code is doing. It is possible, for instance, that you have some conditional code somewhere (based on the DEBUG / NDEBUG symbols).
Section 10.3.2, "Controlling the initial breakpoint (on main)" in the MCUXpresso IDE v10.1.0 User Guide covers how to change the default breakpoint.
Regards,
MCUXpresso IDE Support
I have set a breakpoint at the first line of code of the function ResetISR.
Still the same happens as described in my previous message.
So, if no code has run, the fault will probably not be in the software code.
Also we have never had these issues before with older versions of LPCxpresso.
Only with new versions of LPCxpresso and MCUXpresso we have this problem.
Can the optimize setting also influence the way debugging is performed?
Can it be a debug setting?