Reduce the number of address table entries, Remove self-identification data if not needed – Echelon Neuron C User Manual

Page 212

Advertising
background image

200 Memory

Management

also included in the optionally produced link map file (if your Neuron C

development tool supports link maps).

Reduce the Size of the Configuration Property
Template File

Consider using the #pragma codegen cp_family_space_optimization directive.

This results in an aggressive re-ordering of configuration property template and

value file contents, aiming at reducing the total size of the template file.
Depending on the specific application, this directive can have little effect or make

a huge difference.
Note that optimizing the configuration property files for size might result in
reduced performance when commissioning or configuring devices, especially

when being used on or through low-bandwidth channels. See the

Compiler

Directives

chapter in the

Neuron C Reference Guide

for more information and

important considerations about these directives.
#pragma codegen cp_family_space_optimization is also enabled when you select
the highest optimization level, using the #pragma optimization all directive.

Reduce the Number of Address Table Entries

A good rule of thumb is to assume that the minimum number of address table

entries that a fully connected Neuron C application program can use is the sum
of the number of non-polled output network variables, polled input network

variables, and bindable message tags. A bindable message tag is one that does

not

include bind_info (nonbind) in its declaration. For example, an application

with one message tag and two output network variables (one of which is an array

of four elements), would need a maximum of six address table entries.
However, additional address table entries might be needed for input network
variables which are in one or more groups, one entry being used for each group,

or for any alias network variable that is associated with any of the input or
output network variables on the device. Finally, each group connection to a

device’s msg_in tag uses an address table entry.
If your program does not explicitly receive messages (and therefore has no
connections to the msg_in tag), and it has only a few network variables that are

each connected only in a point-to-point manner (that is, no group connections),

you could reduce the number of address table entries. Other situations could
require further analysis to determine if the number of address table entries could

be reduced.
The default number of address table entries is 15. The value can be reduced with
the #pragma num_addr_table_entries directive (see the

Compiler Directives

chapter in the

Neuron C Reference Guide

). Reducing the number of address

table entries saves 5 bytes of EEPROM per entry eliminated.

Remove Self-Identification Data if Not Needed

The Neuron C compiler places self-identification data in the device’s program

space. This data consumes EEPROM. If your program is not using SNVTs, you

Advertising