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.

CC2340R5: About OAD image header

Part Number: CC2340R5

Hello.

I'm trying to implement an on-chip OAD.
After looking at the manual's MCUBoot OAD Image Header and Post-Build Script imgtool, I understand that it is necessary to determine the image header version at build time.

In the example, the version is set using CCS settings as shown below.

${CG_TOOL_ROOT}/bin/tiarmobjcopy ${ProjName}.out --output-target binary ${ProjName}.bin --remove-section=.ccfg
${COM_TI_SIMPLELINK_LOWPOWER_F3_SDK_INSTALL_DIR}/tools/common/mcuboot/imgtool sign --header-size 0x100 --align 4 --slot-size 0x4C000 --version 1.0.0 --pad-header --key  ${COM_TI_SIMPLELINK_LOWPOWER_F3_SDK_INSTALL_DIR}/source/ third_party/mcuboot/root-ec-p256.pem ${ProjName}.bin ${ProjName}.bin

My question is regarding how to determine --version.
I couldn't find any detailed documentation, is there anything I should be careful about?
For example, will OAD work correctly when updating from 1.0.0 to 1.0.1 and from 1.0.0 to 2.0.0?

  • Hi Kei,

    Thanks for reaching out! Could you share what specific example you are working with as well as the SDK version so I can better support you?

    My recommendation would be to take a look at the BLE-Stack OAD Profile section of the BLE5-Stack User's Guide. A look through the OAD Service section should point you to the "Get Software Version Command" which may be applicable to your application. 

    For example, will OAD work correctly when updating from 1.0.0 to 1.0.1 and from 1.0.0 to 2.0.0?

    You should not have any issues with OAD functioning correctly when updating but let me know if you do run into any errors when you begin working through this!

    Best regards,

    Luke

  • Hello Luke.

    The sample is based on basic_ble_oad_onchip.
    The SDK is using 7.20.01.10, but will be migrated to 7.40.00.64 soon.
    I checked "Get Software Version Command". This is a command that is only used by a Distributor, but is it recommended?

    I'll check to see if there are any errors.
    By the way, I think that you basically update the version when it is released, but if you do not update from 1.0.0, is it possible in principle to update using OAD?

  • Kei, 

    Thanks for providing that info! For your use case, there should be no issue in using that command and I am not aware of another simple method of obtaining the software version otherwise. 

    is it possible in principle to update using OAD?

    Yes, it should update when released but should still be possible using OAD if not. My recommendation would be to ensure the version is updated however.

    Thanks,

    Luke

  • Thank you, Luke

    I'm sorry, but I still don't understand and would like to know more. I've organized my questions.

    ・Which version of MCU Boot, persistent APP, or User APP does the software version that can be obtained with Get Software Version Response refer to?

    ・How can I obtain the MCU Boot software version? Specifically, it refers to ih_ver in Table 31. Description of the core image headern. MCU Boot may be updated every time the SDK is updated, so we would like to be able to obtain it.

    ・What do you specify with --version?

    - If I perform an OAD update on a --version 1.0.0 device with a --version 1.0.0 bin, will it succeed?

    - If I perform an OAD update on a --version 2.0.0 device with a --version 1.0.0 bin, will it succeed?

    Thanks,

  • Kei,

    I am going to look over all of your questions and also loop in others from my team who may have more expertise here. We will likely get back to you after the weekend.

    Thanks,

    Luke

  • Kei,

    The Get Software Version Response gets you the User Application version as it is the only one being updated without re-flashing the entire device. 

    As you somewhat mentioned, the MCU Boot software version is tied with the SDK version so you should know/set the version when you update the SDK, and image header. 

    For your last two questions, are you asking about trying to downgrade to an older version of your application or revert back if you run into bugs?

    Thanks,

    Luke

  • Thank you, Luke

    ・Which version of MCU Boot, persistent APP, or User APP does the software version that can be obtained with Get Software Version Response refer to?
    →Luke said : The Get Software Version Response gets you the User Application version as it is the only one being updated without re-flashing the entire device.
    →I understand that it is possible to obtain the version of the user application.

    ・How can I obtain the MCU Boot software version? Specifically, it refers to ih_ver in Table 31. Description of the core image headern. MCU Boot may be updated every time the SDK is updated, so we would like to be able to obtain it .
    →Luke said : As you somewhat mentioned, the MCU Boot software version is tied with the SDK version so you should know/set the version when you update the SDK, and image header.
    →I understand that it is necessary to record the version when updating the SDK because it is not possible to obtain the MCU Boot software version from outside via communication.

    ・What do you specify with --version?
    → I understand that you specify the version of the user application.

    - If I perform an OAD update on a --version 1.0.0 device with a --version 1.0.0 bin, will it succeed?
    - If I perform an OAD update on a --version 2.0.0 device with a --version 1.0.0 bin, will it succeed?
    →Luke said : For your last two questions, are you asking about trying to downgrade to an older version of your application or revert back if you run into bugs?
    →Yes. I would like to know if it is possible to downgrade at all and if it is possible to update with the same software version.

  • Kei,

    It sounds like we were able to clear up most of your questions in regard to the versions of the various parts of the application.

    It should be possible to downgrade to an older version of the application as there is not any direct comparison mechanism to ensure the new software version is actually higher than the one currently in use. It should "update/upgrade" to whatever version designated with the bin file regardless of the current version.

    Best regards,

    Luke