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.

Compiler: Hex2000 generate S19 file with gap in data



Tool/software: TI C/C++ Compiler

Hi expert,

My customer generate S19 file in CCS using post build commend:

${CG_TOOL_HEX} -m2 "${BuildArtifactFileName}" -o "${BuildArtifactFileBaseName}.s19" -order LS -memwidth 16 -romwidth 32

But they get some gap in data like below:


Could you tell me why there is a short line (line 3093) in the code? How should I do to avoid this?

They'd like address end with some even number.

 

Sheldon

Thanks

  • There is no gap in the data.  These are all valid Motorola-S format records.  The format does not specify that the records must be aligned, or must be a certain length.  Whatever consumes these records as input should not care about the alignment or length of the records.  

    Recall that C28x devices address memory as 16-bit words, and not 8-bit bytes.  

    Line 3093 is a record for address 0x3f4130 which contains 1 16-bit word.  All the other records contain 16 16-bit words.  Line 3094 is a record for address 0x3f4131 which contains 16 16-bit words.

    While none of this is a violation of the Motorola-S format specification, I agree it is unusual for a record of length 1 word to appear.  I don't know why that happened.  I'll ask the experts about it.  

    In the meantime, I recommend you work out why whatever consumes these Motorola-S records cannot handle a record with only 1 word in it, or records that are not aligned.  That problem needs to be fixed.  Or, a different format chosen, or something like that.

    Thanks and regards,

    -George

  • What version of the C28x compiler tools (not CCS) do you use?

    Thanks and regards,

    -George

  • Hi George,

    Thanks for your help. I am using 18.1.3.LTS.
    My customer needs 16 words data in a single line for ECC check in their upper machine software and they hope the structure can be the same for ease processing.

    Sheldon
  • There is a free utility called srec_cat that has many features for combining and regenerating Srecords (and many other types of hex records). It can handle filling unused space and generating records of a desired size. I use it to relocate Srecords in memory and combine several files into one. It can be found here: srecord.sourceforge.net/ and you might find it helpful.
  • Thanks and I will have a try!