Constructing a custom system image – Echelon Neuron C User Manual

Page 243

Advertising
background image

Neuron C Programmer’s Guide

231

3

A custom system image can only contain pure C functions and data

objects. It cannot contain Neuron C extensions, such as network
variables, I/O objects, timers, when statements, and so on. The functions

documented in the

Neuron C Reference Guide

can all be used as pure C

functions

except

the functions pertaining to network variables, messages,

or input/output. Similar use restrictions apply to the Neuron C built-in

variables.

4

A custom system image cannot be used for a Neuron 3120xx Chip or 3120

Smart Transceiver.

5

A custom system image can contain many utility routines and data
tables, not all of which are useful for a given application program, thus

this could waste memory space.

6

A custom system image cannot contain references to any unresolved
symbols. All procedures and data objects in the custom system image

must refer to other procedures and objects in that same image, or to

procedures and objects that make up the underlying base image. The
base image is typically one of the standard system images, although it

could be another custom system image that is based on a standard

system image. Custom system images can be built in layers upon other
custom system images.

7

A custom system image can make only limited use of a Neuron Chip's
RAM memory, and it cannot use EEPROM memory. Functions and

constant data objects can only be placed in ROM or flash memory. Only a

limited amount of far RAM is available - a total of 64 bytes (for all layers
of a custom system image). No near RAM or EEPROM, nor any far

EEPROM can be declared or used directly. A custom system image

can

contain initialized RAM variables. The initialization rules are identical
to those of Neuron C application programs.

8

The process of constructing a system image is complex. There are several

details to keep straight, including keeping all the files up to date, and
keeping the image in the devices in sync with the image version files.

Because the NodeBuilder project manager does not assist in this, the

probability of making a mistake in the process is increased, and a
mistake in the custom system image process is not always self-evident.

Constructing a Custom System Image

You can construct a custom system image using the stand-alone versions of the
Neuron C compiler, Neuron assembler, and Neuron linker tools, as documented

in Appendix A,

Neuron C Tools Stand-Alone Use

, on page 211. Use the stand-

alone compiler and assembler to compile and assemble the pure C source files
that make up the custom portion of the system image. This compilation and

assembly process produces a Neuron Object file corresponding to each pure C

source file. Use the nld.exe Neuron linker to combine the Neuron object files into
a custom system image that can be used as described above.
You can use a standard system image as the base for a new custom system

image, or you can use another custom system image that was constructed
previously.
To construct a custom system image, perform the following steps.

Advertising