How to Create a Super Simple Bootloader, Part 3: Developing the Boot Code - check if an initial SP is loaded at the start of flash
Hi,
I had a question regarding Bruno's excellent series on creating a simple bootloader.
In part 3, there is an if statement which checks if something has in fact been loaded into the applications's flash region:
// bootloader main.c
if( ( *(uint32_t *) FLASH_APP_ADDR ) & 0x2FFE0000 ) == 0x20000000 )
{
// jump to app main...
}The logical AND operation against the dereferenced FLASH_APP_ADDR with a mask that I don't understand, should yield an initial SP.
What does 0x2FFE0000 signify?
Many thanks,
Dan
