William Hookway

CW10.0 pragma section begin

Discussion created by William Hookway on Mar 16, 2011
Latest reply on Mar 25, 2011 by KELLY CARTER


I am trying t o use the external RAM on the M52259EVL board.  I have defined a section as:


#pragma define_section extData ".extdata" ".extdatabss" far_absolute RW
#pragma section extData begin
unsigned char    myExtData = 5;
unsigned char    myExtData1;
unsigned char    myExtData2[10] = {1,2,3,4,5,6,7,8,9,0};
#pragma section extData end


Initialized variables are placed in .extdata as I would hope for.

myExtData1 is placed in bss and I have not been able to get it to .extdatabss.


If I try:


#pragma define_section extData ".extdata" ".extdatabss" far_absolute RW
#define    EXT_RAM        __declspec(extData)

EXT_RAM    unsigned char    myExtData = 5;
EXT_RAM    unsigned char    myExtData1;
EXT_RAM    unsigned char    myExtData2[10] = {1,2,3,4,5,6,7,8,9,0};


It works like a charm, any ideas?