Repository navigation
NCS 3.5 sysbuild flashing, nRF91 UICR handling, tool updates - #28
Merged
Merged
Conversation
NCS 3.5 removed Partition Manager, so builds no longer produce merged.hex. probe-rs flashing now resolves images from the build: - Partition Manager builds (NCS <= 3.4), detected from the build's current zephyr/.config: flash merged.hex from the build root (sysbuild) or zephyr/ (child images), with no fallback to the other location. - Sysbuild without Partition Manager: read domains.yaml flash_order and each image's runners.yaml hex_file. Non-application images (b0, MCUboot, provisioning, UICR) are merged into zephyr-tools/bootloaders.hex and flashed with --preverify, so unchanged bootloaders are skipped; the application is flashed separately. Does not depend on SB_CONFIG_MERGED_HEX_FILES. Images sharing a flash page are rejected. nRF91 UICR can only be cleared by a full chip erase, and probe-rs fails to program an already-written UICR word. Before flashing, the device's UICR is read and compared: when every word the build writes is already present, UICR is stripped from the download; otherwise the user confirms a full erase via the recovery tool (until a probe-rs release includes the nRF91 --chip-erase fix, #4226). Recovery now runs only for nRF91 chips, targets the selected probe, and waits longer for the probe. Argument-array tasks (build, probe-rs, recovery, monitor, newtmgr, west init) now use ProcessExecution instead of ShellExecution. VS Code only quoted arguments containing whitespace, so e.g. -DEXTRA_CONF_FILE=a.conf;b.conf was split by the shell. Task completion waits subscribe before starting the task. The sidebar lists merged hex files and finds the app ELF via domains.yaml. Tests open a temporary workspace so VS Code tasks can run.
VS Code reports exit code 0 for a task process killed by a signal, so
Ctrl-C during a probe-rs download still reset the device and reported a
successful flash; a cancelled west flash still opened the monitor in
Flash and Monitor, and a cancelled build or west update continued its
TaskManager chain.
On POSIX every task now runs under /bin/sh, which traps SIGINT and exits
130 once the command has died:
- createProcessExecution passes the command and arguments as positional
parameters ("$0" "$@"), so nothing is shell-parsed. Used by build,
probe-rs download/reset, recovery, monitor, newtmgr load, west init,
west update and the Python requirements install.
- createShellCommandExecution runs a command line for west flash, whose
runnerParams is a raw shell fragment.
On Windows a Ctrl-C'd process already exits non-zero; tasks run directly
(or via the default task shell for command lines).
getRequirementsInstallCommand now returns argv instead of a hand-quoted
command string.
VS Code 1.110+ renamed the macOS executable from Contents/MacOS/Electron to the product name, so test-electron 2.5.2 failed to launch it (spawn ENOENT) on the macos-14 runner.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
merged.hex, so images now come fromdomains.yamlflash_orderand each image'srunners.yaml. Non-app images (b0, MCUboot, provisioning, UICR) are merged intozephyr-tools/bootloaders.hexand flashed with--preverify, then the app. Partition Manager builds still flashmerged.hex, chosen from the build's.config.--no-reset, and the erase uses--force(CTRL-AP ERASEALL), so the debug port stays open for probe-rs after the erase. Errors name the step and recovery's last output./bin/shSIGINT trap on POSIX.Testing
ncs-serial-modem(NCS 3.5.0-preview3): flashes passed on the erase path (pristine build, new b0 key), the no-erase/preverify path, and from a power-cycled locked board.Known issues
Error: Timeout, which came from its final reset; that reset is now skipped. The other was probe-rsCore 0 is lockedafter an erase;--forceis meant to address it, but the cause is unconfirmed.probe-rs download --chip-eraseonce a probe-rs release includes #4226.