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.

CODECOMPOSER: Does Ti-ARM-CLANG supports filling the unused flash area with 0xFF data?

Part Number: CODECOMPOSER

Hi team,

I have a customer using Ti-CLANG complier for MSPM0 device, but they find the .bin/.hex/.txt will have some no data flash areas, which makes their OTA function abnormal. Below is the details description.

With current complier grammar, when there is no data at the segment end address, it will end directly instead of filling it with FF data. This caused the customer to fail to identify this piece of empty data when performing an OTA upgrade, resulting in misalignment of subsequent data.

Refers to below: marked with red, it should be 0xFF data in this area, but complier output it with no data. It works well with debugger tools, such as XDS110. But for customer OTA function, they can not recongnize this area and automatically fill it with 0xFF, especially customer are converting the data from the BIN file rather than TI-TXT file and then send it out by serial port.

On the compiler side, is there a way to fill unused addresses with FF data?

B.R.

Sal

  • I'm not familiar with the details of how over the air updates work.  In particular, I do not know the format of the files that are used.  I presume that, after linking, you run one or more commands to create the files needed for OTA.  Please show me those commands.  Please copy and paste the text, and do not use a screenshot.

    Thanks and regards,

    -George

  • Hi George,

    There is no more commands to create the files for OTA.

    Customer are using their own tools to get the message from bin file, and they find the blank data results in misalignment of subsequent data.

    I show the TXT format for reference that there is a blank between two flash address. Customer are using bin file. And it comes from ARM HEX Unity:

     (BIN file)

    --memwidth=8 --romwidth=8 --diag_wrap=off --binary

    Add: I know there should be some issues of customer tools to recongnize the bin file. But customer do not know how to recongnize the blank data in bin file, so they want to know if there is any method in complier side to fill 0xFF data with blank flash address.

    B.R.

    Sal

  • The hex utility can solve your problem.  Add two options: --image and --fill=0xffffffff.

    About --image ..  This is called image mode.  It requires you to supply a ROMS directive in a hex command file.  The contents of this file will be similar to ...

    ROMS {
       all_mem: origin = 0x8000, length = 0x2000
    }

    This tells the hex utility the extent of initialized memory in your system.  Change those constants as needed.

    For further details, please see the Image Mode and the --fill Option part of the tiarmclang online manual.  

    To learn how to add a hex command file to a CCS project, please search the article Hex utility in CCS for the part titled Passing a Hex Command File.

    Thanks and regards,

    -George