I am using a RT1060 dev board with the latest version of MCUXpresso. Following the instructions from some other posts (Does debug init SDRAM for xip app on MIMXRT1052? and Overview of using the MIMXRT1050-EVK(B) with MCUXpresso IDE), I can successfully get the SDK example iled_blinky to compile and run using the SDRAM and the primary RAM.
However, if I try the same steps with my application, the application compiles and runs, but the debugger immediately stops working with the code. Interestingly, the run button is still active and hitting it again causes the program to start, but the debugger is not running. (I can tell that the application is still running based on how the board reacts to external stimulus.) Does anyone have any suggestions on what to check?
Note: if I undo all of the changes to required to convert it to run from the SDRAM, the application runs without issue.
This is the hard fault generated after hitting run:
Bus Fault (BFSR)
IMPRECISERR (2) Imprecise data bus error
Hard Fault (HFSR)
FORCED (30) Indicates a forced hard fault, generated by escalation of a fault with configurable priority that cannot be handled, either because of priority or because it is disabled
VECTTBL (1) Indicates a BusFault on a vector table read during exception processing
Fault Status Registers
IPSR 0x00000003 Exception Status Register (Hard Fault)
CFSR 0x00000400 Configurable fault Status Register
MMSR 0x00000000 Memory Manage fault Status Register
BFSR 0x00000004 Bus fault Status Register
UFSR 0x00000000 User fault Status Register
HFSR 0x40000002 Hard fault Status Register
DFSR 0x00000000 Debug fault Status Register
MMAR 0x00000000 Memory Manage fault Address Register
BFAR 0x00000000 Bus fault Address Register
ABFSR 0x00000308 Auxiliary Bus Fault Status Register
Stacked Registers (MSP LR/EXC_RETURN=0xfffffff1)