meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Last revisionBoth sides next revision
sw:srecord [2017/09/18 12:43] – created niziaksw:srecord [2019/02/22 13:49] niziak
Line 10: Line 10:
 </code> </code>
  
 +====== Crop ======
 +
 +Cut block of data in middle of input, and output it from offset zero. NOTE: offset parameter is negative
 +<code bash>
 +srec_cat $@.org -Bin -crop $(BOOTINFO_OFFSET) $$(($(BOOTINFO_OFFSET) + $(BOOTINFO_LEN))) \
 +      -offset -$(BOOTINFO_OFFSET) \
 +      -Output $@.bi -Bin
 +</code>
 +
 +
 +====== CRC16 ======
 +
 +Make CRC16 Kermit over some subblock of code and insert calculated value at specified offset:
 +<code bash>
 +srec_cat $@.org -Bin -crop $(BOOTINFO_OFFSET) $$(($(BOOTINFO_OFFSET) + $(BOOTINFO_LEN))) \
 +                     -Little_Endian_CRC16 $(BOOTINFO_CRC_OFFSET) -XMODEM -Least_To_Most \
 +      -crop $(BOOTINFO_CRC_OFFSET) $$(($(BOOTINFO_CRC_OFFSET) + $(BOOTINFO_CRC_SIZE))) \
 +         $@.org -Bin -exclude $(BOOTINFO_CRC_OFFSET) $$(($(BOOTINFO_CRC_OFFSET) + $(BOOTINFO_CRC_SIZE))) \
 +         -Output $@ -Bin
 +</code>
 +
 +<code bash>
 +srec_cat $@.org -Bin -crop $(BOOTINFO_OFFSET) $$(($(BOOTINFO_OFFSET) + $(BOOTINFO_LEN))) \
 +                -Big_Endian_CRC16 $(BOOTINFO_CRC_OFFSET) \
 +                -crop $(BOOTINFO_CRC_OFFSET) $$(($(BOOTINFO_CRC_OFFSET) + $(BOOTINFO_CRC_SIZE))) \
 +                -Output - -hex-dump
 +</code>