跳到主要内容

输入文字后将自动检索,不需要确认。

DIY论坛
报道

Zephyr RTOS Blinky Walkthrough Builds for Two NXP Boards

导读

Erich Styger’s walkthrough shows how to build Zephyr’s blinky sample with west for an NXP FRDM-MCXN947. It describes the short C file and CMake target, the device-tree LED reference and GPIO toggle, and west commands for listing board targets and making a clean build. Styger also rebuilds for an FRDM-K22F to illustrate hardware abstraction, noting its pin mapping differs. Programming the board is left for a later article.

正文

Building Zephyr RTOS Blinky with west
图源:Adafruit Blog

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.

mcuoneclipse.com

Source: Anne Barela ·Adafruit Blog · 2026-11-23T21:01:13.000Z · Read the original article

推荐理由

This is a practical, board-targeted Zephyr build tutorial with useful west and GPIO details. Its scope is limited: it does not cover programming the board, and the second board has a noted pin-mapping difference.

AI评分 52 · 查看评分依据

双模型按来源原文评估阅读价值,不判断事实真伪;本站整理正文仍应与原文核对。

  1. gpt-6-luna-2026-09-22 · 52

    This is a practical, board-targeted Zephyr build tutorial with useful west and GPIO details. Its scope is limited: it does not cover programming the board, and the second board has a noted pin-mapping difference.

  2. deepseek-flash · 52

    Covers a concrete, reusable Zephyr/west build workflow with device tree abstraction and a second-board rebuild, but it is a beginner LED sample rather than a new release; board programming is deferred to a later post.

分析时间:2026.11.23 21:14 UTC

0

评论与解答 0

VISA Mastercard Maestro JCB American Express Diners Club Discover