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 xPico 200 series device.
Structure¶
Projects only consist of two files:
Modules.make
tells the compiler which modules to include in the appMakefile
controls the firmware version and tells the compiler where to save the ROM file
Creating Projects¶
- In
custom/project
, create a directory for the new project. Note projects must be incustom/project
in order to compile. - In
project_name
, createmodules.make
and defineMODULE_NAMES
as the modules to be used in the project. - Copy a
Makefile
file from any of the other custom modules and place it inproject_name
. - Optionally, modify
SDK_VERSION
in the Makefile.
Building Projects in Windows¶
- Go to the SDK installation directory (c:/xPico200/ by default) and double-click MinGW-shell.
- Change to the project directory within the installation directory.
cd /install_directory/xPico200/custom/project/project_name
- Type
make
to build the project. - The project builds and MinGW-shell displays the summary. The ROM is saved in
xPico200/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¶
- Go to the SDK installation directory. This is where you extracted the .tar file previously.
- Change to the project directory within the installation directory.
cd custom/project/project_name
- Type
make
to build the project. - The project builds and the shell displays the summary. The ROM is saved in
xPico200/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)