Sorry if this appears to be a double post. Originally, this was posted as a reply to a thread that was marked as resolved, so I was afraid that it wouldn't be looked at again.
After reading the RM, I am still confused on exactly where, and what should be in the SPI for booting from it.
Reading 26.1.7.6.3, it says :
--------------------------------------------------------------
1. Read Sector 1, Check the address: 0x0
2. Read Sector 2, Check the address: 0x200
3. Read Sector 3, Check the address: 0x400
4. Read Sector 4, Check the address: 0x600
The addresses mentioned above should contain the image size. If the value of the addresses mentioned
above is neither 0x0 nor 0xFFFFFFFF, then the boot will proceed else it will move to the next sector. If no
image is found after checking four sectors, the ROM bootloader will move to the next device.
--------------------------------------------------------
I have these questions.
1) Does the beginning of ALL of these sectors (0,1,2,3 - addresses 0x0000000, 0x000200, 0x000400, 0x000600 respectively) contain the image size ?
1a) If the starting bytes of ALL of these sectors have the image size, can the other bytes in that sector be used for something else ?
2) How many bytes is the image size ? 3 bytes or 4 bytes ?
3) Is the image size stored in Little Endian format or Big Endian format? I assume Big Endian.
4) Where is the "First" byte of the image locationed ? First byte of sector 4 ?
5) Is there more information needed by the bootloader ? Is there a "header" file as someone mentioned ? If so, what's it's format, and where is it located ?
6) Is there a CRC or other memory check that is stored with the image ? If so, where is it located ? What method ? CRC32, other ?
7) Does the bootloader verify the image from a safe area (ROM) before code execution is started in RAM ?