- Bootloader reset handler is always placed at start of the Boot flash memory (0xBFC00000).
- Devices with a large enough Boot Flash memory like PIC32MZ can place all of the Bootloader within Boot Flash.
- Fitting the Bootloader within the Boot Flash memory provides the complete program Flash memory for the user application
- For PIC32MZ devices, with two 80 KB Boot Flash panels, the Bootloader may or may not fit entirely in one Boot Flash panel.
- In order to fit some of the Bootloaders, the linker script makes the two Boot Flash panels look like one contiguous Boot Flash memory. Unimplemented areas are blocked using a fill command to the linker.
- In the case of Bootloaders that exceed the size of boot Flash memory like PIC32MX and PIC32MK, the Bootloader is split into two parts:
- For devices with 3 KB of Boot Flash, only the reset handler is placed in Boot Flash, with the Interrupt Vector Table (IVT) and bootloader code is placed in Program Flash starting from (0x9D000000)
- For devices with 12 KB of Boot Flash, the Interrupt Vector Table (IVT) and the reset hanlder are placed in Boot Flash, and the remaining portion of the Bootloader is placed inside the Program Flash starting from (0x9D000000)
- The application code can be placed anywhere in the program flash memory. In devices where bootloader also resides in program flash memory, the application code should be placed after bootloader end.
- As the Bootloader code requires the application start address to be mentioned at compile time, it should match in both the application and bootloader
The Boot Flash and Program Flash memory end addresses may vary from device to device. Refer to respective Data sheets for details of Flash memory layout.