Skip to content

Latest commit

 

History

History
49 lines (34 loc) · 1.86 KB

build-blinky.md

File metadata and controls

49 lines (34 loc) · 1.86 KB
title permalink redirect_from
Blinky Build for Nitrogen
/documentation/iot/nitrogen/build/linux/build-blinky.md.html
/documentation/IoTEdition/nitrogen/build/LinuxBuild/BuildBlinky.md.html

How to build the blinky Zephyr application from source - Linux Host

These instructions can be used to build a simple 'blinky' demo using a Linux host machine as a development environment. The demo works by blinking the User LED (USR1) present on Nitrogen board.

After startup, the program looks up a predefined GPIO device, and configures the GPIO pin in output mode (USR1 LED). During each iteration of the main loop, the state of GPIO line will be changed so that the LED turns ON and OFF in an alternating pattern.

Once running, you should see the USR1 (green) blinking with 1 sec interval.


  • Step 0: Download and setup Zephyr
  • Step 1: Build a sample application in Zephyr
  • Step 2: Proceed to Installation page for flashing instructions

Step 0: Download and setup Zephyr

$ git clone https://gerrit.zephyrproject.org/r/zephyr

Step 1: Build the Zephyr disco application

$ cd zephyr
$ source zephyr-env.sh
$ cd samples/basic/blinky
$ mkdir build
$ cd build
$ cmake -DBOARD=96b_nitrogen ..
$ make
$ sudo make flash

The application will be available at samples/basic/blinky/build/zephyr/zephyr.hex.

Step 2: Proceed to Installation page for flashing instructions

Proceed to flash the Zephyr application binary over USB-UART or USB-DFU. Host machine specific flashing instructions can be found on the "Installation" page, link found below.