Jump to main content

##

# 1.9.3 OTA Bootloader Configurations

Bootloader Specific User Configurations

OTA Bootloader Configurations - Dual Bank

OTA Bootloader Configurations - External Memory

- Bootloader OTA Memory Used:

  - Specifies the Serial memory driver/NVM Peripheral Library used by bootloader to receive the application
  - The name of the serial memory/NVM Peripheral will vary based on the driver/Peripheral Library connected to bootloader

- Bootloader NVM Memory Used: (For External Memory)

  - Specifies the memory peripheral used by bootloader to perform flash operations
  - The name of the peripheral will vary from device to device

- Bootloader Size (Bytes):

  - Specifies the maximum size of flash required by the bootloader
  - This size is calculated based on Bootloader type and Memory used
  - This size will vary from device to device and should always be aligned to device erase unit size

- Use Dual Bank For Safe Flash Update:

  - Used to configure bootloader to use Dual banks of device to upload the application
  - This option is visible only for devices supporting Dual flash banks

- Number of application image storage:

  - Specifies the Number of application image can be stored into memory by the bootloader (For dual bank : 2, For external memory : Rage 1 to 15)

Bootloader System Configurations

- Application Start Address (Hex):
  - Start address of the application which will programmed by bootloader
  - This value is filled by bootloader when its loaded which is equal to the bootloader size. It can be modified as per user need
  - This value will be used by bootloader to Jump to application at device reset

Bootloader MPLAB X Settings

- As the Serial memory/Dual Bank may not have any valid binary required by bootloader for the first time, Adding the application to be bootloaded as loadable allows MPLAB X to create a unified hex file and program both these applications in their respective memory locations
  - By doing this, At first bootup bootloader directly jumps to application as the serial memory/Dual Bank does not have any valid binary

For Cortex-M based Dual Bank Devices

- User can generate an additional inactive bank bootloader hex file through post build command in the OTA bootloader project. Then it will be used by hex_merge.py python script (refer OTA Bootloader Host Script Help) to combine unified HEX file (for Bootloader and application in active bank) and bootloader inactive bank HEX file (for Bootloader in inactive bank)

    ${MP_CC_DIR}/xc32-objcopy --change-address 0x80000 ${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.hex ${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}_inactive_bank.hex