Using the ZentriOS SDK
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.
- Setup Device - This runs a complete set up for the currently connected ZentriOS device. See Building for a New Device.
- App Store for Devices - See App Store
- Edit SDK Settings - See Editing SDK Settings
- View Online Documentation - Open the documentation at docs.zentri.com/wifi/sdk/latest
- View Welcome - Open the Zentri SDK Welcome page.
- View SDK License - Opens the SDK license for review
- About ZentriOS SDK - Displays the version and build number of the currently installed SDK.
- Update Plugin - Checks for ZentriOS SDK plugin updates and installs if the latest version is more recent than the installed version.
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.
To open the ZentriOS Project Menu, right-click a ZentriOS project (other than the ZentriOS SDK project) and choose
ZentriOS in the context menu.
- Build Project - See Building Applications
- Build/Download - See Building Applications
- Build/Download/Run - See Building Applications
- Build/Download/Debug - See Building Applications
- Clean Project - See Cleaning the Project
- Run Application - run the application. This option requires the app to be built and downloaded to the device. See Building Applications.
- Download All - Download app binary and resources to the ZentriOS device. See Building Applications.
- Modify Project Settings - See Modifying Project Settings
- Release to Device Management server - see Releasing Apps to the DMS
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.
- 1 Debug (Build application with no optimization) - this is the default. Use this configuration while developing an app to allow debugging.
- 2 Release (Build application with full optimization) - choose this option when development is complete and you are ready to release.
Creating a New Project
See Getting Started, Creating a New Project.
Location of Source Files
When you create a new SDK ZentriOS project, the project directory is by default created in your Eclipse IDE workspace. To use source files outside the ZentriOS project or SDK directories, see Source File Location.
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
The following is a summary of options and defaults:
The ZentriOS project menu provides the following choices for building an application:
- Build Project - build the project and report any errors.
- Build/Download - build the project and download the app to the device.
- Build/Download/Run - build the project, download the app to the device and run it.
- Build/Download/Debug - build the project, download the app to the device and run it in debug mode. See Debugging.
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.
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 ""
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
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
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
Project settings are listed with brief descriptions below:
# The name of the project component
# The name of the project
# The platform of the target device
# Enable/disable automatic generation of static function prototypes in project source code
# Automatically include source files found in the project directory
# List of files to include in the project build. Paths relative to the project's directory
# List of regular expressions to use for including source files into the build
# List of regular expressions to use for excluding source files into the build
# List of referenced libraries
# List of absolute paths to library directories
# Pre-processor symbols for this project component only (not referenced libraries)
# Pre-processor symbols for the entire build (this project and all referenced libraries)
# 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)
# C compiler flags for project component only (not referenced libraries)
# C compiler flags for the entire build (this project and all referenced libraries)
# Assembler flags for project component only (not referenced libraries)
# Assembler flags for the entire build (this project and all referenced libraries)
# Linker flags for the entire build (this project and all referenced libraries)
# Path to resource manifest .json file (path is relative to project directory)
# Paths to app settings .ini files (paths are relative to project directory)
# 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
# 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.
Adding Resources to the Product Bundle
- Select the
Resourcestab in the Project Settings dialog.
- Search your local PC for a file
- Modify the file's properties
- Repeat to add more files
- When done, click
Save and Exit
The file is added to the bundle. The next time you choose
build/download the resources are downloaded to the device.
When you release the bundle, the resources are pushed to the DMS.
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.