I have the following script for srec_cat. My goal is to insert two constants into known locations in a .srec file:
srcfile.srec
# carve a hole for and insert crc byte count
-exclude 0x43c8 0x43cc
-generate 0x43c8 0x43cc -constant-l-e 0x8e2c 4
# carve a hole for and insert crc expected value
-exclude 0x43cc 0x43d0
-generate 0x43cc 0x43d0 -constant-l-e 0x194fa71a 4
# output into new file
-o dstfile.srec
If I comment out either half, the script works without error. But with both present, I get the message:
srec_cat: generate repeat data: multiple 0x000043CC values (previous = 0x00, this one = 0x1A)
I could write out an intermediate file and process it to insert the second constant, but that seems rather heavy handed. Save me from such a hack! :)
I think you need brackets as mentioned in man
srec_examples:In your case: