Skip to content

Latest commit

 

History

History
48 lines (36 loc) · 1.63 KB

README.md

File metadata and controls

48 lines (36 loc) · 1.63 KB

str2ihex - Convert character-coded numbers to the Intel HEX format.

Dependencies

Termins

Character-coded number - number represented as string of chars, e.g.:

  • "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.

Description

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.

Examples

  1. 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)

  1. 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)