← Technology, Science & Infrastructure ▣ Distilled locally

Building a Zephyr RTOS Blinky example with west

By Anne Barela
November 23, 2026  ·  Adafruit ↗

Erich Styger has posted a walkthrough at MCU on Eclipse on building a first Zephyr RTOS application with west, the command line tool that drives Zephyr builds. The example is blinky, the LED sample that comes in the Zephyr samples folder. The board is an NXP FRDM-MCXN947. The same sample builds for other boards Zephyr supports.

The example is two main parts, a short main.c and a CMake file that loads the Zephyr package and creates the blinky target. The code doesn’t name a specific pin or device. It calls functions like gpio_pin_toggle_dt() and looks for a device tree object named led0, so it builds for a board with an LED named led0.

West needs the target board name. The command west boards lists what’s supported, and the -n option takes a regular expression to narrow the list. Boards can have several targets, one per core on multi-core parts, listed with the –all-targets option. Building with -p forces a clean build, and the .elf file is written to the build folder.

Styger rebuilds the same blinky for an NXP FRDM-K22F to show the hardware abstraction, with a note that the pin mapping doesn’t match there. A later article will cover programming the board.

See more at mcuoneclipse.com.

Originally published by Adafruit ↗ · rebuilt here from its own full-text RSS feed · all rights remain with the publisher, please read and support them there.