Skip to content
Open
6 changes: 6 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Unreleased

### Added

- Write support for 91x
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From Greg:

Suggested change
- Write support for 91x
- Added support for Nordic Thingy:91 X. Only writing operations are supported, as for other Nordic Thingy devices.


## 4.5.0 - 2025-01-02

### Changed
Expand Down
3 changes: 2 additions & 1 deletion doc/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The following table lists the hardware platforms that you can program with the {
|---------------------|----------|------------|--------------------------|-------------------------------------|--------------------------|
| nRF9161 DK | nRF9161 | PCA10153 | Yes | No | No |
| nRF9160 DK | nRF9160 | PCA10090 | Yes | No | No |
| Nordic Thingy:91 X | nRF9151 | PCA20065 | ??? | ?? | ??? |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need to rebase... There's an entry for Thingy X since long.

| Nordic Thingy:91 | nRF9160 | PCA20035 | Yes | No | Yes |
| nRF9151 DK | nRF9131 | PCA10171 | Yes | No | No |
| nRF9131 DK | nRF9131 | PCA10147 | Yes | No | No |
Expand Down Expand Up @@ -50,4 +51,4 @@ The following hardware platforms cannot be programmed with the {{app_name}} anym
## Application source code

The code of the application is open source and [available on GitHub](https://github.com/NordicSemiconductor/pc-nrfconnect-programmer).
Feel free to fork the repository and clone it for secondary development or feature contributions.
Feel free to fork the repository and clone it for secondary development or feature contributions.
3 changes: 2 additions & 1 deletion doc/docs/programming_dk.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The following devices have specific programming requirements or procedures:

| Device | Description |
|-----------------------------------|----------------------------------------------------------------------------------------------------------------------|
| Nordic Thingy:91 X | To program Nordic Thingy:91 X, see ???.
| Nordic Thingy:91 | To program Nordic Thingy:91, see [Updating the Thingy:91 firmware using Programmer](https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/device_guides/working_with_nrf/nrf91/thingy91.html#updating_the_thingy91_firmware_using_programmer).
| nRF9160 DK | To program the nRF9160 DK, see [Updating the nRF9160 DK firmware using Programmer](https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/device_guides/working_with_nrf/nrf91/nrf9160.html#updating_the_dk_firmware_using_programmer). |
| Nordic Thingy:53 | To program Nordic Thingy:53, follow the steps from the [Programming Nordic Thingy:53](#programming-nordic-thingy53) section. |
Expand Down Expand Up @@ -163,4 +164,4 @@ To program Nordic Thingy:53 using an external debug probe, complete the followin
The HEX file appears in the **File memory layout** section.
1. Click **Erase & write** in the **DEVICE** section of the side panel.

The update is complete when the animation in the Programmer app's **Device memory layout** section ends.
The update is complete when the animation in the Programmer app's **Device memory layout** section ends.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"nrfConnectForDesktop": {
"nrfutil": {
"device": [
"2.6.4"
"2.8.6"
]
},
"html": "dist/index.html"
Expand Down
4 changes: 3 additions & 1 deletion src/actions/mcubootTargetActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ export const performUpdate = async (
dfuFilePath: string,
onProgress: (progress: Progress) => void,
abortController: AbortController,
netCoreUploadDelay?: number
netCoreUploadDelay?: number,
target?: string
) => {
logger.info(`Writing ${dfuFilePath} to device ${device.serialNumber}`);

Expand All @@ -75,6 +76,7 @@ export const performUpdate = async (
undefined,
{
netCoreUploadDelay,
target,
},
abortController
);
Expand Down
57 changes: 55 additions & 2 deletions src/components/McuUpdateDialogView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,18 @@ import {
classNames,
clearConfirmBeforeClose,
clearWaitForDevice,
convertToDropDownItems,
DialogButton,
Dropdown,
DropdownItem,
GenericDialog,
getPersistentStore,
getSelectedDropdownItem,
logger,
NumberInlineInput,
Overlay,
selectedDevice,
selectedDeviceInfo,
setWaitForDevice,
Slider,
Toggle,
Expand Down Expand Up @@ -53,8 +58,19 @@ const McuUpdateDialogView = () => {
const isVisible = useSelector(getShowMcuBootProgrammingDialog);
const mcubootFwPath = useSelector(getMcubootFilePath);
const zipFilePath = useSelector(getZipFilePath);
const deviceInfo = useSelector(selectedDeviceInfo);

const programmingOptions =
deviceInfo?.mcuStateOptions?.filter(s => s.type === 'Programming') ??
[];

const targetDropdownItems = convertToDropDownItems(
programmingOptions.map(s => s.arguments?.target),
false
);

const fwPath = mcubootFwPath || zipFilePath;
const [chosenTarget, setChosenTarget] = useState<string>('');

const writingHasStarted = writing || writingFail || writingSucceed;

Expand Down Expand Up @@ -108,6 +124,12 @@ const McuUpdateDialogView = () => {
}
}, [device, showDelayTimeout]);

useEffect(() => {
if (targetDropdownItems.length > 0 && !chosenTarget) {
setChosenTarget(targetDropdownItems[0].value);
}
}, [chosenTarget, targetDropdownItems]);

const onCancel = () => {
dispatch(clearWaitForDevice());
dispatch(setShowMcuBootProgrammingDialog(false));
Expand All @@ -129,6 +151,11 @@ const McuUpdateDialogView = () => {
return;
}

if (programmingOptions.length > 1 && !zipFilePath && !chosenTarget) {
logger.error('No target selected');
return;
}

abortController.current = new AbortController();

setWriting(true);
Expand Down Expand Up @@ -172,7 +199,8 @@ Are you sure you want to continue?`,
setProgress(updatedProgress);
},
abortController.current,
showDelayTimeout ? uploadDelay : undefined
showDelayTimeout ? uploadDelay : undefined,
mcubootFwPath ? chosenTarget : undefined
)
.then(() => {
setWritingSucceed(true);
Expand Down Expand Up @@ -228,7 +256,14 @@ Are you sure you want to continue?`,
<DialogButton
variant="primary"
onClick={onWriteStart}
disabled={writing || writingSucceed || writingFail}
disabled={
writing ||
writingSucceed ||
writingFail ||
(programmingOptions.length > 1 &&
!chosenTarget &&
!!mcubootFwPath)
Comment on lines +263 to +265
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks a bit complex, how this one should be tested? looks like it does overlap with existing mcuboot programming?

}
>
Write
</DialogButton>
Expand All @@ -243,6 +278,24 @@ Are you sure you want to continue?`,
<strong>Firmware:</strong>
<span>{` ${mcubootFwPath || zipFilePath}`}</span>
</div>

{programmingOptions.length > 1 && !zipFilePath && (
<div className="tw-flex tw-flex-col tw-gap-2">
<strong>Target:</strong>
<Dropdown
items={targetDropdownItems}
onSelect={(item: DropdownItem) => {
setChosenTarget(item.value);
}}
selectedItem={getSelectedDropdownItem(
targetDropdownItems,
chosenTarget
)}
disabled={writingHasStarted}
/>
</div>
)}

{writing && (
<div className="tw-flex tw-flex-col tw-gap-2">
<div>
Expand Down