Hello Bill Herring,
It seems the MCUXpresso debug probe doesn't include this function about directly jump to
the offset address (eg. 0x3000) .
The reset address is 0x0000, while in your case there is no data at this memory, so debug crash.
If want to debug project directly from 0x3000, you can add some jump code at 0x00 address,
make SP = 0x3000, PC = 0x3004 .
For example add the below code in to your project (just a suggestion, maybe more complex than change start address to 0x00)
//*****************************************************************************
load these code in 0x00 address:
__attribute__ ((used, section(".isr_vector_test")))
void (* const g_pfnVectors_alice[])(void) =
&_vStackTop,
reset_alice,
};
__attribute__ ((section(".after_vectors_test")))
reset_alice()
{
jump_test(*((unsigned long*)0x3000), *((unsigned long*)(0x3000+4)));
}
__attribute__ ((section(".after_vectors_test_2")))
void jump_test(long int userSP, long int userStartup)
{
// set up stack pointer
__asm("msr msp, r0");
__asm("msr psp, r0");
// Jump to PC (r1)
__asm("mov pc, r1");
}
in linker file :
/* Define each memory region */
Flash_00 (rx) : ORIGIN = 0x0, LENGTH = 0x3000
.text_Flash2 : ALIGN(8)
{
FILL(0xff)
KEEP(*(.isr_vector_test))
KEEP(*(.after_vectors_test))
KEEP(*(.after_vectors_test_2))
} > Flash_00
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------