Skip to content

Utility for converting files with character-coded hexadecimal numbers to the Intel HEX format files.

License

Notifications You must be signed in to change notification settings

0xD503/str2ihex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Utility for converting files with character-coded hexadecimal numbers to the Intel HEX format files.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published