Comments (2)
There are several strategies. If you need multiple (all) defined variables from .a2l file, you will prefere this method:
You can implement your own DataListener
. It can create some binary representation of the .hex file in
the memory. It can compact sequential regions in larger blocks. Have a look at class MemoryRegions
used in class RangeDetector
. These clases just calculates address ranges, but can be easilly extended to store also data.
Later you can implement lookup function on that data, that will find correct region containing that address and return required number of bytes. After that, it is easy to fill your Java model with data from HEX.
Other way is, if you need just one variable from that file. This is already implemented in my second project in C#
(https://github.com/j123b567/net-intelhex-parser), where class BinWriter
has two more parameters - input and output memory region. If you compile the latest example C#
program (I'm using MonoDevelop/XamarinStudio for this). It can be also easilly rewritten to Java. To extract 2 byte long variable at address 0x810600, you will call this from commandline
hex2bin.exe -i=0x810600:0x810601 -o=0x0000:0x0001 ASAP2_Demo_V161.hex variable.bin
Parsing .a2l file is out of the scope of this library.
from java-intelhex-parser.
Here is precompiled latest version of the utility https://github.com/j123b567/net-intelhex-parser/releases/download/v2.0/hex2bin.exe
from java-intelhex-parser.
Related Issues (4)
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 java-intelhex-parser.