Echelon Neuron C User Manual

Page 51

Advertising
background image

Neuron C Reference Guide

31

Level Optimization Performed

Notes

1

No optimization

Default for debug

targets

2 Minimal

optimization

CP templates are not compressed

3

General optimization

Default for release

targets

4

General optimization, plus optimization of

space for cp_family definitions

5 Maximum

optimization

You can use the following keywords instead of the numeric level indicators:

none

for level 0

debug

for level 1

standard

for level 3

all

for level 5

The keyword level indicators are generally preferred over their numeric
counterparts because they are self-documenting.
As part of optimization levels 3 and 4, the Neuron C compiler can attempt to

compact the configuration property template file by merging adjacent family
members that are scalars into elements of an array. Any CP family members

that are adjacent in the template file and value file, and that have identical
properties, except for the item index to which they apply, are merged. Using

optional

configuration property re-ordering and merging

can achieve

additional compaction beyond what is normally provided by automatic
merging of whatever CP family members happen to be adjacent in the files.

With this feature enabled, the Neuron C compiler optimizes the layout of CP

family members in the value and template files to make merging more likely.

Important: Configuration property re-ordering and merging can reduce the

memory required for the template file, but could also result in slower access

to the application’s configuration properties by network tools. This could
potentially cause a significant increase in the time required to commission

your device, especially on low-bandwidth channel types such as power line

channels. You should typically only use configuration property re-ordering
and merging if you must conserve memory. If you use configuration property

re-ordering and merging, be sure to test the effect on the time required to
commission and configure your device.
The default for debug targets is no optimization because the NodeBuilder

debugger allows you to place breakpoints in the source code, but after
optimization, the compiler might have collapsed two or more statements

together. In this case, the debugger might attempt to place a breakpoint in a

statement that does not exist in the optimized code. Thus, debugging
compiler-optimized code is not supported.

Advertising