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.

How to force CCS to fill all Intel hex entries with 0xFFs?



I have a Intel hex file that generates 32 bytes per line with a checksum at the end.

I have placed 'fill=0xFFFF' in the linker file and that fills all blank memory addresses for Flash that isn't used by the application.  The problem is, when there is an entry that is used by an application that is not 32 bytes per line, let's say it is only 20 bytes per line, it doesn't fill the remaining 12 bytes with 0xFF.  It just calculates the checksum for just 20 bytes.  But I want all lines or entries to be 32 bytes, even if some of the bytes are not used by the application, and presumed to  be 0xFF, then fill those with 0xFF and calculate the checksum with the dummy entries as well.


how can i force CCS to do this because it isn't doing this?  I need to do this because I would like to run a CRC across the internal RAM based on input parameters of start address and length and compare against a file.  The CRC will fail since the comparison is going to include empty or blank entries but the file does not include these entries.

Thanks

  • There is no need to force anything. You can calculate CRC on multiple memory segments, specified by address and length. And not used memory (outside segments) will be skipped, not included in CRC calculation.
  • I understand that.  But what I'm trying to do is to not have overhead.  Basically, the MSP will be told a start address and a length to go calculate CRC internally.  It comes back with a CRC-CCIT 16 bit value.


    I will provide a value to the MSP to compare against. But offline, I need the file to mapped exactly 1:1 to the internal memory of the MSP.  Since the hex file is not filling in the FFs, I have to do that manually and I don't like doing that.  I want to have a 1:1 file so that the CRC would be the same.  If the FFs were missing in the file, the CRC calculation would be wrong. 
    Then I would have to get fancy and tell MSP to skip certain addresses, etc.etc. thereby increasing overhead and processing.  I would rather just CRC the entire flash segment and then compare it against the offline file segment.  So i"m trying to figure out how to get CCS to generate me the entire flash segment to intel hex and fill all blank and empty memory spaces with 0xFFs.  It's not doing that. 


    But surprisingly, the TI-TXT format is doing that.

  • my mistake, it seems the Intel Hex is creating non-specific length for each line.

**Attention** This is a public forum