Echelon Neuron C User Manual
Page 52
![background image](/manuals/735747/52/background.png)
32
Compiler Directives
The #pragma optimization directive replaces the following directives:
#pragma codegen cp_family_space_optimization
#pragma codegen optimization_on
#pragma codegen optimization_off
#pragma codegen no_cp_template_compression
While all of these directives continue to work, the compiler issues the
NCC#589 warning message if you use these deprecated directives. If your
application uses any of these directives with the #pragma optimization
directive, the compiler issues the NCC#588 warning message.
If you specify code optimization in NodeBuilder (or from the command line for
the NCC tool), and you specify the #pragma optimization directive, the
compiler issues the NCC#590 warning message.
This directive is not supported in model files.
#pragma ram_test_off
For Series 3100 chips, disables the off-chip RAM buffer space test to speed up
initialization. Normally the first thing the Neuron firmware does when it
comes up after a reset or power-up is to verify basic functions such as CPUs,
RAM, and timer/counters. This can consume large amounts of time,
particularly at slower clock speeds. By turning off RAM buffer testing, you
can trade off some reset time for maintainability. All RAM static variables
are nevertheless initialized to zero.
This directive has no effect for a Series 5000 chip. System RAM (from
0xE800 to 0xEFFF) is always tested during reset, and the extended memory
area (extended RAM or non-volatile memory, from 0x4000 to 0xE7FF) is not
tested during reset.
This directive is not supported in model files.
#pragma read_write_protect
Allows a device’s program to be read and write protected to prevent copying
or alteration over the network. This feature provides protection of a
manufacturer’s confidential algorithms. A device cannot be reloaded after it
is protected. The write protection feature is included to disallow Trojan horse
intrusions. The protection must be specifically enabled in the Neuron C
source program. After a device is loaded with an application containing this
pragma, the application program can never be reloaded on a Neuron 3120xx
Chip or 3120 Smart Transceiver. It is possible, however, to erase and reload
a Neuron 3150 Chip or 3150 Smart Transceiver, with the use of the EEPROM
blanking programs. Likewise, it is possible to erase and reload the external
EEPROM of a Series 5000 device. For more information on the use of the
EEPROM blanking programs, see the Smart Transceivers data books.
This directive is not supported in model files.
#pragma receive_trans_count
num
Sets the number of receive transaction blocks to
num
. Valid values for
num
are 1 to 16. See
Allocating Buffers
in Chapter 8,
Memory Management,
of
the
Neuron C Programmer’s Guide
for more detailed information on this
pragma and its use.
This directive is not supported in model files.