1.7.3 UDP Bootloader Configurations

Bootloader Specific User Configurations

For Basic Bootloader

udp_bootloader_mcc_config_basic

For Live Update Bootloader

udp_bootloader_mcc_config_live_update
  • Bootloader NVM Memory Used:

    • 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

  • Enable Bootloader Trigger From Firmware: (Basic Mode Only)

    • This Option can be used to Force Trigger bootloader from application firmware after a soft reset. It does so by reserving the specified number of bytes in SRAM from the start of the RAM. The reserved memory is updated by the application with a pre-defined pattern. The bootloader firmware in the bootloader_Trigger() routine, can check the reserved memory for the pre-defined pattern and enter bootloader mode if the pattern matches.

    • Number Of Bytes To Reserve From Start Of RAM:

      • This option adds the provided offset to RAM Start address in bootloader linker script.

      • Application firmware can store some pattern in the reserved bytes region from RAM start for bootloader to check at reset in bootloader_Trigger() function

  • Bootloader UDP Port Number:

    • Port number to be used to communicate via Unified Host Application

  • Use Dual Bank For Live Update:

    • Used to configure bootloader library to use Inactive bank of the device to upload the new application

    • This option is visible only for devices supporting Dual flash banks

    • Live Update Flash Bank Size (Bytes):

      • Specifies the size of bank in which both the bootloader and application code reside. Thisvalue by default will be half of the available Flash memory

    • Trigger Reset After Update:

      • This option can be used to trigger a Swap bank and reset immediatly after programming the application in inactive bank.

      • If not enabled, then the application code should call the bootloader_SwapAndReset() function to trigger Swap bank and reset

UDP Configurations

udp_bootloader_mcc_config_udp_stack
  • IPv4 Static Address: 102.168.1.11

    • To be used to configure Unified Host Application

  • IPv4 SubNet Mask: 255.255.255.0

  • IPv4 Default Gateway Address: 102.168.1.11

  • IPv4 Primary DNS: 102.168.1.11

Bootloader System Configurations (Basic Mode Only)

/udp_bootloader_mcc_config_basic_system
  • 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 Linker Pre Processor Macros for CORTEX-M based MCUs

  • Based on the configurations the above linker pre processor macros will be generated in MPLAB X xc32-ld settings

    • ROM_LENGTH specifies the size of the bootloader

Basic Mode

udp_bootloader_basic_linker_setting

Live Update Mode

udp_bootloader_live_update_linker_setting