You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I'm trying to parse some .a2l and .hex files to extract variables and their values. So far l don't know how to find the values of the variables in the .hex file. Here is a link (https://wiki.asam.net/display/STANDARDS/ASAM+CDF#ASAMCDF-Downloads) to download an example of these files. To be more specific : How can I read the value at the address 0x810600 in the .hex file ?
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
Hello,
I'm trying to parse some .a2l and .hex files to extract variables and their values. So far l don't know how to find the values of the variables in the .hex file. Here is a link (https://wiki.asam.net/display/STANDARDS/ASAM+CDF#ASAMCDF-Downloads) to download an example of these files. To be more specific : How can I read the value at the address 0x810600 in the .hex file ?
The text was updated successfully, but these errors were encountered: