Comments (7)
I make a PR #33 , add feature of any bit_length word mode (class IntelHexWord). The hex file using with word address not byte address. It not not merged for now. You can check my fork .
from intelhex import IntelHexWord
h16 = IntelHexWord('test_16bit.hex', word_length=16)
h16.write_hex_file('test_16bit.out.hex', byte_count=32)
print('{:x}'.format(h16[0x3F2132]))
from intelhex.
@xjtuecho Maybe you can use the bincopy package instead?
import bincopy
HEX = '''\
:02000004003FBB
:20213200835E3F6C09083F71FA0B3F7453F83F7814BE3F7B3AAC3F7DC46D3F7EB10F3F7FEC
:2021420000003F8000004300F98341A20FDB3D49007F00000000BF00AAABBE2AAAAB3E2A74
:0C215200AAAB3D2A88893C088889BC089B
:00000001FF
'''
bf = bincopy.BinFile(word_size_bits=16)
bf.add_ihex(HEX)
print("0x3F2132 = 0x{:04X}".format(bf[0x3F2132]))
print("0x3F2142 = 0x{:04X}".format(bf[0x3F2142]))
print("0x3F2152 = 0x{:04X}".format(bf[0x3F2152]))
The output is:
0x3F2132 = 0x835E
0x3F2142 = 0x0000
0x3F2152 = 0xAAAB
from intelhex.
Sorry for not working on your issue. I'm looking for a new maintainer for Python IntelHex project. I hope someone will help.
from intelhex.
I need file format description. Do you have any document?
from intelhex.
I believe this is docs for hex2000 with --intel option
@xjtuecho Can you confirm?
from intelhex.
I believe this is docs for hex2000 with --intel option
@xjtuecho Can you confirm?
Yes.
We created hex file from cof file with command line below:
hex2000.exe -romwidth=16 -memwidth=16 --intel -o=OUT.hex IN.out
from intelhex.
I need file format description. Do you have any document?
This is a snippet of a hex file.
:020000040032C8
:048000000072B05802
:20800200761F0006E2AF0000761F0005E8500000E2AF013CE7200008E2AF013EE694000138
:20801200AD146424E2AF003C761F0006E2AF0100E8500009761F0005E7100008E2AF013E61
:20802200E6940001AD146204063C1E3E6F1B761F0006E2AF0000761F0005E2AF013EE720D7
:2080320000087700E203003E6F0DE2AF003E761F0006E2AF0100E7100008761F0005E20396
:20804200003E0006761F0006E2AF0006E8500000E2AF0102E7200008E2AF0104E6940001BC
:20805200AD14641DE2AF0002E2AF0106E85000097700E7100008E2AF0104E6940001AD1418
:20806200620406021E046F14E2AF0006E2AF0104E72000087700E20300046F0AE2AF000441
:20807200E2AF0106E71000087700E20300040006E590761F0003E203000E761F0002E20375
:208082000026761F0002E203000E761F0003E2030010761F0002E2030028761F0002E20381
and the actual memory contents after flashing the hex file.
memrd 328000
0x328000 0072 B058 761F 0006 E2AF 0000 761F 0005
0x328008 E850 0000 E2AF 013C E720 0008 E2AF 013E
0x328010 E694 0001 AD14 6424 E2AF 003C 761F 0006
0x328018 E2AF 0100 E850 0009 761F 0005 E710 0008
0x328020 E2AF 013E E694 0001 AD14 6204 063C 1E3E
0x328028 6F1B 761F 0006 E2AF 0000 761F 0005 E2AF
0x328030 013E E720 0008 7700 E203 003E 6F0D E2AF
0x328038 003E 761F 0006 E2AF 0100 E710 0008 761F
0x328040 0005 E203 003E 0006 761F 0006 E2AF 0006
0x328048 E850 0000 E2AF 0102 E720 0008 E2AF 0104
0x328050 E694 0001 AD14 641D E2AF 0002 E2AF 0106
0x328058 E850 0009 7700 E710 0008 E2AF 0104 E694
0x328060 0001 AD14 6204 0602 1E04 6F14 E2AF 0006
0x328068 E2AF 0104 E720 0008 7700 E203 0004 6F0A
0x328070 E2AF 0004 E2AF 0106 E710 0008 7700 E203
0x328078 0004 0006 E590 761F 0003 E203 000E 761F
from intelhex.
Related Issues (20)
- TypeError while loading from TemporaryFile (Python 3) HOT 2
- hexdiff.py not working on Ubuntu 19.10 HOT 7
- The binary limitation of bin2hex is 4Kbytes. HOT 3
- Option to insert 'Extended Segment Address' record type instead of 'Extended Linear Address' HOT 6
- Starting Address record line is always the first line, but in original file it was last line HOT 11
- tostring bug when using Python 3.9 HOT 14
- Merge fails on two IntelHex16bit files... HOT 1
- A [0:0] slice will return the entire contents, when it should return a empty object HOT 1
- Array attribute HOT 2
- list(ih) causes the Python interpreter to hang up HOT 1
- Is it possible to get rid of those padding byte in list(ih)? HOT 8
- padding byte not retained in slices HOT 1
- Check two IntelHex objects equality HOT 7
- intelhex hangs on using `in` operator HOT 2
- CS:IP entry point calculation seems to be incorrect HOT 2
- Swapping of bytes HOT 2
- bin2hex.py adds extra random byte HOT 2
- Search doesn't appear to work on the readthedocs site.
- Documentation for hex2bin function is not generated.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from intelhex.