Echelon Neuron C User Manual

Page 187

Advertising
background image

Neuron C Programmer’s Guide

175

• Each address table entry requires 5 bytes. A maximum of 15 address

table entries are allowed. The minimum is 0. The default is 15 entries.

See

Address Table

on page 188.

• Each network variable declared (input or output) uses 3 bytes for its

configuration information. In addition, it uses 3 bytes of read-only

memory for its fixed information. If you use the SNVT self-identification

(SI) feature, there is an additional 7-byte fixed overhead plus 2 additional
bytes per network variable (minimum).

• Each network variable alias table entry uses 4 bytes. There is no default

for the size of this table. See

Alias Table

on page 189.

• Variables declared as eeprom and config in your program use an amount

of EEPROM corresponding to its C data type. This includes network

variables of the config_prop (or cp) class and modifiable configuration

parameters declared using the cp_family keyword (the latter are stored
together in a writable value file). See

Default Memory Usage

on page

180.

• The when clause table is placed in the code memory area (ROM, if

available, or EEPROM). Each when clause uses a table entry from 3 to 6

bytes (most are 3 bytes). This code space is usually slightly smaller than
the equivalent code generated by an if statement. Additional code space

can result from when clauses containing user-defined events.

• The interrupt dispatcher and the interrupt_control( ) function are placed

in the code memory area (ROM, if available, or EEPROM or flash

memory). The interrupt_control( ) function takes a constant, small,
amount of code space (12 bytes at the time of release, but the exact

number is subject to change). The interrupt dispatcher is optimized for

the each application, and consumes the smallest amount of memory
possible. Its size varies with the number and type of interrupt tasks that

your application defines.

• The read-only value file is normally placed in the CODE memory area

(this can be ROM, if available, or EEPROM). The configuration value

files use only the number of data bytes required by the data types of the
configuration properties contained within. The #pragma codegen

put_read_only_cps_in_data_memory directive instructs the linker to

place the read-only value file in a modifiable memory area instead of the
CODE memory area. See the

Compiler Directives

chapter in the

Neuron

C Reference Guide

for more information about this directive. There is no

additional overhead. The configuration template file is also placed in the
CODE memory area. The template file uses a number of bytes to

describe each configuration property in the value files. This number
varies based on the type and characteristics of the configuration property,

but it is typically 12 or more bytes per configuration property instance.

See the

Compiler Directives

chapter in the

Neuron C Reference Guide

for

more information about the #pragma codegen

cp_family_space_optimization compiler directive. Use of this directive

can substantially reduce the size of the configuration property template
file.

Advertising