Lines Matching +full:write +full:- +full:command

5 # SPDX-License-Identifier: Apache-2.0
10 # -i in_file.bin -o out_file.bin
11 # [-chip <name>] [-v]
61 INVALID_INPUT = -1
75 :param esiost_args: the object representing the command line arguments.
101 :param esiost_args: the object representing the command line arguments.
103 :returns: output file path object, or -1 if fails
110 exit_with_failure("Define input file, using -i flag")
148 :param esiost_args: the object representing the command line arguments.
160 :param esiost_args: the object representing the command line arguments.
170 output_file.write(anchor_hex)
172 print(f'- HDR - FW Header ANCHOR - Offset '
173 f'{HDR_ANCHOR_OFFSET} - %s' % FW_HDR_ANCHOR)
181 :param esiost_args: the object representing the command line arguments.
243 output_file.write(start_flash_addr.to_bytes(4, "little"))
247 output_file.write(end_flash_addr.to_bytes(4, "little"))
251 output_file.write(fw_load_addr.to_bytes(4, "little"))
254 print(f'- HDR - FW load start address - Offset '
255 f'{HDR_FW_LOAD_START_ADDR_OFFSET} - '
257 print(f'- HDR - flash load start address - Offset '
258 f'{HDR_FW_FLASH_ADDR_START_LOAD_OFFSET} - '
260 print(f'- HDR - flash load end address - Offset '
261 f'{HDR_FW_FLASH_ADDR_END_LOAD_OFFSET} - '
271 :param esiost_args: the object representing the command line arguments.
300 output_file.write(fw_entry_pt.to_bytes(4, "little"))
304 print(f'- HDR - FW Entry point - Offset '
305 f'{HDR_FW_ENTRY_POINT_OFFSET} - '
309 """Computes the SHA-256 digest of a file using hashlib.
312 :return: The SHA-256 digest of the file as a bytearray.
327 :param esiost_args: the object representing the command line arguments.
335 output_file.write(fw_length.to_bytes(4, "big"))
337 print(f'- HDR - FW Length - Offset '
338 f'{HDR_FW_LENGTH_OFFSET} - '
348 :param esiost_args: the object representing the command line arguments.
361 output_file.write(hash_data)
370 :param esiost_args: the object representing the command line arguments.
378 output_file.write(FW_HDR_SEG1_START.to_bytes(4, "little"))
380 output_file.write(FW_HDR_SEG1_SIZE.to_bytes(4, "little"))
384 output_file.write(FW_HDR_SEG2_START.to_bytes(4, "little"))
386 output_file.write(FW_HDR_SEG2_SIZE.to_bytes(4, "little"))
390 output_file.write(FW_HDR_SEG3_START.to_bytes(4, "little"))
392 output_file.write(fw_length.to_bytes(4, "little"))
396 output_file.write(FW_HDR_SEG4_START.to_bytes(4, "little"))
398 output_file.write(FW_HDR_SEG4_SIZE.to_bytes(4, "little"))
410 print(f'- HDR - Segment1 start address - Offset '
411 f'{HDR_FW_SEG1_START_OFFSET} - '
413 print(f'- HDR - Segment1 size - Offset '
414 f'{HDR_FW_SEG1_SIZE_OFFSET} - '
416 print(f'- HDR - Segment2 start address - Offset '
417 f'{HDR_FW_SEG2_START_OFFSET} - '
419 print(f'- HDR - Segment2 size - Offset '
420 f'{HDR_FW_SEG2_SIZE_OFFSET} - '
422 print(f'- HDR - Segment3 start address - Offset '
423 f'{HDR_FW_SEG3_START_OFFSET} - '
425 print(f'- HDR - Segment3 size - Offset '
426 f'{HDR_FW_SEG3_SIZE_OFFSET} - '
428 print(f'- HDR - Segment4 start address - Offset '
429 f'{HDR_FW_SEG4_START_OFFSET} - '
431 print(f'- HDR - Segment4 size - Offset '
432 f'{HDR_FW_SEG4_SIZE_OFFSET} - '
441 :param esiost_args: the object representing the command line arguments.
455 :param esiost_args: the object representing the command line arguments.
471 seg1_file.write(seg1_data)
478 output_file.write(hash_data)
490 output_file.write(hash_data)
500 :param esiost_args: the object representing the command line arguments.
519 input_file_size = Path(esiost_args.input).stat().st_size - HEADER_SIZE
528 output_file.write(line)