Neuron-hosted and host-based compilation – Echelon Neuron C User Manual
Page 24

12
Overview
Neuron-Hosted and Host-Based Compilation
Compilation for Neuron-hosted devices, that is, devices based on a Neuron Chip
or Smart Transceiver as the main processor, use Neuron C to define all aspects of
the device’s application:
• The application’s interoperable interface, including its set of network
variables, configuration properties, and functional blocks, and the self-
identification and self-documentation data
• Device configuration information, such as buffer configuration
• Application code including, when tasks, interrupt tasks, I/O device
declarations, and functions
Compilation for host-based devices, that is, devices that implement the
application on a different processor (the
host processor
), often use a subset of the
Neuron C language to model the device’s interoperable interface. For these
devices, the Neuron C source code acts as a model for the finished application,
and the primary source file is called the
model file
. Compilation for host-based
devices uses Neuron C to define only the following aspect of the device’s
application:
• The application’s interoperable interface, including its set of network
variables, configuration properties, and functional blocks, and the self-
identification and self-documentation data
The ShortStack Developer’s Kit, FTXL Developer’s Kit, and the
i
.LON
SmartServer all use model files. See the related product documentation for
information about compiling a model file, and about implementing the device’s
application (including the device configuration information and application code).
Syntactically, a Neuron C application and a model file differ in the following
ways:
• Declaration of the interoperable interface is largely identical, however, a
few exceptions exist which are identified throughout this book, as
necessary.
• Device configuration is typically adjusted using a product-specific tool,
such as the LonTalk Interface Developer utility, and is not specified in a
model file. When encountered within a model file, device configuration
constructs can trigger a compiler error or warning.
• Application code, including I/O device declarations, application timer
declarations and any form of executable code, is ignored in a model file.
Such code results in a warning for model file compilation, and the code
has no effect.
You can use conditional compilation to prepare the same source code for use as
Neuron C application and a model file. The _MODEL_FILE preprocessor symbol
is automatically predefined for model file compilation, and is not predefined for
application compilation. See the
Neuron C Reference Guide
for more information
about predefined preprocessor symbols.