beautypg.com

Echelon Neuron User Manual

Page 90

background image

82

Neuron C Compiler Errors (NCC)

NCC#

Description

264

The fastaccess feature only applies to arrays [NCC#264]

The optional fastaccess feature should only be used in declarations of array

variable types. The feature does not apply to the indexing operator applied
to pointers.

265
266

267

The stack frame of this procedure is too large (>200 bytes) [NCC#265]

The stack frame of this procedure exceeds 100 bytes [NCC#266]

The stack frame of this procedure exceeds 7 bytes [NCC#267]

On Neuron Chips, references to variables near the top of the stack use the

most efficient instructions. The further down in the stack one goes, the less

efficient the instructions become. This inefficiency affects both the code
size and the code performance. A stack frame larger than seven bytes

begins to incur this penalty. The stack frame includes the parameters and

the local variables.

Neuron Chips do not have very large memory areas set aside for stacks.

Procedures whose stack frame exceed 200 bytes would fail to work;

therefore, this is a compile-time error. Procedures with stack frames in
excess of 100 bytes are flagged with a special warning message because

they use more than half of the stack resources, and nesting these functions

would cause a stack overflow. The compiler does not specifically check for
nesting, but it attempts to use this warning to catch large procedures.
Note that the Neuron chip’s hardware architecture suggests preferring a
large number of small functions over fewer, but larger, functions. Smaller

functions typically lead to much smaller stack frames for each function,

which also allows for more efficient code and thus results in a smaller code
footprint.
See Chapter 8 of the

Neuron C Programmer’s Guide

for more information

on managing memory resources.

268

Recommend use of an unqualified 'msg_arrives' event [NCC#268]

A program which receives explicit messages through the msg_arrives event
will be given all such messages which come into the device, whether their

message codes are expected or not. Any unexpected messages must be

handled by the program through a "catch-all" unqualified msg_arrives
event, otherwise such messages will get stuck at the head of the message

queue. See the chapter on messages in the

Neuron C Programmer's Guide

for more information on processing incoming messages.