|ARM Technical Support Knowledge Articles|
Applies to: C166 C Compiler
Information in this article applies to:
I need to create multiple data classes in a single file. For example, the following would be ideal:
#pragma RENAMECLASS (NDATA=SPECIALCLASS) static unsigned byte Spare; #pragma RENAMECLASS (NDATA=NORMCLASS) static unsigned byte Finished;
Is there a way to do this in C166 Version 3?
This is not available in C166 Version 3 since you can only use the RENAMECLASS directive once for each class in a C file. However, the following work-around may help.
You may use the INIT and NOINIT pragmas to specify which data goes into the NDATA0 and NDATA classes. Then, you can rename these classes. For example:
#pragma INIT #pragma RENAMECLASS (NDATA0=SPECIALCLASS) static unsigned byte Spare; #pragma NOINIT #pragma RENAMECLASS (NDATA=NORMCLASS) static unsigned byte Finished;
Typically, the stuff that goes into NDATA0 is cleared to 0 when your program starts. You may specify if the NDATA0 class should be cleared to 0 in START167.A66.
Article last edited on: 2006-01-25 20:21:49
Did you find this article helpful? Yes No
How can we improve this article?