- "FF" (base 16) represents number 255, because 0xFF == 255;
- "1EA" (base 16) represents number 490, because 0x1EA == 490;
- "10" (base 16) represents number 16, because 0x10 == 16;
- "10" (base 2) represents number 4, because 0b10 == 4.
Intel HEX - object file format, that conveys binary information in ASCII text form.
Utility takes an input file, consisting of strings, that represent numbers; It validates and processes input file. If validation succeeded, utility creates Intel HEX format of data that was encoded in input file.
- Convert character-coded hexadecimal data to Intel HEX:
./scripts/str2ihex.py -b 16 -i path/to/input/file.txt -o path/to/output/file.hex
Possible input file in this case would be like:
10EAFFE3
D76ACC29
01234567
1233441
ABCDEF12
Note, that all strings should have the same size (or differ in size only by 1 symbol)
- Convert character-coded binary data to Intel HEX:
./scripts/str2ihex.py -b 2 -i path/to/input/file.txt -o path/to/output/file.hex
Possible input file in this case would be like:
10011011
11111110
11111111
01111111
01111110
00000001
Note, that all strings should have the same size (or differ in size only by 1 symbol)