Lines Matching full:crc
436 print(f'- HDR - FW CRC Enabled - Offset '
561 """writes the fw crc start address and the crc size to the output file.
563 --crc start address should be 4 byte aligned, bigger than crc end address
564 --crc size should be 4 byte aligned, and be set to firmware length minus
565 crc start offset by default
566 --crc end address is crc start address + crc size bytes
579 # default value for crc size
591 message = f'Firmware crc offset address ' \
596 message = f'CRC start address ({fw_crc_start_to_print}) should' \
597 f' be less or equal to CRC end address ({fw_crc_end_to_print}) \n'
601 message = f'Firmware crc size ({fw_crc_size_to_print}) ' \
606 message = f'CRC end address ({fw_crc_end_to_print}) should be less' \
621 print(f'- HDR - FW CRC Start - Offset '
625 print(f'- HDR - FW CRC End - Offset '
713 """writes the firmware header crc signature (4 bytes)
721 # calculating crc only if the header crc check is enabled
734 crc = _finalize_crc(crc_calc)
735 crc_to_write = crc.to_bytes(4, "little")
736 crc_to_print = _hex_print_format(crc)
744 print(f'- HDR - Header CRC - Offset '
749 """writes the firmware image crc signature (4 bytes)
755 # calculating crc only if the image crc check is enabled
770 crc = _finalize_crc(crc_calc)
771 crc_to_write = crc.to_bytes(4, "little")
772 crc_to_print = _hex_print_format(crc)
780 print(f'- HDR - Header CRC - Offset '
908 """helper for crc calculation"""
920 def _crc_update(cur, crc, table): argument
921 """helper for crc calculation
924 :param crc
929 tmp = crc ^ l_crc
930 crc = (crc >> 8) ^ table[(tmp & 0xff)]
931 return crc
933 def _finalize_crc(crc): argument
934 """helper for crc calculation
936 :param crc
940 current_bit = crc & (1 << j)