Follow-up of #5. Now that we can "slice" the UICR out of a merged set of parsed .hex files, it's time to be able to check if a devkit already has those bytes (and thus know if any updates are needed). In other words, this PR enables doing something like this:
let uicrFromHexFiles = hexMemMap.slice(uicrStartAddr, 256);
if ( devkitMemMap.contains(uicrFromHexFiles) ) {
// UICR doesn't have to be updated
} else {
// UICR needs to be erased
}
Implementing some unit tests for contains() also uncovered a bug (typo in variable name) in slice(). Unit tests moved to the right file, added unit test for the uncovered bug, and for contains().
Follow-up of #5. Now that we can "slice" the UICR out of a merged set of parsed .hex files, it's time to be able to check if a devkit already has those bytes (and thus know if any updates are needed). In other words, this PR enables doing something like this:
Implementing some unit tests for
contains()
also uncovered a bug (typo in variable name) inslice()
. Unit tests moved to the right file, added unit test for the uncovered bug, and forcontains()
.