I can jump to a user application by pressing the Quit button.
case FC_CMD_QUIT:
{
SCB_VTOR = RELOCATION_VERTOR_ADDR;
JumpToUserApplication(RELOCATION_VERTOR_ADDR);
}
break;
Or I can release the boot pin on power up
if ((cMAINT_GetVal()) && (cBOOT_GetVal()))
{
for(;;)
{
if( !FC_Communication() )
{
if( g_ucFC_State == FC_STATE_NULL)
{
uiNullCounter++;
if(uiNullCounter > 0xFFFF)
{
uiNullCounter = 0;
uiRepeatCount++;
UART_SendChar(0xFC);
}
}
}
}
}
else
{
#ifdef FLASH_LOCATION
SCB_VTOR = RELOCATION_VERTOR_ADDR;
JumpToUserApplication(RELOCATION_VERTOR_ADDR);
#endif
}
The code is the same that works with in Universal Bootloader (AN2295).
I created a bin file from a srec file (srec_cat.exe MK10.srec -o MK10.bin -binary). and I see the first line
00000000 FF FF FF FF FF FF FF FF FF FF FF FF 76 FF FF FF
then goes a zeros block and the code starts at offset
00005000 00 00 00 20 A9 FB 01 00 79 23 02 00 79 23 02 00 and so on.
Now I start to burn the srec file with the Universal Bootloader and set a break point at the first write to a flash.
And I see the burn data starts with FF FF FF FF FF FF FF FF FF FF FF FF 76 FF FF FF not with 00 00 00 20 A9 FB 01 00 79 23 02 00 79 23 02 00. Is there something I miss to understand?