Skip to content

Commit

Permalink
Merge pull request #838 from NordicSemiconductor/update/nrf-intel-hex
Browse files Browse the repository at this point in the history
Update nrf-intel-hex
  • Loading branch information
datenreisender authored Nov 29, 2023
2 parents 7ee0676 + c7bed9b commit 12d7ba6
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 74 deletions.
7 changes: 7 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ This project does _not_ adhere to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html) but contrary to it
every new version is a new major version.

## 135.0.0 - 2023-11-29

### Changed

- Updated `nrf-intel-hex` to the latest version which slightly changed some
types (from `Buffer` to `Uint8Array`) because this was corrected there.

## 134.0.0 - 2023-11-22

### Added
Expand Down
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nordicsemiconductor/pc-nrfconnect-shared",
"version": "134.0.0",
"version": "135.0.0",
"description": "Shared commodities for developing pc-nrfconnect-* packages",
"repository": {
"type": "git",
Expand Down Expand Up @@ -90,7 +90,7 @@
"lodash.range": "3.2.0",
"mousetrap": "1.6.5",
"npm-run-all2": "6.0.5",
"nrf-intel-hex": "^1.3.0",
"nrf-intel-hex": "^1.4.0",
"postcss": "8.4.24",
"postcss-modules": "^6.0.0",
"prettier": "2.8.8",
Expand Down
2 changes: 1 addition & 1 deletion src/Device/initPacket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const defaultInitPacket: InitPacket = {
export interface DfuImage {
name: string;
initPacket: InitPacket;
firmwareImage: Buffer;
firmwareImage: Uint8Array;
}

// Create hash by using hash type and bytes
Expand Down
8 changes: 4 additions & 4 deletions src/Device/sdfuOperations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ function parseFirmwareImage(firmware: Buffer | string) {
return memMap.slicePad(
startAddress,
Math.ceil((endAddress - startAddress) / 4) * 4
) as Buffer;
);
}

function calculateSHA256Hash(image: Uint8Array) {
Expand All @@ -327,7 +327,7 @@ function calculateSHA256Hash(image: Uint8Array) {
}

interface DfuData {
application?: { bin: Buffer; dat: Buffer };
application?: { bin: Uint8Array; dat: Uint8Array };
softdevice?: { bin: Uint8Array; dat: Uint8Array };
params?: InitPacket;
}
Expand Down Expand Up @@ -376,8 +376,8 @@ const createDfuZip = (dfuImages: DfuImage[]) =>
bin_file: 'application.bin',
dat_file: 'application.dat',
};
zip.addFile('application.bin', data.application.bin);
zip.addFile('application.dat', data.application.dat);
zip.addFile('application.bin', data.application.bin as Buffer);
zip.addFile('application.dat', data.application.dat as Buffer);
}

if (data.softdevice) {
Expand Down
58 changes: 0 additions & 58 deletions typings/nrf-intel-hex.d.ts

This file was deleted.

0 comments on commit 12d7ba6

Please sign in to comment.