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.

CC1312R7: MCUBoot with configuration data in flash.

Part Number: CC1312R7
Other Parts Discussed in Thread: SYSCONFIG

Hello,

I am writing a Bootloader for CC1312R7 based on the MCUBoot and I´m wondering if NVS reserved space throught syscfg can be left outside of the flash space calculation.

My application is 100Kb in size and uses around 80 Kb of configuration data space (it has to write a lot in flash so I left a huge amount of flash space free to avoid erasing frecuently).

The thing is that I want to make a .bin file with the commands provided in the MCUBoot blink example but I dont know how to left the NVS space allocated in the syscfg out of the .bin creation or flash space calculation,

Obviously the configuration space would be outside of the images space and would be addressed to a fixed location in the applications with the NVS driver).

Kind regards Javier.

  • Hi Javier,

    I will assign this thread to an expert. They will get back to you today. 

    Regards,

    Sid

  • Hello Javier,

    when creating a NVS region in SysConfig this section will be filled with uninitialized arrays at the corresponding addresses.
    You can try this with the nvsinternal example in the SDK for CC1312R7.
    Initializing a NVS region will not show up in the linker file but will still block the linker of placing any other content in the assigned space.

    Can you please clarify which commands of the MCUBoot blink example you would like to use?

    Best regards
    Manuel

  • Hello ,I´m using:

    ${CG_TOOL_HEX} -order MS --memwidth=8 --romwidth=8 --intel -o ${ProjName}.hex ${ProjName}
    ${CG_TOOL_ROOT}/bin/tiarmobjcopy -O binary ${ProjName}.out ${ProjName}-noheader.bin
    ${COM_TI_SIMPLELINK_CC13XX_CC26XX_SDK_INSTALL_DIR}/tools/common/mcuboot/imgtool sign --header-size 0x80 --align 4 --slot-size 0x40000 --version 1.0.1 --pad-header --pad --key ${COM_TI_SIMPLELINK_CC13XX_CC26XX_SDK_INSTALL_DIR}/source/third_party/mcuboot/root-ec-p256.pem ${ProjName}-noheader.bin ${ProjName}.bin

    The idea is to create a .bin image to flash in the image space and the image will use the configuration data space so the configuration remains even if the program is updated.

  • Hello Javier,

    from what you are describing I think the best way to do this is to use one of our OAD examples as a reference.
    In these examples the MCUBoot part is constant and not updated when the rest of the software is updated.
    ns_coap_oad_offchip (ti.com)

    The described configuration data space should then be part of this region in flash that is not updated and can be implemented as an NVS region.
    When flashing the new program you just have to make sure not to flash in the region where your MCUBoot + NVS region is located.

    Best regards
    Manuel