Skip to content

Make OTA the default K2 build path#33

Merged
lindestad merged 4 commits into
mainfrom
issue-28-build-docs
May 28, 2026
Merged

Make OTA the default K2 build path#33
lindestad merged 4 commits into
mainfrom
issue-28-build-docs

Conversation

@lindestad
Copy link
Copy Markdown
Collaborator

This updates the K2 build and flashing flow for #28.

The build wrappers now default to the H7 OTA sysbuild, keep --ota as an explicit no-op, and require --no-ota for a plain development build. F7 flags now fail clearly because F7 support is being sunset.

The OTA helpers now discover the signed image under build-h755-ota/*/zephyr/zephyr.signed.bin, so sibling worktrees and renamed checkouts do not break the default upload path. The README, Ethernet OTA guide, release matrix, and stale comments now document H7 and OTA as the supported path, with USB west flash reserved for first-time provisioning or recovery.

Validated with:

  • ./build.sh --help
  • ./build.sh --f7 exits with the sunset message
  • pwsh -NoProfile -File ./build.ps1 --help
  • pwsh -NoProfile -File ./build.ps1 --f7 exits with the sunset message
  • bash -n build.sh tools/k2-ota.sh
  • PowerShell parser check for build.ps1 and tools/k2-ota.ps1
  • ./build.sh default OTA build succeeds and produces build-h755-ota/K2-Zephyr-issue28-build-docs/zephyr/zephyr.signed.bin

@lindestad lindestad force-pushed the issue-28-build-docs branch from c834d27 to eec3fbb Compare May 28, 2026 09:59
@lindestad lindestad marked this pull request as ready for review May 28, 2026 12:45
@lindestad lindestad requested review from Gutteerz and Copilot May 28, 2026 12:46
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Makes the H7 MCUboot/OTA sysbuild the default for build.sh/build.ps1, sunsets F7 flags with a clear error, teaches the OTA helpers to discover the signed image via a build-h755-ota/*/zephyr/zephyr.signed.bin glob, and updates README/ETHERNET_OTA/comments/CMake messaging to frame Ethernet OTA as the normal update path and USB west flash as provisioning/recovery only.

Changes:

  • Default build is now H7 OTA; --ota is a no-op, --no-ota opts into plain builds, --f7 errors out.
  • OTA helpers (tools/k2-ota.sh/.ps1) auto-locate the signed image under build-h755-ota/*/zephyr/zephyr.signed.bin, removing the hardcoded K2-Zephyr path.
  • Docs, comments, and a new CMake status message reorient users toward Ethernet OTA, reserving west flash for first-time/recovery use.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
build.sh Default to OTA, add --no-ota, reject --f7, robust workspace/venv paths, new flash guidance output.
build.ps1 PowerShell mirror of the new defaults, flags, venv lookup, and flash guidance.
tools/k2-ota.sh Compute project dir; glob-discover default signed image with clear multi/zero match errors.
tools/k2-ota.ps1 Mirror discovery in PowerShell; default $Image from $env:IMAGE.
README.md Document H7-only support, OTA-default build, USB flash as provisioning/recovery.
ETHERNET_OTA.md Add provisioning section pointing to ./build.sh and one-time USB flash.
CMakeLists.txt Emit a STATUS hint clarifying when to use west flash vs OTA helpers.
prj.conf Update Ethernet comment to target H755 only.
src/main.c Header comment now lists only the H755ZI-Q target.
.github/workflows/main.yml Drop F7 from the release matrix.
Comments suppressed due to low confidence (1)

ETHERNET_OTA.md:158

  • These lines still hardcode build-h755-ota/K2-Zephyr/zephyr/zephyr.signed.bin, which is inconsistent with the helper change in this PR that discovers the signed image under build-h755-ota/*/zephyr/zephyr.signed.bin. For users whose checkout directory is not literally named K2-Zephyr (a sibling worktree, a fork rename, etc.), both the prose ("By default, the helper finds the signed image at ...") and the explicit mcumgr ... image upload ... example will be wrong. Consider documenting the wildcard path or explaining that the middle component is the source-directory name.
By default, the helper finds the signed image at
`build-h755-ota/K2-Zephyr/zephyr/zephyr.signed.bin`. To upload a different
signed image:

```bash
./tools/k2-ota.sh path/to/zephyr.signed.bin

On Windows:

.\tools\k2-ota.ps1

Manual fallback:

mcumgr --conntype udp '--connstring=[10.77.0.2]:1337' image upload build-h755-ota/K2-Zephyr/zephyr/zephyr.signed.bin

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
Comment thread tools/k2-ota.ps1
@lindestad lindestad merged commit cc5e4e2 into main May 28, 2026
1 check passed
@lindestad lindestad deleted the issue-28-build-docs branch May 28, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Better document the flash tooling for K2, and sunset F7xx Nucleo support

2 participants