Skip to content

UiASub/K2-Zephyr

Repository files navigation

NUCLEO-H755ZI-Q + Zephyr

Default board docs: https://docs.zephyrproject.org/4.2.0/boards/st/nucleo_h755zi_q/doc/index.html

UiASub Setup Guide: https://wiki.uiasub.no/k2zephyr/

Official Setup Guide: https://docs.zephyrproject.org/4.2.0/develop/getting_started/index.html

Required versions

  • Zephyr project: v4.2.0
  • Zephyr SDK: 0.17.2

Recommended version

  • Python: 3.12

Quick Installation

See intsall guide for STM32CubeProgrammer (if installed, continue)

Windows in PowerShell (Admin)

Invoke-WebRequest https://raw.githubusercontent.com/UiASub/K2-Zephyr/main/install_zephyr.ps1 -OutFile install_zephyr.ps1
# Use script:
Set-ExecutionPolicy -ExecutionPolicy Bypass -File install_zephyr.ps1

You need winget to install dependencies.

Linux and MacOS in terminal

Install script using curl

curl -O https://raw.githubusercontent.com/UiASub/K2-Zephyr/main/install_zephyr.sh
chmod +x install_zephyr.sh
./install_zephyr.sh

use ./install_zephyr.sh -h to see help

Building

The supported target is H7 (nucleo_h755zi_q/stm32h755xx/m7). The build scripts default to an MCUboot-enabled OTA build.

./build.sh
./build.sh --h7
./build.sh --ota
./build.sh --no-ota

On Windows:

.\build.ps1
.\build.ps1 --H7
.\build.ps1 --OTA
.\build.ps1 --NO-OTA

Use --no-ota only when you intentionally need a plain non-MCUboot development image. F7 Nucleo support is sunset and is no longer documented or built by the project tooling.

Ethernet OTA

The normal K2 firmware update path is MCUboot-based Ethernet OTA using dual image slots and MCUmgr over UDP.

Build an OTA image with:

./build.sh

On Windows:

.\build.ps1

This creates a sysbuild output with:

  • MCUboot in build-h755-ota/mcuboot
  • The signed application image in build-h755-ota/K2-Zephyr/zephyr/zephyr.signed.bin

Flash the OTA build over USB only for first-time provisioning or recovery:

west flash -d build-h755-ota

After the board has been provisioned, upload zephyr.signed.bin with an MCUmgr-compatible UDP client to the device on port 1337, mark the image for test boot, and reset the device. The application confirms the new image automatically after it finishes startup and the network interface is up. If the new image fails to boot or is rebooted before confirmation, MCUboot reverts to the previous image on the next reset. The helper wraps the normal upload/test/reset flow:

./tools/k2-ota.sh

See Ethernet OTA setup for direct-link network setup, manual Fedora and Windows steps, and validation notes.

Release

To create a new release, push a tag:

git tag v0.X.X
git push origin v0.X.X

This triggers the GitHub Actions workflow to build and release the firmware.

About

Repository for stm32 nucleo control system for ROV K2

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors