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.

CCS/TMS320F28377S: Filling 0xFF instead of 0x00 while creating binary file

Part Number: TMS320F28377S

Tool/software: Code Composer Studio

Hi,

I am using the below post-build command to create the binary file from out file,

"${CCE_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin.bat" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/ofd2000.exe" "${CG_TOOL_ROOT}/bin/hex2000.exe" "${CCE_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin.exe"

Is there a way to have 0xFF instead of 0x00 in the binary file generated for the unused area.

Thanks!

Chandra

  • chandra yama said:
    Is there a way to have 0xFF instead of 0x00 in the binary file generated for the unused area.

    There is no command line option, or anything similar.  

    However, ${CCE_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin.bat is a text batch file you can edit.  Here is how you can change it to make it fill unused areas with 16-bit words of 0xffff.  

    First, make a copy into another file name.  For now, call it fill.bat.  Find this line ...

    %hexcmd% -q -b -image -o %binfile% %hextmp% %outfile%

    This line invokes the hex utility.  In your case, that's hex2000.  The -image option allows you to use the --fill option to specify a fill value.  So, change that line to ...

    %hexcmd% -q -b -image --fill=0xffff -o %binfile% %hextmp% %outfile%
    

    Now, use fill.bat instead of tiobj2bin.bat.  

    Please note this solution has undergone only very minimal testing.  Test it thoroughly before using it.

    For those who consider using this solution on some other device family than C2000 ...  The width of the --fill value needs to match the word width on your CPU.  C2000 is unusual in that word width is 16-bits.  It is usually 32-bits.

    Thanks and regards,

    -George

  • Thanks  a lot George Mock .

    Its working :)

    Regards

    Chandra