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:简单的引导加载程序可处理2个固件映像

Guru**** 2527710 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1296805/msp432e401y-simple-bootloader-to-handle-2-firmware-images

器件型号:MSP432E401Y

尊敬的 Charles:

我的目标是使用一个非常简单的引导加载程序、它会查看特定的存储器位置、如果该寄存器为0、它将在地址 A 加载一个固件文件、如果为1、它将在地址 B 加载一个固件文件。这样、 写入操作可在应用程序运行时完成、引导加载程序只需加载两个可用映像之一。

slau746a 建议为此、您需要 根据要加载的映像的存储器地址相应地修改 APP_START_ADDRESS。 但是、我无法将该引导加载程序与任何可用的示例引导加载程序进行匹配。

您能建议示例代码的实际主入口点吗?或者一般性地建议一个如何实现所需功能的起点?

非常感谢
彼得

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Peter:

    Unknown 说:
    slau746a 建议这样做、您需要 根据要加载的映像的存储器地址相应地修改 APP_START_ADDRESS。 但是,我无法将其与任何可用的示例引导加载程序进行匹配。

    首先、APP_START_ADDRESS 在 bl_config.h 文件中定义。  请参阅以下片段。

    //*****************************************************************************
    //
    // 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

    您应该在引导加载程序示例中找到 bl_config.h 文件、例如 BOOT_SERIAL_EMAC_FLASH_MSP_EXP432E401Y_nortos_ccs。 bl_startup_ccs.s 文件中使用了 app_start_address。 如果在 C:\ti\simplelink_msp432e4_sdk_4_20_00_12\source\ti\devices\msp432e4\boot_loader 目录中搜索 app_start_address、则将找到依赖于  app_start_address 的文件。

     您能否查看此帖子以了解它是否有帮助。  

    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