Zephyr Project - Hello_World on Arduino due

Running Hello_world demo ( based on Zephyr RTOS ) on Arduino Due

- Host Computer: Ubuntu 16.04 LTS 64-bit
- Device: Arduino Due

1. Setup development environment

- Update your OS

$ sudo apt-get update
$ sudo apt-get upgrade
 

 
- Install requirements

$ sudo apt-get install git make gcc g++ python3-ply ncurses-dev \
      python3-yaml python2.7 dfu-util 

- Install the Zephyr SDK
  * Download the latest SDK self-extractable binary.

$ wget https://github.com/zephyrproject-rtos/meta-zephyr-sdk/releases/download/0.9.1/zephyr-sdk-0.9.1-setup.run

  * Run the installation binary
 

$ chmod +x zephyr-sdk-0.9.1-setup.run
$ ./zephyr-sdk-0.9.1-setup.run

* To use the Zephyr SDK, export the following environment variables and use the target location where SDK was installed, type:

$ export ZEPHYR_GCC_VARIANT=zephyr
$ export ZEPHYR_SDK_INSTALL_DIR=/opt/zephyr-sdk/
 

2. Download Zephyr project


$ git clone https://github.com/zephyrproject-rtos/zephyr.git
 
3. Building a Hello_World Application

$ export ZEPHYR_GCC_VARIANT=zephyr
$ export ZEPHYR_SDK_INSTALL_DIR=/opt/zephyr-sdk/
$ cd zephyr 
$ source zephyr-env.sh
$ cd samples/hello_world
$ make BOARD=arduino_due
 
After building an application successfully, the results can be found in the
samples/hello_world/outdir/arduino_due

4. Flashing the Zephyr kernel onto Arduino Due
Flashing the Zephyr kernel onto Arduino Due requires the bossa tool.
Install BOSSA tool

$ sudo apt install bossa-cli
 
Make sure that you are in the directory /samples/hello_world

Connect the Arduino Due to your host computer using the programming port.
Press the Erase button for more than 220 ms.
Press the Reset button so the board will boot into the SAM-BA bootloader.
$ bossac -p ttyACM0 -e -w -v -b outdir/arduino_due/zephyr.bin
 
5. Check for the output
 
$ minicom -D /dev/ttyACM0
 
Press the Reset button and you should see “Hello World!” in your terminal.
 

Nhận xét

Bài đăng phổ biến từ blog này

SIM800L thực hiện giao thức HTTP GET thông qua lệnh AT Command

Sử dụng Javascript MQTT Client với Websockets

Python-Flask – Tạo form submit, lưu vào database.