Skip to content

Commit b22c0ce

Browse files
universal-hex: For the block format convert ExtendedSegmentAddress to Linear.
Test not yet added.
1 parent 4147e22 commit b22c0ce

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/universal-hex.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ function iHexToCustomFormatBlocks(iHexStr: string, boardId: number): string {
5656
if (firstRecordType === ihex.RecordType.ExtendedLinearAddress) {
5757
currentExtAddr = hexRecords[ih];
5858
ih++;
59+
} else if (firstRecordType === ihex.RecordType.ExtendedSegmentAddress) {
60+
currentExtAddr = ihex.convertExtSegToLinAddressRecord(hexRecords[ih]);
61+
ih++;
5962
}
6063
blockLines.push(currentExtAddr);
6164
blockLen += extAddrRecordLen + 1;
@@ -74,6 +77,8 @@ function iHexToCustomFormatBlocks(iHexStr: string, boardId: number): string {
7477
record = ihex.convertRecordTo(record, ihex.RecordType.CustomData);
7578
} else if (recordType === ihex.RecordType.ExtendedLinearAddress) {
7679
currentExtAddr = record;
80+
} else if (recordType === ihex.RecordType.ExtendedSegmentAddress) {
81+
currentExtAddr = ihex.convertExtSegToLinAddressRecord(record);
7782
} else if (recordType === ihex.RecordType.EndOfFile) {
7883
endOfFile = true;
7984
break;

0 commit comments

Comments
 (0)