Installing and Using the Z Tree

The Z-Tree is Zephyr* RTOS targeting both the Intel® Quark™ SE processor core (x86) and the ARC core, but does not include the Arduino C++ class libraries for the ARC core. It is for developers who want the greatest control over the entire system and do not wish to use the Arduino C++ class libraries.

Note: ALWAYS open a new terminal or new shell when you install or use the Z tree after you have installed or used the A tree or M tree.

Content

  • x86: Zephyr application
  • ARC: Zephyr application

Supported Platforms

  • Ubuntu 16.04 - 64 bit and Ubuntu 14.04 - 64 bit

Installation

Prior to installing the CODK-Z, run a software update and install curl:

$ sudo apt-get update
$ sudo apt-get install curl

Use the following commands to create a directory, clone the GitHub repository, install the dependencies and setup the environment:

$ mkdir -p ~/CODK && cd $_
$ git clone https://github.com/01org/CODK-Z.git
$ cd CODK-Z
$ make clone
$ sudo make install-dep

Note: The sudo make install-dep command will add the user to the "dialout" group, so you need to log out and log back in for the update to be effective.

Log out and log in again. Open a terminal window and finalize the installation:

$ cd CODK/CODK-Z
$ make setup

Compiling the Firmware and/or Software

At the start of every development session, the following command must be run from within the CODK-Z directory to set the environment

$ source ../zephyr/zephyr-env.sh

Use the following commands to compile the x86 and ARC.

To compile x86:

$ make compile-x86

To compile ARC:

$ make compile-arc

The top-level Makefile builds the Hello example by default. See the section "Connecting and Verifying the Board Proof of Life" for step-by-step instructions to run the example on Arduino 101 or tinyTILE board.

Uploading a Binary Image to the Board (Flashing)

Flashing Using USB/DFU

To flash x86 binary image:

$ make upload-x86-dfu

To flash ARC binary image:

$ make upload-arc-dfu

Flashing Using JTAG

To flash x86 binary image:

$ make upload-x86-jtag

To flash ARC binary image:

$ make upload-arc-jtag

Flashing Using J-Link

To flash x86 binary image:

$ make upload-x86-jlink

To flash ARC binary image:

$ make upload-arc-jlink

Updating the Bluetooth® low energy firmware

The Intel® Curie™ ODK requires an update of the BLE firmware. If your board is based on the factory settings, run the following command to update the BLE firmware:

$ make upload-ble-dfu

The script will prompt you to manually reset the board.

Debugging

See the section Software Developer Tools.

Running the Application

The flashing/upload process will automatically reset the board and run the application.

Switching to Another Tree

  • Exit out of the current terminal to clear out the environment variables.
  • Restore the Arduino 101* board factory settings as explained in section Reflashing the Arduino 101 with Factory Settings.
  • Open a new terminal and use the cd command into the desired tree.
For more complete information about compiler optimizations, see our Optimization Notice.