Get started on the Nucleo-F767ZI
Needs first: Install
Status: Boots, manual (2026-11-01); reads Builds from 2027-03-02. From the board support registry:
nros-board-nucleo-f767zi-zephyr; Board Support Levels explains the words. The image runs in the board’s twin,renode:nucleo_f767zi, and on the board,nucleo-f767zi.
This starter puts a talker on an ST Nucleo-F767ZI (STM32F767ZI, Cortex-M7) running Zephyr 3.7, talking to ROS 2 over the board’s USB serial port. You do not need the board to start: Renode emulates it on your machine, and wires USART3, the UART the Nucleo’s ST-LINK carries to your USB port, to your host the way the cable would. The image you run in Renode is the image you later flash to the board. You write the talker in Rust, C or C++; pick a tab and every tab on the page follows.
What you need
- A Linux x86_64 host with the install done, so
nrosis on yourPATH, and ROS 2 withros-<distro>-rmw-zenoh-cpp(Humble on Ubuntu 22.04, Jazzy on 24.04; which edition). - For the last step only: a Nucleo-F767ZI and a USB cable for its ST-LINK port. Everything before it runs in the twin.
- Zephyr’s host tools:
westand the build tools Zephyr’s Getting Started lists.nros setupinstalls no system packages, so install them yourself. On Debian or Ubuntu:
sudo apt-get install -y --no-install-recommends git cmake ninja-build gperf \
device-tree-compiler python3-pip python3-venv xz-utils file wget clang
pip3 install --user west
export PATH="$HOME/.local/bin:$PATH"
The serial link comes first and is the only link this starter opens. Ethernet is covered under Next. WiFi is deferred to the Zephyr 4.4 line, so no starter opens over WiFi yet.
Provision
Provision the board:
nros setup nucleo-f767zi-zephyr --rmw zenoh
nros setup --tool corrosion
export ZEPHYR_SDK_INSTALL_DIR="$(nros locate tool zephyr-sdk)"
The second line installs Corrosion, which nros build needs for a C or
C++ node on this board. Only 0.6.0-nros12 and earlier need it: their board
setup does not fetch Corrosion, and a later release’s does, so there the
line changes nothing. If a build already failed without it, run the line
and build again.
That fetches what the board needs into a shared store under ~/.nros: the
Zephyr SDK, the zenoh-pico sources, the Rust target, and Renode. It installs
no router: the router is ROS’s rmw_zenohd, from your ROS 2 install.
Zephyr’s sources live in a west workspace of your own. This one pins Zephyr
3.7 and fetches only the modules the board builds with, hal_stm32 among them
(import: true would fetch every vendor’s HAL), plus Zephyr’s Rust support,
which only a Rust talker builds with:
mkdir -p nucleo_ws/manifest && cd nucleo_ws
manifest/west.ymlmanifest:
remotes:
- name: zephyrproject-rtos
url-base: https://github.com/zephyrproject-rtos
projects:
- name: zephyr
remote: zephyrproject-rtos
revision: v3.7.2
import:
name-allowlist: [cmsis, picolibc, mbedtls, tinycrypt, mcuboot, net-tools, hal_stm32]
# Rust support: only a Rust app builds with it. Pinned to the revision
# nano-ros's own west.yml pins for the 3.7 line (it has no release tags).
- name: zephyr-lang-rust
remote: zephyrproject-rtos
revision: 404fcefdbab0f2711cd342a1fab9d2eda52a1ba9
path: modules/lang/rust
self:
path: manifest
west init -l manifest
west update --narrow -o=--depth=1
pip3 install --user -r zephyr/scripts/requirements-base.txt
export ZEPHYR_BASE="$PWD/zephyr"
Last, give the west workspace the patches nano-ros carries for Zephyr 3.7.
The same command installs the Rust toolchain the talker’s runtime is
compiled with: a pinned nightly, with rust-src and the board’s
thumbv7em-none-eabi target (the board’s Zephyr configuration builds
soft-float):
nros setup board nucleo-f767zi-zephyr --zephyr-workspace "$PWD"
Scaffold the project
Source ROS 2 first, in the shell you scaffold from. nros new writes
the ROS 2 edition the project speaks, and it takes it from the sourced
ROS 2; with none sourced, it writes Humble. On Jazzy, source
/opt/ros/jazzy/setup.bash instead:
source /opt/ros/humble/setup.bash
. "$HOME/.cargo/env"
nros new nucleo_ws --board nucleo-f767zi-zephyr --template talker --lang rust
cd nucleo_ws
nros setup --sudo
A Rust application on Zephyr also needs the Rust target the board
implies (thumbv7em-none-eabihf), rustup’s clippy, and clang with
libclang. nros setup in the workspace installs the target and clippy,
and with --sudo the two packages.
nros new nucleo_ws --board nucleo-f767zi-zephyr --template talker --lang c
cd nucleo_ws
nros new nucleo_ws --board nucleo-f767zi-zephyr --template talker --lang cpp
cd nucleo_ws
That wrote a workspace with two packages: src/nucleo_node/, the talker,
and src/nucleo_node_bringup/, which says what the talker runs on. The board
reaches the router on your host through USART3, which Zephyr calls
serial@40004800, at 115200 baud. The scaffold already said so, with a
locator line in the bringup’s system.toml:
grep '^locator' src/nucleo_node_bringup/system.toml
locator = "serial/serial@40004800#baudrate=115200"
The line sits in the [image.zephyr] block, under the
board = "nucleo-f767zi-zephyr" line. Do not add a second one: TOML refuses
a duplicate key, and nros build stops with duplicate key `locator` .
The board’s own configuration already turns Zephyr’s IP stack off and gives
USART3 to zenoh. Its console is USART6.
Run it in the Renode twin
Source ROS 2, then build and run. ROS 2 provides the router, and its message
definitions are what the build generates the talker’s std_msgs code from.
This first run records the ROS 2 prefix in the workspace, so later runs of it
need no sourced shell:
source /opt/ros/humble/setup.bash
nros run nucleo_node
Publishing: 'Hello World: 1'
Publishing: 'Hello World: 2'
nros run builds the firmware through west (the first build takes a few
minutes; later ones take seconds), boots it in Renode’s nucleo_f767zi
machine with USART3 on a terminal device of your host, starts rmw_zenohd on
that device, and prints the board’s console, USART6. It keeps running until
you press Ctrl-C.
Flash the board
On the bench, plug the Nucleo’s ST-LINK port into your host and flash the same image:
nros flash --monitor
Not replayed. No probe runs this flash line (a CI runner has no board), so it is written from the board’s runner, not measured (tracking issue).
nros flash builds the image if it is stale and programs it through
Zephyr’s own runner for the board, OpenOCD over the ST-LINK. With
--monitor it then serves the board’s link on your host: on the real board
USART3 is the ST-LINK’s virtual COM port, so the zenoh link arrives as a USB
serial device (/dev/ttyACM0, say), and the router listens there instead of
on Renode’s terminal device. Name the device with --port when more than one
is attached. The console, USART6, is on the board’s pins, not on the USB
cable. To read it, wire a USB-to-UART adapter to D0 and D1, and
record the adapter
for the board: nros bench scan cannot find it on its own.
See it in ROS 2
With the talker running, in the twin or on the board, ask ROS 2 for the topic
from a second terminal. The router nros run started
also listens where a ROS 2 node on this machine looks for one, so nothing
needs to be configured:
source /opt/ros/humble/setup.bash
export RMW_IMPLEMENTATION=rmw_zenoh_cpp
ros2 topic echo /chatter std_msgs/msg/String --qos-reliability best_effort
data: 'Hello World: …'
The talker’s publisher is reliable; asking for best-effort receives from a publisher of either kind. Ctrl-C in the first terminal stops Renode and the router together.
If it doesn’t work
nros runnamesno runner package drivesorthe plan's tools name no renode: run thenros setup nucleo-f767zi-zephyrstep again, which installs Renode.- A router that does not start:
rmw_zenohdwas not found (source ROS 2 in that terminal), or another router already holds port 7447 on this machine. - A build that cannot find
hal_stm32: the west workspace predates thehal_stm32line in its allowlist. Add it and runwest updateagain. - Everything else: Troubleshooting - First 10 Minutes.
Next
- Ethernet. The Nucleo’s on-chip ethernet MAC works in Renode: the talker
reached a router over
tcp/with Zephyr’seth_stm32_haldriver in an early spike. That run needed a host tap device bridged to Renode’s virtual switch, which takesCAP_NET_ADMIN, andnros rundoes not set one up yet, so this starter stops at serial. - The board’s link, RAM budget and notes: Nucleo-F767ZI.
- The same kind of project, grown: the Tutorial.
- Talk to a larger ROS 2 system: Talk to ROS 2.