eerimoq / bincopy

Mangling of various file formats that conveys binary information (Motorola S-Record, Intel HEX, TI-TXT, Verilog VMEM, ELF and binary files).
MIT License
109 stars 38 forks source link

Missing option for byte width #2

Closed vprupis closed 9 years ago

vprupis commented 9 years ago

SRecord reading fails on hex files targeting devices with 16-bit bytes (such as TI Piccolo), where 4 hex digits increment address by 1. Below is a beginning of such file:

S00600004844521B
S2083E80000123ABCD9D
S2223E8002761B0005ABBDA8BDA0BDC2BDC3BDFE04FF6929425616761F002C0E01761FB8
S2223E80110227FF3D1E00761F002C0E02761F0227FF3D1E10761F002C0E03761F022702

See how 0123ABCD changes address from 3E8000 to 3E8002.

Would be nice to have a way to select byte width.

eerimoq commented 9 years ago

Added the argument word_size to the File constructor. You can use it to specify the number of bits in a word (or byte if you prefer to call it that). Also added the --word-size option to the command line tool.

It's included in version 1.1.2.