Echelon Neuron C User Manual
Page 42
22
Compiler Directives
The create_cp_value_files_uninit option is used to prevent the compiler from
generating configuration value files that contain initial values. Instead, the
value files are generated with no initial value, such that the Neuron loader
does not load anything into the block of memory; instead, the contents prior
to load are unaltered. This can be helpful if an application image needs to be
reloaded, but its configuration data is to remain unchanged.
The expand_stmts_off and expand_stmts_on options control statement
expansion. Normally, statement expansion is off. To permit the network
debug kernel to set a breakpoint at any statement whose code is stored in
modifiable memory for a Series 3100 chip, the statement’s code must be at
least two bytes in length. Due to optimization, some statements can be
accomplished in less than two bytes of generated Neuron machine code.
Activating statement expansion tells the code generator to ensure that each
statement contains at least two bytes of code by inserting a no-operation
(NOP) instruction if necessary.
Applications targeted for a Series 5000 chip do not need to enable statement
expansion. These devices support a one-byte breakpoint instruction, which is
automatically used when debugging. Thus, statement expansion and the
related increase in application size are not required for these devices.
The automatic configuration property merging feature in NodeBuilder 3.1
(and later) might change the device interface for a device that was previously
built with the NodeBuilder 3 tool. You can specify #pragma codegen
no_cp_template_compression in your program to disable the automatic
merging and compaction of the configuration property template file. Use of
this directive could cause your program to consume more of the device’s
memory, and is intended only to provide compatibility with the NodeBuilder
3.0 Neuron C compiler. You cannot use both the
no_cp_template_compression option and the cp_family_space_optimization
option in the same application program. This feature is independent of the
#pragma optimization directive.
The noptropt option can be desirable when debugging a program, because the
debugger does not have knowledge of whether the compiler has eliminated
redundant loads of a pointer between statement boundaries. If a breakpoint
is set in such circumstances, modification of the pointer variable from the
debugger would not modify the loaded pointer register which the compiler
can then use in subsequent statements. Use of this pragma avoids this
problem, but could also cause a substantial performance or size degradation
in the generated code. This codegen option should not be used except while
debugging.
The put_cp_template_file_in_data_memory option is used to direct the
compiler to create the configuration template file in a device’s data memory
instead of code memory. The purpose of doing this would be to permit write
access to the template file, or to permit more control over memory
organization to accommodate special device memory requirements.
In certain situations when linking a program for a Neuron 3150 Chip or a
3150 Smart Transceiver, it might be necessary to force the configuration
property template file into offchip memory rather than letting the linker
choose between offchip or onchip memory. Specify the
put_cp_template_file_offchip option to force the template file into offchip
memory.