Using the ZentriOS SDK

ZentriOS Menus

The ZentriOS plugin creates a top-level ZentriOS menu and a ZentriOS Project context menu. It also adds a ZentriOS Project option on the File or Project New menu. For a ZentriOS Project, the Build Configurations menu has specific options.

ZentriOS IDE Menu

Below are the options available in the top level ZentriOS IDE menu.

New ZentriOS Project

The ZentriOS Project option is available from the File menu or the Project menu. Choose this option to create a new ZentriOS project.

Project Menu

To open the ZentriOS Project Menu, right-click a ZentriOS project (other than the ZentriOS SDK project) and choose ZentriOS in the context menu.

ZentriOS Project Build Configurations Menu

To open the ZentriOS Project Build Configurations Menu, right-click a ZentriOS project (other than the ZentriOS SDK project) and choose Build Configurations in the context menu.

Options are:

Creating a New Project

See Getting Started, Creating a New Project.

Editing SDK Settings

SDK settings are specified in the file zos_sdk_settings.ini in the top level of the ZentriOS SDK installation directory. The Edit SDK Settings option opens this file for editing in a text editor.

Options include SDK options, DMS settings, log levels and file path settings, and are documented with comments in the zos_sdk_settings.ini file.

The following is a summary of options and defaults:

Building Applications

The ZentriOS project menu provides the following choices for building an application:

Running Applications

First download the app to your device. You can build, download and run the app from the SDK IDE (see Building Applications), or download the app from the App Store.

The ZAP runs automatically when the device is powered-up or rebooted.

Connect a ZentriOS Terminal to the device to view output the ZAP prints to the terminal.

You can issue ZentriOS commands while an app is running.

Stopping an Application

To stop an application running, reboot the device. You can do this by cycling the device power or by issuing the reboot command in a ZentriOS Terminal.

You can issue commands while an app is running.

reboot

If the zap.auto_run variable is set to an app filename, that app will run immediately on boot. To clear the zap.auto_run variable, set it to an empty string.

set zap.auto_run ""
reboot

Cleaning the Project

The build process creates intermediate files in the course of a build. To minimise build time, intermediate files are not rebuilt unless there are changes to the source files on which they are dependent.

Occasionally intermediate files may cause problems with the build. To solve this problem, running a 'clean' build removes and rebuilds intermediate files.

To do a clean build, in the SDK, right click on the project, then in the context menu select ZentriOS/Clean Project.

Building for a New Device

When you want to build projects for a new ZentriOS device, connect the device to your build machine and choose the ZentriOS/Setup Device menu option. See Getting Started, Running the ZentriOS Setup Device Wizard.

Then create a new project after the device is set up.

This ensures that the project is built for the correct platform, and the related ZentriOS and SDK versions.

Modifying Project Settings

Choose Modify Project Settings from the Project menu. The ZentriOS SDK Edit Project dialog provides a number of tabs that allow you to edit various project settings. Changes to settings are reflected in changes to project files such as the project .mk file and manifest.json.

Project settings are listed with brief descriptions below:


# The name of the project component
NAME := 

# The name of the project
PROJECT_NAME := 

# The platform of the target device
PLATFORM := 

# Enable/disable automatic generation of static function prototypes in project source code
#$(NAME)_AUTO_PROTOTYPE :=

# Automatically include source files found in the project directory
$(NAME)_AUTO_SOURCES := 

# List of files to include in the project build. Paths relative to the project's directory
$(NAME)_SOURCES :=

# List of regular expressions to use for including source files into the build
$(NAME)_AUTO_INCLUDE := 

# List of regular expressions to use for excluding source files into the build
$(NAME)_AUTO_EXCLUDE := 

# List of referenced libraries
$(NAME)_COMPONENTS := 

# List of absolute paths to library directories
$(NAME)_LIBRARAY_PATHS := 

# Pre-processor symbols for this project component only (not referenced libraries)
$(NAME)_DEFINES := 

# Pre-processor symbols for the entire build (this project and all referenced libraries)
GLOBAL_DEFINES := 

# Includes file paths for project component only (not referenced libraries)
$(NAME)_INCLUDES := .

# Includes file paths for the entire build (this project and all referenced libraries)
GLOBAL_INCLUDES := 

# C compiler flags for project component only (not referenced libraries)
$(NAME)_CFLAGS := 

# C compiler flags for the entire build (this project and all referenced libraries)
GLOBAL_CFLAGS := 

# Assembler flags for project component only (not referenced libraries)
$(NAME)_ASMFLAGS := 

# Assembler flags for the entire build (this project and all referenced libraries)
GLOBAL_ASMFLAGS := 

# Linker flags for the entire build (this project and all referenced libraries)
GLOBAL_LDFLAGS := 

# Path to resource manifest .json file (path is relative to project directory)
$(NAME)_RESOURCE_MANIFEST := 

# Paths to app settings .ini files  (paths are relative to project directory)
$(NAME)_APP_SETTINGS := 

# Build targets to execute before the app is built.
# The targets should be defined in a file named: 'project_targets.mk' in the root directory of the project
PRE_BUILD_TARGETS := 

# Projects to be built and included with this project.
# This is a space separated list of absolute paths to the referenced projects' root directories.
# The referenced project resources and output .zap are included in the download and released bundle.
REFERENCED_PROJECTS :=

App Store

The app store discovers your current device and searches the DMS for a list of released ZentriOS applications that you can install on your device. Select an app and click Update to program it to your device and run it.

Some apps require network access. A Configure step in the app installation process scans for available Wi-Fi access points and requests a passkey. The network credentials are saved to the device so that the app can start with network access.

Installing an application involves installing the entire firmware bundle supporting the app, including the ZentriOS-WZ version for which it was developed. To resume development after installing an app from the App Store, you need to run ZentriOS/Setup Device. See Getting Started, Running the ZentriOS Setup Device Wizard.