@nordicsemiconductor/pc-nrfconnect-shared 121.0.0 → 122.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Changelog.md +34 -0
- package/coverage/cobertura-coverage.xml +1330 -1197
- package/nrfutil/device/__mocks__/device.ts +2 -0
- package/nrfutil/device/batch.ts +18 -2
- package/nrfutil/device/common.ts +17 -38
- package/nrfutil/device/device.ts +2 -0
- package/nrfutil/device/deviceInfo.ts +70 -0
- package/nrfutil/device/erase.ts +2 -2
- package/nrfutil/device/firmwareRead.ts +2 -2
- package/nrfutil/device/getCoreInfo.ts +2 -2
- package/nrfutil/device/getFwInfo.ts +2 -2
- package/nrfutil/device/getProtectionStatus.ts +2 -2
- package/nrfutil/device/list.ts +4 -30
- package/nrfutil/device/program.ts +4 -4
- package/nrfutil/device/recover.ts +2 -2
- package/nrfutil/device/reset.ts +2 -2
- package/nrfutil/device/setMcuState.ts +2 -5
- package/nrfutil/device/setProtectionStatus.ts +2 -2
- package/nrfutil/index.ts +1 -1
- package/nrfutil/moduleVersion.ts +20 -0
- package/nrfutil/sandboxTypes.ts +14 -0
- package/package.json +1 -1
- package/src/About/DeviceCard.tsx +6 -5
- package/src/About/SupportCard.tsx +2 -2
- package/src/Device/DeviceSelector/BasicDeviceInfo.tsx +12 -6
- package/src/Device/DeviceSelector/DeviceList/AnimatedList.tsx +1 -1
- package/src/Device/DeviceSelector/DeviceList/Device.tsx +7 -5
- package/src/Device/DeviceSelector/DeviceList/DeviceList.tsx +23 -5
- package/src/Device/DeviceSelector/DeviceList/EditDeviceButtons.tsx +7 -6
- package/src/Device/DeviceSelector/DeviceList/MoreDeviceInfo.tsx +26 -30
- package/src/Device/DeviceSelector/DeviceList/edit-device-buttons.scss +1 -2
- package/src/Device/DeviceSelector/DeviceSelector.test.tsx +17 -37
- package/src/Device/DeviceSelector/DeviceSelector.tsx +38 -13
- package/src/Device/DeviceSelector/Favorite.tsx +10 -10
- package/src/Device/DeviceSelector/basic-device-info.scss +0 -12
- package/src/Device/deviceInfo/deviceInfo.ts +2 -2
- package/src/Device/deviceLister.ts +52 -43
- package/src/Device/deviceSetup.ts +27 -10
- package/src/Device/deviceSlice.ts +148 -84
- package/src/Device/jprogOperations.ts +56 -27
- package/src/Device/sdfuOperations.ts +25 -31
- package/src/InlineInput/NumberInlineInput.tsx +1 -1
- package/src/InlineInput/NumberInputWithDropdown.tsx +1 -2
- package/src/index.ts +1 -0
- package/src/logging/sendInitialLogMessages.ts +13 -9
- package/src/utils/logLibVersions.ts +1 -1
- package/src/utils/systemReport.ts +3 -3
- package/typings/generated/nrfutil/device/__mocks__/device.d.ts +1 -0
- package/typings/generated/nrfutil/device/__mocks__/device.d.ts.map +1 -1
- package/typings/generated/nrfutil/device/batch.d.ts +3 -2
- package/typings/generated/nrfutil/device/batch.d.ts.map +1 -1
- package/typings/generated/nrfutil/device/common.d.ts +6 -33
- package/typings/generated/nrfutil/device/common.d.ts.map +1 -1
- package/typings/generated/nrfutil/device/device.d.ts +13 -12
- package/typings/generated/nrfutil/device/device.d.ts.map +1 -1
- package/typings/generated/nrfutil/device/deviceInfo.d.ts +40 -0
- package/typings/generated/nrfutil/device/deviceInfo.d.ts.map +1 -0
- package/typings/generated/nrfutil/device/erase.d.ts +2 -2
- package/typings/generated/nrfutil/device/erase.d.ts.map +1 -1
- package/typings/generated/nrfutil/device/firmwareRead.d.ts +2 -2
- package/typings/generated/nrfutil/device/firmwareRead.d.ts.map +1 -1
- package/typings/generated/nrfutil/device/getCoreInfo.d.ts +2 -2
- package/typings/generated/nrfutil/device/getCoreInfo.d.ts.map +1 -1
- package/typings/generated/nrfutil/device/getFwInfo.d.ts +2 -2
- package/typings/generated/nrfutil/device/getFwInfo.d.ts.map +1 -1
- package/typings/generated/nrfutil/device/getProtectionStatus.d.ts +2 -2
- package/typings/generated/nrfutil/device/getProtectionStatus.d.ts.map +1 -1
- package/typings/generated/nrfutil/device/list.d.ts +3 -3
- package/typings/generated/nrfutil/device/list.d.ts.map +1 -1
- package/typings/generated/nrfutil/device/program.d.ts +2 -2
- package/typings/generated/nrfutil/device/program.d.ts.map +1 -1
- package/typings/generated/nrfutil/device/recover.d.ts +2 -2
- package/typings/generated/nrfutil/device/recover.d.ts.map +1 -1
- package/typings/generated/nrfutil/device/reset.d.ts +2 -2
- package/typings/generated/nrfutil/device/reset.d.ts.map +1 -1
- package/typings/generated/nrfutil/device/setMcuState.d.ts +2 -2
- package/typings/generated/nrfutil/device/setMcuState.d.ts.map +1 -1
- package/typings/generated/nrfutil/device/setProtectionStatus.d.ts +2 -2
- package/typings/generated/nrfutil/device/setProtectionStatus.d.ts.map +1 -1
- package/typings/generated/nrfutil/index.d.ts +2 -1
- package/typings/generated/nrfutil/index.d.ts.map +1 -1
- package/typings/generated/nrfutil/moduleVersion.d.ts +4 -0
- package/typings/generated/nrfutil/moduleVersion.d.ts.map +1 -1
- package/typings/generated/nrfutil/sandboxTypes.d.ts +9 -0
- package/typings/generated/nrfutil/sandboxTypes.d.ts.map +1 -1
- package/typings/generated/src/About/DeviceCard.d.ts.map +1 -1
- package/typings/generated/src/Device/DeviceSelector/BasicDeviceInfo.d.ts.map +1 -1
- package/typings/generated/src/Device/DeviceSelector/DeviceList/Device.d.ts +0 -1
- package/typings/generated/src/Device/DeviceSelector/DeviceList/Device.d.ts.map +1 -1
- package/typings/generated/src/Device/DeviceSelector/DeviceList/DeviceList.d.ts.map +1 -1
- package/typings/generated/src/Device/DeviceSelector/DeviceList/EditDeviceButtons.d.ts.map +1 -1
- package/typings/generated/src/Device/DeviceSelector/DeviceList/MoreDeviceInfo.d.ts +0 -1
- package/typings/generated/src/Device/DeviceSelector/DeviceList/MoreDeviceInfo.d.ts.map +1 -1
- package/typings/generated/src/Device/DeviceSelector/DeviceSelector.d.ts.map +1 -1
- package/typings/generated/src/Device/DeviceSelector/Favorite.d.ts +0 -1
- package/typings/generated/src/Device/DeviceSelector/Favorite.d.ts.map +1 -1
- package/typings/generated/src/Device/deviceLister.d.ts +1 -15
- package/typings/generated/src/Device/deviceLister.d.ts.map +1 -1
- package/typings/generated/src/Device/deviceSetup.d.ts +6 -5
- package/typings/generated/src/Device/deviceSetup.d.ts.map +1 -1
- package/typings/generated/src/Device/deviceSlice.d.ts +12 -15
- package/typings/generated/src/Device/deviceSlice.d.ts.map +1 -1
- package/typings/generated/src/Device/jprogOperations.d.ts.map +1 -1
- package/typings/generated/src/Device/sdfuOperations.d.ts.map +1 -1
- package/typings/generated/src/InlineInput/NumberInlineInput.d.ts +1 -1
- package/typings/generated/src/InlineInput/NumberInlineInput.d.ts.map +1 -1
- package/typings/generated/src/InlineInput/NumberInputWithDropdown.d.ts.map +1 -1
- package/typings/generated/src/index.d.ts +1 -1
- package/typings/generated/src/index.d.ts.map +1 -1
- package/typings/generated/src/logging/sendInitialLogMessages.d.ts.map +1 -1
- package/typings/generated/src/utils/systemReport.d.ts +1 -1
- package/typings/generated/src/utils/systemReport.d.ts.map +1 -1
- package/src/Device/DeviceSelector/DeviceList/device.scss +0 -28
- package/src/Device/DeviceSelector/DeviceList/more-device-info.scss +0 -33
- package/src/Device/DeviceSelector/favorite.scss +0 -17
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import NrfutilDeviceLib from '../../nrfutil/device/device';
|
|
8
|
+
import { DeviceInfo } from '../../nrfutil/device/deviceInfo';
|
|
8
9
|
import { FWInfo } from '../../nrfutil/device/getFwInfo';
|
|
9
10
|
import logger from '../logging';
|
|
10
11
|
import type { AppThunk, RootState } from '../store';
|
|
@@ -18,14 +19,15 @@ const getDeviceReadProtection = async (
|
|
|
18
19
|
readbackProtection: 'unknown' | 'protected' | 'unprotected';
|
|
19
20
|
}> => {
|
|
20
21
|
try {
|
|
22
|
+
logger.info('Checking readback protection on device');
|
|
21
23
|
const info = await NrfutilDeviceLib.getFwInfo(device);
|
|
22
24
|
return {
|
|
23
25
|
fwInfo: info,
|
|
24
26
|
readbackProtection: 'unprotected',
|
|
25
27
|
};
|
|
26
|
-
} catch (
|
|
27
|
-
|
|
28
|
-
if (error.
|
|
28
|
+
} catch (e) {
|
|
29
|
+
const error = e as Error;
|
|
30
|
+
if (error.message.includes('NotAvailableBecauseProtection')) {
|
|
29
31
|
logger.warn(
|
|
30
32
|
'Readback protection on device enabled. Unable to verify that the firmware version is correct.'
|
|
31
33
|
);
|
|
@@ -49,29 +51,50 @@ const programDeviceWithFw =
|
|
|
49
51
|
): AppThunk<RootState, Promise<Device>> =>
|
|
50
52
|
async (dispatch, getState) => {
|
|
51
53
|
try {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
const batch = NrfutilDeviceLib.batch();
|
|
55
|
+
if (getState().device.readbackProtection !== 'unprotected') {
|
|
56
|
+
batch.recover('Application', {
|
|
57
|
+
onTaskBegin: () =>
|
|
58
|
+
logger.info(`Device protected, recovering device`),
|
|
59
|
+
onTaskEnd: () => logger.info(`Finished recovering device.`),
|
|
60
|
+
onException: () =>
|
|
61
|
+
logger.error(`Failed to recover device.`),
|
|
62
|
+
onProgress: progress => {
|
|
63
|
+
onProgress(
|
|
64
|
+
progress.totalProgressPercentage,
|
|
65
|
+
'Recovering device'
|
|
66
|
+
);
|
|
67
|
+
},
|
|
68
|
+
});
|
|
56
69
|
}
|
|
57
70
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
selectedFw.fw,
|
|
64
|
-
progress => {
|
|
71
|
+
batch.program(selectedFw.fw, 'Application', undefined, undefined, {
|
|
72
|
+
onTaskBegin: () => logger.info(`Programming device`),
|
|
73
|
+
onTaskEnd: () => logger.info(`Finished programming device.`),
|
|
74
|
+
onException: () => logger.error(`Failed to program device.`),
|
|
75
|
+
onProgress: progress => {
|
|
65
76
|
onProgress(
|
|
66
77
|
progress.totalProgressPercentage,
|
|
67
78
|
progress.message ?? 'programming'
|
|
68
79
|
);
|
|
69
80
|
},
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
batch.reset('Application', undefined, {
|
|
84
|
+
onTaskBegin: () => logger.info(`Resting device`),
|
|
85
|
+
onTaskEnd: () => logger.info(`Finished resting device.`),
|
|
86
|
+
onException: () => logger.error(`Failed to reset device.`),
|
|
87
|
+
onProgress: progress => {
|
|
88
|
+
onProgress(
|
|
89
|
+
progress.totalProgressPercentage,
|
|
90
|
+
'Resetting device'
|
|
91
|
+
);
|
|
92
|
+
},
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
await batch.run(device);
|
|
74
96
|
await NrfutilDeviceLib.reset(device);
|
|
97
|
+
onProgress(0, 'Updating readback protection');
|
|
75
98
|
const { readbackProtection } = await getDeviceReadProtection(
|
|
76
99
|
device
|
|
77
100
|
);
|
|
@@ -88,12 +111,18 @@ const programDeviceWithFw =
|
|
|
88
111
|
return device;
|
|
89
112
|
};
|
|
90
113
|
|
|
91
|
-
const firmwareOptions = (
|
|
114
|
+
const firmwareOptions = (
|
|
115
|
+
device: Device,
|
|
116
|
+
firmware: JprogEntry[],
|
|
117
|
+
deviceInfo?: DeviceInfo
|
|
118
|
+
) =>
|
|
92
119
|
firmware.filter(fw => {
|
|
93
|
-
const family = (device.
|
|
94
|
-
const deviceType = (
|
|
120
|
+
const family = (device.devkit?.deviceFamily || '').toLowerCase();
|
|
121
|
+
const deviceType = (
|
|
122
|
+
deviceInfo?.jlink?.deviceVersion || ''
|
|
123
|
+
).toLowerCase();
|
|
95
124
|
const shortDeviceType = deviceType.split('_').shift();
|
|
96
|
-
const boardVersion = (device.
|
|
125
|
+
const boardVersion = (device.devkit?.boardVersion || '').toLowerCase();
|
|
97
126
|
|
|
98
127
|
const key = fw.key.toLowerCase();
|
|
99
128
|
return (
|
|
@@ -108,11 +137,11 @@ export const jprogDeviceSetup = (
|
|
|
108
137
|
firmware: JprogEntry[],
|
|
109
138
|
needSerialport = false
|
|
110
139
|
): DeviceSetup => ({
|
|
111
|
-
supportsProgrammingMode:
|
|
140
|
+
supportsProgrammingMode: device =>
|
|
112
141
|
(needSerialport === !!device.traits.serialPorts || !needSerialport) &&
|
|
113
142
|
!!device.traits.jlink,
|
|
114
|
-
getFirmwareOptions: device =>
|
|
115
|
-
firmwareOptions(device, firmware).map(firmwareOption => ({
|
|
143
|
+
getFirmwareOptions: (device, deviceInfo) =>
|
|
144
|
+
firmwareOptions(device, firmware, deviceInfo).map(firmwareOption => ({
|
|
116
145
|
key: firmwareOption.key,
|
|
117
146
|
description: firmwareOption.description,
|
|
118
147
|
programDevice: onProgress => dispatch =>
|
|
@@ -120,8 +149,8 @@ export const jprogDeviceSetup = (
|
|
|
120
149
|
programDeviceWithFw(device, firmwareOption, onProgress)
|
|
121
150
|
),
|
|
122
151
|
})),
|
|
123
|
-
isExpectedFirmware: (device
|
|
124
|
-
const fwVersions = firmwareOptions(device, firmware);
|
|
152
|
+
isExpectedFirmware: (device, deviceInfo) => dispatch => {
|
|
153
|
+
const fwVersions = firmwareOptions(device, firmware, deviceInfo);
|
|
125
154
|
if (fwVersions.length === 0) {
|
|
126
155
|
return Promise.resolve({
|
|
127
156
|
device,
|
|
@@ -46,8 +46,9 @@ export const isDeviceInDFUBootloader = (device: Device) => {
|
|
|
46
46
|
d.idProduct === NORDIC_DFU_PRODUCT_ID
|
|
47
47
|
);
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
|
|
50
|
+
if (device.serialPorts && device.serialPorts[0]) {
|
|
51
|
+
const { vendorId, productId } = device.serialPorts[0];
|
|
51
52
|
return vendorId === '1915' && productId?.toUpperCase() === '521F';
|
|
52
53
|
}
|
|
53
54
|
return false;
|
|
@@ -410,9 +411,7 @@ const programInDFUBootloader =
|
|
|
410
411
|
onFail: (reason?: unknown) => void
|
|
411
412
|
): AppThunk<RootState, Promise<void>> =>
|
|
412
413
|
async dispatch => {
|
|
413
|
-
logger.debug(
|
|
414
|
-
`${device.serialNumber} on ${device.serialport?.comName} is now in DFU-Bootloader...`
|
|
415
|
-
);
|
|
414
|
+
logger.debug(`${device.serialNumber} on is now in DFU-Bootloader...`);
|
|
416
415
|
const { application, softdevice } = dfu;
|
|
417
416
|
const params: Partial<InitPacket> = dfu.params || {};
|
|
418
417
|
|
|
@@ -545,9 +544,9 @@ export const sdfuDeviceSetup = (
|
|
|
545
544
|
dfuFirmware: DfuEntry[],
|
|
546
545
|
needSerialport = false
|
|
547
546
|
): DeviceSetup => ({
|
|
548
|
-
supportsProgrammingMode: (device
|
|
549
|
-
((!!
|
|
550
|
-
|
|
547
|
+
supportsProgrammingMode: (device, deviceInfo) =>
|
|
548
|
+
((!!deviceInfo?.dfuTriggerVersion &&
|
|
549
|
+
deviceInfo.dfuTriggerVersion.semVer.length > 0) ||
|
|
551
550
|
isDeviceInDFUBootloader(device)) &&
|
|
552
551
|
(needSerialport === device.traits.serialPorts || !needSerialport),
|
|
553
552
|
getFirmwareOptions: device =>
|
|
@@ -559,31 +558,26 @@ export const sdfuDeviceSetup = (
|
|
|
559
558
|
programDeviceWithFw(device, firmwareOption, onProgress)
|
|
560
559
|
),
|
|
561
560
|
})),
|
|
562
|
-
isExpectedFirmware: (device
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
if (device.dfuTriggerVersion) {
|
|
568
|
-
logger.debug(
|
|
569
|
-
'Device has DFU trigger interface, the device is in Application mode'
|
|
570
|
-
);
|
|
561
|
+
isExpectedFirmware: (device, deviceInfo) => () => {
|
|
562
|
+
if (deviceInfo?.dfuTriggerVersion) {
|
|
563
|
+
logger.debug(
|
|
564
|
+
'Device has DFU trigger interface, the device is in Application mode'
|
|
565
|
+
);
|
|
571
566
|
|
|
572
|
-
|
|
567
|
+
const { semVer } = deviceInfo.dfuTriggerVersion;
|
|
573
568
|
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
}),
|
|
569
|
+
return Promise.resolve({
|
|
570
|
+
device,
|
|
571
|
+
validFirmware:
|
|
572
|
+
dfuFirmware.filter(fw => fw.semver === semVer).length > 0,
|
|
573
|
+
});
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
return Promise.resolve({
|
|
577
|
+
device,
|
|
578
|
+
validFirmware: false,
|
|
579
|
+
});
|
|
580
|
+
},
|
|
587
581
|
tryToSwitchToApplicationMode: device => dispatch =>
|
|
588
582
|
new Promise<Device>((resolve, reject) => {
|
|
589
583
|
dispatch(switchToApplicationMode(device, resolve, reject));
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import React, { useState } from 'react';
|
|
8
|
-
import FormLabel from 'react-bootstrap/esm/FormLabel';
|
|
9
8
|
|
|
10
9
|
import { DropdownItem } from '../Dropdown/Dropdown';
|
|
11
10
|
import { RangeOrValues } from '../Slider/range';
|
|
@@ -66,7 +65,7 @@ export default ({
|
|
|
66
65
|
}}
|
|
67
66
|
title={title}
|
|
68
67
|
>
|
|
69
|
-
<
|
|
68
|
+
<div className="tw-mb-1 tw-text-xs">{label}</div>
|
|
70
69
|
<div className="tw-flex tw-h-8 tw-w-full">
|
|
71
70
|
<NumberInlineInput
|
|
72
71
|
value={inlineValue}
|
package/src/index.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import { inMain as appDetails } from '../../ipc/appDetails';
|
|
8
8
|
import NrfutilDeviceLib from '../../nrfutil/device/device';
|
|
9
9
|
import {
|
|
10
|
-
|
|
10
|
+
getExpectedVersion,
|
|
11
11
|
resolveModuleVersion,
|
|
12
12
|
} from '../../nrfutil/moduleVersion';
|
|
13
13
|
import { getAppDataDir } from '../utils/appDirs';
|
|
@@ -34,7 +34,6 @@ export default async () => {
|
|
|
34
34
|
installed,
|
|
35
35
|
homeDir,
|
|
36
36
|
tmpDir,
|
|
37
|
-
bundledJlink,
|
|
38
37
|
source,
|
|
39
38
|
} = details;
|
|
40
39
|
|
|
@@ -47,16 +46,21 @@ export default async () => {
|
|
|
47
46
|
logger.debug(`HomeDir: ${homeDir}`);
|
|
48
47
|
logger.debug(`TmpDir: ${tmpDir}`);
|
|
49
48
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const jlinkVersion = resolveModuleVersion('JlinkARM', dependencies);
|
|
49
|
+
const dependencies = (await NrfutilDeviceLib.getModuleVersion())
|
|
50
|
+
.dependencies;
|
|
51
|
+
const jlinkVersion = resolveModuleVersion('JlinkARM', dependencies);
|
|
54
52
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
if (jlinkVersion) {
|
|
54
|
+
const result = getExpectedVersion(jlinkVersion);
|
|
55
|
+
if (!result.isExpectedVersion) {
|
|
56
|
+
logger.warn(
|
|
57
|
+
`Installed JLink version does not match the expected version (${result.expectedVersion})`
|
|
58
58
|
);
|
|
59
59
|
}
|
|
60
|
+
} else {
|
|
61
|
+
logger.warn(
|
|
62
|
+
`JLink is not installed. Please install JLink from: https://www.segger.com/downloads/jlink`
|
|
63
|
+
);
|
|
60
64
|
}
|
|
61
65
|
|
|
62
66
|
if (!udevInstalled()) {
|
|
@@ -91,7 +91,7 @@ export default async () => {
|
|
|
91
91
|
`It looks like you have installed JLink using ${JLinkInstallerVersion}, but currently we only support their Universal Installer for your system.`
|
|
92
92
|
);
|
|
93
93
|
logger.warn(
|
|
94
|
-
`Please install JLink: https://www.segger.com/downloads/jlink/
|
|
94
|
+
`Please install JLink: https://www.segger.com/downloads/jlink/JLink_MacOSX_V788j_universal.pkg`
|
|
95
95
|
);
|
|
96
96
|
}
|
|
97
97
|
}
|
|
@@ -89,7 +89,7 @@ const allDevicesReport = (allDevices: Device[] = []) => [
|
|
|
89
89
|
...allDevices.map(
|
|
90
90
|
d =>
|
|
91
91
|
` - ${d.serialNumber} ${
|
|
92
|
-
d.
|
|
92
|
+
d.devkit?.boardVersion || ''
|
|
93
93
|
}: ${d.serialPorts?.map(s => s.comName).join(', ')}`
|
|
94
94
|
),
|
|
95
95
|
'',
|
|
@@ -129,14 +129,14 @@ export const generateSystemReport = async (
|
|
|
129
129
|
export default async (
|
|
130
130
|
allDevices: Device[],
|
|
131
131
|
currentSerialNumber: string,
|
|
132
|
-
currentDevice
|
|
132
|
+
currentDevice?: Device
|
|
133
133
|
) => {
|
|
134
134
|
logger.info('Generating system report...');
|
|
135
135
|
const timestamp = new Date().toISOString().replace(/:/g, '-');
|
|
136
136
|
const report = await generateSystemReport(
|
|
137
137
|
timestamp,
|
|
138
138
|
allDevices,
|
|
139
|
-
currentDevice
|
|
139
|
+
currentDevice,
|
|
140
140
|
currentSerialNumber
|
|
141
141
|
);
|
|
142
142
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../../../../nrfutil/device/__mocks__/device.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../../../../nrfutil/device/__mocks__/device.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA0BA,wBAkBE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { TaskEnd } from '../sandboxTypes';
|
|
3
3
|
import { Callbacks } from './batchTypes';
|
|
4
|
-
import { DeviceCore, DeviceTraits,
|
|
4
|
+
import { DeviceCore, DeviceTraits, NrfutilDevice, ResetKind } from './common';
|
|
5
5
|
import { DeviceCoreInfo } from './getCoreInfo';
|
|
6
6
|
import { FWInfo } from './getFwInfo';
|
|
7
7
|
import { GetProtectionStatusResult } from './getProtectionStatus';
|
|
@@ -10,6 +10,7 @@ export declare class Batch {
|
|
|
10
10
|
private operationBatchGeneration;
|
|
11
11
|
private collectOperations;
|
|
12
12
|
private enqueueBatchOperationObject;
|
|
13
|
+
getDeviceInfo(core: DeviceCore, callbacks?: Callbacks<FWInfo>): this;
|
|
13
14
|
erase(core: DeviceCore, callbacks?: Callbacks): this;
|
|
14
15
|
firmwareRead(core: DeviceCore, callbacks?: Callbacks<Buffer>): this;
|
|
15
16
|
getCoreInfo(core: DeviceCore, callbacks?: Callbacks<DeviceCoreInfo>): this;
|
|
@@ -19,6 +20,6 @@ export declare class Batch {
|
|
|
19
20
|
recover(core: DeviceCore, callbacks?: Callbacks): this;
|
|
20
21
|
reset(core: DeviceCore, reset?: ResetKind, callbacks?: Callbacks): this;
|
|
21
22
|
collect(count: number, callback: (completedTasks: TaskEnd<unknown>[]) => void): this;
|
|
22
|
-
run(device:
|
|
23
|
+
run(device: NrfutilDevice, controller?: AbortController | undefined): Promise<unknown[]>;
|
|
23
24
|
}
|
|
24
25
|
//# sourceMappingURL=batch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batch.d.ts","sourceRoot":"","sources":["../../../../nrfutil/device/batch.ts"],"names":[],"mappings":";AAWA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAyB,SAAS,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EACH,UAAU,EACV,YAAY,EAGZ,
|
|
1
|
+
{"version":3,"file":"batch.d.ts","sourceRoot":"","sources":["../../../../nrfutil/device/batch.ts"],"names":[],"mappings":";AAWA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAyB,SAAS,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EACH,UAAU,EACV,YAAY,EAGZ,aAAa,EACb,SAAS,EACZ,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAClE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|
|
@@ -8,42 +8,22 @@ export interface DeviceArrivedEvent {
|
|
|
8
8
|
export interface DeviceLeftEvent {
|
|
9
9
|
id: number;
|
|
10
10
|
}
|
|
11
|
-
export interface
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
romPageSize: number;
|
|
15
|
-
deviceFamily: string;
|
|
16
|
-
deviceVersion: string;
|
|
17
|
-
}
|
|
18
|
-
export interface DfuTriggerInfo {
|
|
19
|
-
wAddress: number;
|
|
20
|
-
wVersionMajor: number;
|
|
21
|
-
wVersionMinor: number;
|
|
22
|
-
wFirmwareId: number;
|
|
23
|
-
wFlashSize: number;
|
|
24
|
-
wFlashPageSize: number;
|
|
25
|
-
}
|
|
26
|
-
export interface DfuTriggerVersion {
|
|
27
|
-
semVer: string;
|
|
11
|
+
export interface NordicDevKit {
|
|
12
|
+
boardVersion?: string;
|
|
13
|
+
deviceFamily?: string;
|
|
28
14
|
}
|
|
29
15
|
export interface NrfutilDevice {
|
|
30
16
|
id: number;
|
|
17
|
+
devkit?: NordicDevKit;
|
|
31
18
|
serialNumber?: string;
|
|
32
19
|
traits: DeviceTraits;
|
|
33
20
|
usb?: USB;
|
|
34
|
-
jlink?: JLink;
|
|
35
21
|
serialPorts?: Array<SerialPort>;
|
|
36
|
-
hwInfo?: HwInfo;
|
|
37
|
-
dfuTriggerInfo?: DfuTriggerInfo;
|
|
38
|
-
dfuTriggerVersion?: DfuTriggerVersion;
|
|
39
22
|
broken?: null | {
|
|
40
23
|
description: string;
|
|
41
24
|
url: string;
|
|
42
25
|
};
|
|
43
26
|
}
|
|
44
|
-
export interface NrfutilDeviceWithSerialnumber extends NrfutilDevice {
|
|
45
|
-
serialNumber: string;
|
|
46
|
-
}
|
|
47
27
|
export type DeviceFamily = 'NRF51_FAMILY' | 'NRF52_FAMILY' | 'NRF53_FAMILY' | 'NRF91_FAMILY';
|
|
48
28
|
export type ProtectionStatus = 'NRFDL_PROTECTION_STATUS_NONE' | 'NRFDL_PROTECTION_STATUS_REGION0' | 'NRFDL_PROTECTION_STATUS_REGION0_REGION1' | 'NRFDL_PROTECTION_STATUS_SECURE_REGIONS' | 'NRFDL_PROTECTION_STATUS_ALL';
|
|
49
29
|
export type VersionType = 'NRFDL_VERSION_TYPE_SEMANTIC' | 'NRFDL_VERSION_TYPE_INCREMENTAL' | 'NRFDL_VERSION_TYPE_STRING';
|
|
@@ -103,13 +83,6 @@ export interface USBDevice {
|
|
|
103
83
|
descriptor: USBDeviceDescriptor;
|
|
104
84
|
configList: USBConfiguration;
|
|
105
85
|
}
|
|
106
|
-
export interface JLink {
|
|
107
|
-
serialNumber: string;
|
|
108
|
-
boardVersion: string | null;
|
|
109
|
-
jlinkObFirmwareVersion: string | null;
|
|
110
|
-
deviceFamily: string | null;
|
|
111
|
-
deviceVersion: string | null;
|
|
112
|
-
}
|
|
113
86
|
export interface SerialPort {
|
|
114
87
|
serialNumber: string | null;
|
|
115
88
|
comName: string | null;
|
|
@@ -120,6 +93,6 @@ export interface SerialPort {
|
|
|
120
93
|
path: string | null;
|
|
121
94
|
}
|
|
122
95
|
export declare const getDeviceSandbox: () => Promise<NrfutilSandbox>;
|
|
123
|
-
export declare const deviceSingleTaskEndOperation: <T = void>(device:
|
|
124
|
-
export declare const deviceSingleTaskEndOperationVoid: (device:
|
|
96
|
+
export declare const deviceSingleTaskEndOperation: <T = void>(device: NrfutilDevice, command: string, onProgress?: ((progress: Progress) => void) | undefined, controller?: AbortController, args?: string[]) => Promise<NonNullable<Awaited<T>>>;
|
|
97
|
+
export declare const deviceSingleTaskEndOperationVoid: (device: NrfutilDevice, command: string, onProgress?: ((progress: Progress) => void) | undefined, controller?: AbortController, args?: string[]) => Promise<void>;
|
|
125
98
|
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../nrfutil/device/common.ts"],"names":[],"mappings":"AAYA,OAAgB,EAAE,KAAK,cAAc,EAAE,MAAM,YAAY,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LogMessage } from '../sandboxTypes';
|
|
3
3
|
import { Batch } from './batch';
|
|
4
4
|
declare const _default: {
|
|
5
|
-
program: (device: import("./common").
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
program: (device: import("./common").NrfutilDevice, firmware: import("./program").FirmwareType, onProgress?: ((progress: import("../sandboxTypes").Progress) => void) | undefined, core?: import("./common").DeviceCore | undefined, programmingOptions?: import("./program").ProgrammingOptions | undefined, controller?: AbortController | undefined) => Promise<void>;
|
|
6
|
+
deviceInfo: (device: import("./common").NrfutilDevice, core?: import("./common").DeviceCore | undefined, onProgress?: ((progress: import("../sandboxTypes").Progress) => void) | undefined, controller?: AbortController | undefined) => Promise<import("./deviceInfo").DeviceInfo | undefined>;
|
|
7
|
+
erase: (device: import("./common").NrfutilDevice, core?: import("./common").DeviceCore | undefined, onProgress?: ((progress: import("../sandboxTypes").Progress) => void) | undefined, controller?: AbortController | undefined) => Promise<void>;
|
|
8
|
+
recover: (device: import("./common").NrfutilDevice, core?: import("./common").DeviceCore | undefined, onProgress?: ((progress: import("../sandboxTypes").Progress) => void) | undefined, controller?: AbortController | undefined) => Promise<void>;
|
|
9
|
+
reset: (device: import("./common").NrfutilDevice, core?: import("./common").DeviceCore | undefined, resetKind?: import("./common").ResetKind | undefined, onProgress?: ((progress: import("../sandboxTypes").Progress) => void) | undefined, controller?: AbortController | undefined) => Promise<void>;
|
|
10
|
+
getProtectionStatus: (device: import("./common").NrfutilDevice, core?: import("./common").DeviceCore | undefined, onProgress?: ((progress: import("../sandboxTypes").Progress) => void) | undefined, controller?: AbortController | undefined) => Promise<import("./getProtectionStatus").GetProtectionStatusResult>;
|
|
11
|
+
setProtectionStatus: (device: import("./common").NrfutilDevice, region: "All" | "SecureRegions" | "Region0" | "Region0Region1", core?: import("./common").DeviceCore | undefined, onProgress?: ((progress: import("../sandboxTypes").Progress) => void) | undefined, controller?: AbortController | undefined) => Promise<void>;
|
|
12
|
+
getFwInfo: (device: import("./common").NrfutilDevice, core?: import("./common").DeviceCore | undefined, onProgress?: ((progress: import("../sandboxTypes").Progress) => void) | undefined, controller?: AbortController | undefined) => Promise<import("./getFwInfo").FWInfo>;
|
|
13
|
+
setMcuState: (device: import("./common").NrfutilDevice, state: import("./setMcuState").McuState, onProgress?: ((progress: import("../sandboxTypes").Progress) => void) | undefined, controller?: AbortController | undefined) => Promise<void>;
|
|
14
|
+
getCoreInfo: (device: import("./common").NrfutilDevice, core?: import("./common").DeviceCore | undefined, onProgress?: ((progress: import("../sandboxTypes").Progress) => void) | undefined, controller?: AbortController | undefined) => Promise<import("./getCoreInfo").DeviceCoreInfo>;
|
|
15
|
+
list: (traits: import("./common").DeviceTraits, onEnumerated: (devices: import("./common").NrfutilDevice[]) => void, onError: (error: Error) => void, onHotplugEvent?: {
|
|
16
|
+
onDeviceArrived: (device: import("./common").NrfutilDevice) => void;
|
|
16
17
|
onDeviceLeft: (id: number) => void;
|
|
17
18
|
} | undefined, timeout?: number | undefined) => Promise<{
|
|
18
19
|
stop: (handler?: (() => void) | undefined) => void;
|
|
19
20
|
isRunning: () => boolean;
|
|
20
21
|
onClosed: (handler: (error?: Error | undefined) => void) => () => ((error?: Error | undefined) => void)[];
|
|
21
22
|
}>;
|
|
22
|
-
firmwareRead: (device: import("./common").
|
|
23
|
+
firmwareRead: (device: import("./common").NrfutilDevice, core?: import("./common").DeviceCore | undefined, onProgress?: ((progress: import("../sandboxTypes").Progress) => void) | undefined, controller?: AbortController | undefined) => Promise<Buffer>;
|
|
23
24
|
onLogging: (handler: (logging: LogMessage) => void) => Promise<() => ((logging: LogMessage) => void)[]>;
|
|
24
25
|
setLogLevel: (level: LogLevel) => Promise<void>;
|
|
25
26
|
setVerboseLogging: (verbose: boolean) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../../../nrfutil/device/device.ts"],"names":[],"mappings":";AAMA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC
|
|
1
|
+
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../../../nrfutil/device/device.ts"],"names":[],"mappings":";AAMA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqChC,wBAkBE"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Progress } from '../sandboxTypes';
|
|
2
|
+
import { DeviceCore, NrfutilDevice } from './common';
|
|
3
|
+
export interface HwInfo {
|
|
4
|
+
romSize: number;
|
|
5
|
+
ramSize: number;
|
|
6
|
+
romPageSize: number;
|
|
7
|
+
deviceFamily: string;
|
|
8
|
+
deviceVersion: string;
|
|
9
|
+
}
|
|
10
|
+
export interface JLinkDeviceInfo {
|
|
11
|
+
serialNumber: string;
|
|
12
|
+
boardVersion?: string;
|
|
13
|
+
jlinkObFirmwareVersion: string;
|
|
14
|
+
deviceFamily: string | null;
|
|
15
|
+
deviceVersion?: string | null;
|
|
16
|
+
}
|
|
17
|
+
export interface DfuTriggerInfo {
|
|
18
|
+
wAddress: number;
|
|
19
|
+
wVersionMajor: number;
|
|
20
|
+
wVersionMinor: number;
|
|
21
|
+
wFirmwareId: number;
|
|
22
|
+
wFlashSize: number;
|
|
23
|
+
wFlashPageSize: number;
|
|
24
|
+
}
|
|
25
|
+
export interface DfuTriggerVersion {
|
|
26
|
+
semVer: string;
|
|
27
|
+
}
|
|
28
|
+
export interface DeviceInfo {
|
|
29
|
+
hwInfo?: HwInfo;
|
|
30
|
+
jlink?: JLinkDeviceInfo;
|
|
31
|
+
dfuTriggerVersion?: DfuTriggerVersion;
|
|
32
|
+
dfuTriggerInfo?: DfuTriggerInfo;
|
|
33
|
+
}
|
|
34
|
+
export interface DeviceInfoRaw {
|
|
35
|
+
name: 'device-info';
|
|
36
|
+
deviceInfo: DeviceInfo;
|
|
37
|
+
}
|
|
38
|
+
declare const _default: (device: NrfutilDevice, core?: DeviceCore, onProgress?: ((progress: Progress) => void) | undefined, controller?: AbortController) => Promise<DeviceInfo | undefined>;
|
|
39
|
+
export default _default;
|
|
40
|
+
//# sourceMappingURL=deviceInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deviceInfo.d.ts","sourceRoot":"","sources":["../../../../nrfutil/device/deviceInfo.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACH,UAAU,EAEV,aAAa,EAChB,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,MAAM;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED,MAAM,WAAW,cAAc;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;CAC1B;AACD,MAAM,WAAW,iBAAiB;IAC9B,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,cAAc,CAAC,EAAE,cAAc,CAAC;CACnC;AAED,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,UAAU,CAAC;CAC1B;iCAGW,aAAa,SACd,UAAU,2BACO,QAAQ,KAAK,IAAI,4BAC5B,eAAe;AAJhC,wBAgBoB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Progress } from '../sandboxTypes';
|
|
2
|
-
import { DeviceCore,
|
|
3
|
-
declare const _default: (device:
|
|
2
|
+
import { DeviceCore, NrfutilDevice } from './common';
|
|
3
|
+
declare const _default: (device: NrfutilDevice, core?: DeviceCore, onProgress?: ((progress: Progress) => void) | undefined, controller?: AbortController) => Promise<void>;
|
|
4
4
|
export default _default;
|
|
5
5
|
//# sourceMappingURL=erase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"erase.d.ts","sourceRoot":"","sources":["../../../../nrfutil/device/erase.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACH,UAAU,EAEV,
|
|
1
|
+
{"version":3,"file":"erase.d.ts","sourceRoot":"","sources":["../../../../nrfutil/device/erase.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACH,UAAU,EAEV,aAAa,EAChB,MAAM,UAAU,CAAC;iCAGN,aAAa,SACd,UAAU,2BACO,QAAQ,KAAK,IAAI,4BAC5B,eAAe;AAJhC,wBAYM"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { Progress } from '../sandboxTypes';
|
|
3
|
-
import { DeviceCore,
|
|
3
|
+
import { DeviceCore, NrfutilDevice } from './common';
|
|
4
4
|
export interface DeviceBuffer {
|
|
5
5
|
serialNumber: string;
|
|
6
6
|
buffer: string;
|
|
7
7
|
}
|
|
8
|
-
declare const _default: (device:
|
|
8
|
+
declare const _default: (device: NrfutilDevice, core?: DeviceCore, onProgress?: ((progress: Progress) => void) | undefined, controller?: AbortController) => Promise<Buffer>;
|
|
9
9
|
export default _default;
|
|
10
10
|
//# sourceMappingURL=firmwareRead.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firmwareRead.d.ts","sourceRoot":"","sources":["../../../../nrfutil/device/firmwareRead.ts"],"names":[],"mappings":";AAMA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACH,UAAU,EAEV,
|
|
1
|
+
{"version":3,"file":"firmwareRead.d.ts","sourceRoot":"","sources":["../../../../nrfutil/device/firmwareRead.ts"],"names":[],"mappings":";AAMA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACH,UAAU,EAEV,aAAa,EAChB,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,YAAY;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAClB;iCAGW,aAAa,SACd,UAAU,2BACO,QAAQ,KAAK,IAAI,4BAC5B,eAAe;AAJhC,wBAeE"}
|