Projects

Projects are combinations of modules. You create a project by specifying which modules the project should include and then build the project using the make command. Modules can be either the ones written by Lantronix, or the custom modules that you create. Projects are in the custom/project directory. Building a project produces a ROM file (firmware), which can then be flashed into an XPort EDGE device.

Structure

Projects only consist of two files:

  • Modules.make tells the compiler which modules to include in the app
  • Makefile controls the firmware version and tells the compiler where to save the ROM file

Creating Projects

  1. In custom/project, create a directory for the new project. Note projects must be in custom/project in order to compile.
  2. In project_name, create modules.make and define MODULE_NAMES as the modules to be used in the project.
  3. Copy a Makefile file from any of the other custom modules and place it in project_name.
  4. Optionally, modify SDK_VERSION in the Makefile.

Building Projects in Windows

  1. Go to the SDK installation directory (c:/xPortEdge/ by default) and double-click msys2_shell.
  2. Change to the project directory within the installation directory.
    cd /install_directory/custom/project/project_name
  3. Type make to build the project.
  4. The project builds and MinGW-shell displays the summary. The ROM is saved in xPortEdge/work/project_name. The terminal window 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)

Building Projects in Linux

  1. Go to the SDK installation directory. This is where you extracted the .tar file previously.
  2. Change to the project directory within the installation directory.
    cd custom/project/project_name
  3. Type make to build the project.
  4. The project builds and the shell displays the summary. The ROM is saved in xPortEdge/work/project_name. The terminal window 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)