Getting Started

This section covers installation of the SDK, accessing an xPico 200 series device, and a quick start guide to help you build and deploy your first application.

Install the SDK

  • Prerequisites: There are no prerequisites for using the xPico 200 SDK on Windows.
  • System Requirements: Currently, the xPico 200 SDK is only available for Windows 7 or later.

Important

Always back up your custom code in the custom/module directory when updating or reinstalling the SDK.

  1. Download the latest version of the SDK installation file from New Releases on the Gateway OS (RTOS) - SDK (xPico 200) Lantronix Forum.
  2. Double-click the file to launch the InstallShield Wizard.
  3. Click Next.
  4. Select I accept and then click Next.
  5. Click Install. If prompted, click Yes to allow the program to make changes to your computer.
  6. The InstallShield Wizard installs the SDK at C:/xPico200. This process could take a few minutes. When the installation is complete, click Finish.

Access the Device

There are three ways to access the xPico 200 series device:

  • The Web Manager application provides browser-based access to all features.
  • The Web API provides access to all features through standard HTTP requests.
  • The CLI provides access to all configuration options, but keep in mind you cannot upload custom firmware via the CLI.

The examples in this section use Web Manager to upload custom firmware to the xPico 200 device. Refer to the xPico 200 Series User Guide for more information on accessing the device.

Build and Deploy Firmware

These quick start guides provide a high-level walkthrough of building and deploying the Hello World and the Line Echo demo applications. The purpose of these guides is to quickly demonstrate the overall process for building ROM files and uploading them to an xPico 200 device.

Quick Start: Hello World

The helloDemo module contains code that prints "Hello World" to the command line once every two seconds when the firmware is loaded onto the xPico 200 device.

Step 1: Build the project

  1. Go to the SDK installation directory.
  2. Double-click MinGW-shell to open a MinGW window.
  3. Change to the helloDemo project directory. cd /c/xPico200/custom/project/helloDemo/
  4. Type make to build the project. The CLI reports the image summary when the project compiles successfully.
   Image Summary (Partition size is 0x1E0000):
      Flash Usage: 1208112 of 1966080 (61%, 757968 remaining)
      SRAM Usage: 631024 of 2097152 (30%, 1466128 remaining)

Step 2: Upload the ROM

Now upload the ROM file you just built.

  1. Open Web Manager, go to the Device page, and click Firmware Upgrade.
  2. Click Choose File, browse to work/helloDemo, and select the ROM file.
  3. Click Upload and then click OK to confirm that you want to upload a new firmware image. The device erases the old image and receives and writes the new image. After the new firmware is written, the device reboots automatically. It may take a few minutes for this process to complete.

Step 3: Change Line 1 Protocol

Next, change Line 1 to the new Hello World protocol you just uploaded.

  1. In Web Manager, go to the Line page and click Configuration.
  2. From Protocol, select Hello World and then click Submit. The changes take effect immediately.
  3. Open a terminal emulator (e.g. Tera Term) and connect to the COM port the device is connected to. The xPico 200 prints "Hello World" to the terminal once every two seconds.
Hello world
Hello world
Hello world

Quick Start: Line Echo

The echoDemo module contains code that reads each character from the input buffer and prints it back to the line when the firmware is loaded onto the xPico 200 device.

Step 1: Build the project

  1. Go to the SDK installation directory.
  2. Double-click MinGW-shell to open a MinGW window.
  3. Change to the echDemo project directory. cd /c/xPico200/custom/project/echoDemo/
  4. Type make to build the project. The CLI reports the image summary when the project compiles successfully.
   Image Summary (Partition size is 0x1E0000):
      Flash Usage: 1208112 of 1966080 (61%, 757968 remaining)
      SRAM Usage: 631024 of 2097152 (30%, 1466128 remaining)

Step 2: Upload the ROM

Now upload the ROM file you just built.

  1. Open Web Manager, go to the Device page, and click Firmware Upgrade.
  2. Click Choose File, browse to work/echoDemo, and select the ROM file.
  3. Click Upload and then click OK to confirm that you want to upload a new firmware image. The device erases the old image and receives and writes the new image. After the new firmware is written, the device reboots automatically. It may take a few minutes for this process to complete.

Step 3: Change Line 1 Protocol

Next, change Line 1 to the Echo protocol option you just uploaded.

  1. In Web Manager, go to the Line page and click Configuration.
  2. From Protocol, select Echo and then click Submit. The changes take effect immediately.
  3. Open a terminal emulator (e.g. Tera Term) and connect to the COM port the device is connected to. For each character received on the line, the xPico 200 prints the character back to the line. Note that the Line returns each character immediately when you press a key.