This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP432E401Y: Simple bootloader to handle 2 firmware images

Part Number: MSP432E401Y

Hi Charles,

My objective is to have a very simple bootloader which look at a specific memory position and if that register is 0, it will load a firmware file at address A, if it is 1 it will load a firmware file at address B. This way, the writing operation can be done at application runtime and the bootloader which just load one of two images available.

slau746a suggest that to do that, you need to modify APP_START_ADDRESS accordingly with the memory address of the image to be loaded. However, I was not able to match that with any of the sample bootloaders available.

Can you advise on the actual main entry point of the sample code or suggest a starting point on how to achieve the desired functionality in general?

Thank you very much
Peter

  • Hi Peter,

    slau746a suggest that to do that, you need to modify APP_START_ADDRESS accordingly with the memory address of the image to be loaded. However, I was not able to match that with any of the sample bootloaders available.

    First of all, the APP_START_ADDRESS is defined in bl_config.h file.  See below snippet.

    //*****************************************************************************
    //
    // The starting address of the application.  This must be a multiple of 1024
    // bytes (making it aligned to a page boundary).  A vector table is expected at
    // this location, and the perceived validity of the vector table (stack located
    // in SRAM, reset vector located in flash) is used as an indication of the
    // validity of the application image.
    //
    // The flash image of the boot loader must not be larger than this value.
    //
    // Depends on: None
    // Exclusive of: None
    // Requires: None
    //
    //*****************************************************************************
    #define APP_START_ADDRESS       0x00004000
    
    //*****************************************************************************
    //
    // The address at which the application locates its exception vector table.
    // This must be a multiple of 1024 bytes (making it aligned to a page
    // boundary).  Typically, an application will start with its vector table and
    // this value should be set to APP_START_ADDRESS.  This option is provided to
    // cater for applications which run from external memory which may not be
    // accessible by the NVIC (the vector table offset register is only 30 bits
    // long).
    //
    // Depends on: None
    // Exclusive of: None
    // Requires: None
    //
    //*****************************************************************************
    #define VTABLE_START_ADDRESS    0x00004000
    
    //*****************************************************************************
    //
    // The size of a single, erasable page in the flash.  This must be a power
    // of 2.
    //
    // Depends on: None
    // Exclusive of: None
    // Requires: None
    //
    //*****************************************************************************
    #define FLASH_PAGE_SIZE         0x4000

    You should find the bl_config.h file in the bootloader example such as boot_serial_emac_flash_MSP_EXP432E401Y_nortos_ccs. The APP_START_ADDRESS is used in the bl_startup_ccs.s file. If you search for APP_START_ADDRESS in the C:\ti\simplelink_msp432e4_sdk_4_20_00_12\source\ti\devices\msp432e4\boot_loader directory, you will find the files that depends on APP_START_ADDRESS.

      Can you take a look at this post to see if it is helpful. 

    https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1024278/tm4c1294ncpdt-rtos-bios-not-working/3786291?tisearch=e2e-sitesearch&keymatch=vtable%20relocate#3786291