The ZTC compiler takes a project as input and produces an executable bytecode file ready to be uplinked on a virtualized.
ztc compile project target
compiles the source files found at
project (the project path) for a device with target
The entry point of the program is the file
main.py. Every additional Python module needed wil be searched in the following order:
Directories passed with the
-Ioption in the given order (see below)
The Zerynth standard library
The installed libraries
Since Zerynth programs allow mixed C/Python code, the compiler also scans for C source files and compiles them with the appropriate C compiler for
target. C object files are packed and included in the output bytecode.
compile command accepts additional options:
-I/--include path, adds
pathto the list of directories scanned for Zerynth modules. This option can be repeated multiple times.
-D/--define def, adds a C macro definition as a parameter for native C compiler. This option can be repeated multiple times.
-o/--output path, specifies the path for the output file. If not specified it is
main.vboin the project folder.