Hi,

I'm trying to allocate an constant array with code composer.
How can I initialize the variables, example, I need to create the following
array of data and to initialize its contents, example:

With IAR I could do this:

#pragma location=0x1000
const uint8 firmwareversion[]={ 1,2,3,4};

With Code Composer...
//In the linker command file
firmwareversion =  0x1000;

In the C source code I need to declare as External, but how to initialize an
external array?
extern const uint8 firmwareversion[]={ 1, 2, 3, 4};

Aftwer compiling and linking, the output file have the firmwareversion
variable correctly in the 0x1000 memory address, but, the array is not
initialized.
The examples given in the slau157g shows constants declarations but with no
initilization, as bellow:

/* IAR C Code */
__no_init char alpha @ 0x0200; /* Place ‘alpha' at address 0x200 */
#pragma location = 0x0202
const int beta;

/* CCE Linker Command File Entry */
alpha = 0x200;
beta = 0x202;
/* CCE C Code */
extern char alpha;
extern int beta;

Thanks in advance
-- 
View this message in context: 
http://www.nabble.com/Code-composer-MSP430-absolute-address-variables-allocation-tp19378694p19378694.html
Sent from the MSP430 gcc - Users mailing list archive at Nabble.com.


Reply via email to