C++ Intel Hex Parser, a utility to read executables in the Intel Hex Format. This repository was forked from bstrysko/IntelHexParser and modified to add support for Record Type 4, fix various bugs, add accessor (IntelHexFile::getProgramData) to raw entries to avoid populating entire address space (as the original IntelHexFile::getProgram does).
git clone https://github.com/sivertism/ihex-parser.git
cd ihex-parser
mkdir build
cd build
cmake ..
make
sudo make installTo test that it works, you can run the example app to print the contents of a hex file
./apps/example <path/to/a/.hex/file>It should print out the start address and data content of each type 0 entry.
Add the following to your CMakeLists.txt file:
find_package(ihex-parser REQUIRED)
# ...
target_link_libraries(myProject ... IntelHexParser::ihex-parser)Include the header in your source .cpp file:
#include <ihex-parser/IntelHexFile.hpp>// ...
IntelHexFile file("path/to/file.hex");
auto programData = file.getProgramData();
// ...See apps/main.cpp for more details.