Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Luncher91/IntelHex

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IntelHex

Library to read and modify intel hex files.

Java samples

Read data

IntelHexFile hexFile = IntelHexFile.parse("helloWorld.hex");

// read four bytes starting at address 0x3218
byte[] data = hexFile.readBytes(0x3218L, 4);

// check if data is defined in hex file
if (hexFile.isDefined(0x6582L)) {
	// data has been defined by the given hex file
}

Write values

IntelHexFile hexFile = IntelHexFile.parse("helloWorld.hex");

// write some bytes
byte[] newData = new byte[]{ 0x1, 0x2, 0x3, 0x4 };
hexFile.updateBytes(0x7281L, newData);

// get hex file content
String hexFileContent = hexFile.toHexFileString();

Iterate over data

IntelHexFile hexFile = IntelHexFile.parse("helloWorld.hex");

for(Entry<Long, Byte> entry : hexFile) {
	System.out.println(entry.getKey().toString() + ": " + entry.getValue());
}

Roadmap

  • reduce direct access to the records to guarantee a consistent index
  • Serialization to JSON

About

Library to read and modify intel hex files

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.