3.1 Bootloader Linker Script

The bootloader library uses a custom linker (btl.ld) script generated through the MCC. The MCC generates the specified bootloader size, ROM (Read-only memory) and RAM (Random-access memory) address as highlighted in the following figure.

The values populated in the linker script are based on the bootloader component of the MCC configurations (bootloader configuration).

Configure the Linker script for the bootloader to run from the RAM to achieve the simultaneous Flash memory write and reception of the next block of data.

The bootloader request pattern must be stored in 16 Bytes of RAM on start by the application if it wants to run the bootloader at startup without any external trigger as shown in the following figure.

The bootloader size for the SAM E54 will be rounded off to the nearest erase unit size (8192 Bytes), even though the size of the bootloader is 1672 Bytes in -O1 optimization. This helps for the addition of additional features on the bootloader, and to avoid application overlap with the bootloader.

Figure 3-3. Bootloader Linker Script
Note: Users need to ensure that the memory region of the user application does not overlap with the memory region reserved for the bootloader.