Creates a Universal Hex from a collection of Intel Hex strings and their board IDs.
For the current micro:bit board versions use the values from the
microbitBoardId
enum.
An array of objects containing an Intel Hex string and the board ID associated with it.
Indicate if the Universal Hex format should be "blocks" instead of "sections". The current specification recommends using the default "sections" format as is much quicker in micro:bits with DAPLink version 0234.
A Universal Hex string.
Converts an Intel Hex string into a Hex string using the 512 byte blocks format and the Universal Hex specific record types.
The output of this function is not a fully formed Universal Hex, but one part of a Universal Hex, ready to be merged by the calling code.
More information on this "block" format: https://github.com/microbit-foundation/spec-universal-hex
Intel Hex string to convert into the custom format with 512 byte blocks and the customer records.
New Intel Hex string with the custom format.
Converts an Intel Hex string into a Hex string using custom records and aligning the content size to a 512-byte boundary.
The output of this function is not a fully formed Universal Hex, but one part of a Universal Hex, ready to be merged by the calling code.
More information on this "section" format: https://github.com/microbit-foundation/spec-universal-hex
Intel Hex string to convert into the custom format with 512 byte blocks and the customer records.
New Intel Hex string with the custom format.
Checks if the Hex string is an Intel Hex file from MakeCode for micro:bit V1.
Hex string to check
True if the hex is an Universal Hex.
Checks if the provided hex string is a Universal Hex.
Very simple test only checking for the opening Extended Linear Address and Block Start records.
The string is manually iterated as this method can be x20 faster than breaking the string into records and checking their types with the ihex functions.
Hex string to check
True if the hex is an Universal Hex.
Separates a Universal Hex into its individual Intel Hexes.
Universal Hex string with the Universal Hex.
An array of object with boardId and hex keys.
Generated using TypeDoc
Convert between standard Intel Hex strings and Universal Hex strings.
This module provides the main functionality to convert Intel Hex strings (with their respective Board IDs) into the Universal Hex format.
It can also separate a Universal Hex string into the individual Intel Hex strings that forms it.
The content here assumes familiarity with the Universal Hex Specification and the rest of this library documentation.