# srec_cat command file to dump the CRC for a code area
# Usage: srec_cat @filename
#	Hex:0xa979568d -> from 0x00840000 size Hex:0x1bfffc using crc32_WithCb
#PlatformIntegration.srec          # input file
PlatformIntegration.hex -intel          # input file
-fill 0xFF 0x00840000 0x00A00000          # fill code area with 0xff
-crop 0x00840000 0x009FFFFC               # just keep code area for CRC calculation below (CRC will be at 0x1FFFE..0x1FFFF)
-CRC32_Big_Endian 0x009FFFFC -CCITT   # calculate big endian CCITT CRC16 at given address.
-crop 0x009FFFFC 0x00A00000              # keep the CRC itself
#-Output                            # produce output
#-                                  # '-' is special 'file': use console output
#-hex-dump                          # dump in hex format
#second: add application file
PlatformIntegration.hex -intel               # input file
-fill 0xFF 0x00840000 0x009FFFFC         # fill code area with 0xff

#finally, produce the output file
-Output                            # produce output
PlatformIntegration_CodeCRC_Added.hex -intel