Hi Ma
Your description helps but I'm still having problems connecting my C code to the linker script.
In my case my linker script is as follows. I would like to place my high speed buffer into memory location = m_data_20000000.
MEMORY {
m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x000001E0
m_text (RX) : ORIGIN = 0x00000410, LENGTH = 0x0007FBF0
m_data (RW) : ORIGIN = 0x60000000, LENGTH = 0x00080000
m_data_00000000 (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00010000
m_data_20000000 (RW) : ORIGIN = 0x20000000, LENGTH = 0x00010000
m_cfmprotrom (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010
}
In the C code I have the following questions:
#pragma define_section high_speed_buffer_storage ".m_data_20000000" abs32 RW
//question: can you tell me what the named section abs32 represents? Does it matter what I place here?
__declspec(section "high_speed_buffer_storage ") GuiConst_INT8U Display[511];
// question: I've search my code and I cannot find any reference to GuiConst_INT8U.
// This look like its a variable type definition. Where is this defined?
What syntax is needed for my case of __declspec line to assign mybuffer to the memory section high_speed_buffer_storage?
My variable type is: in_bufq
My buffer is as follows:
typedef struct
{
int32_t bufNumber;
int32_t bufSize;
}NET_BUFQ;
#pragma define_section high_speed_buffer_storage ".m_data_20000000" abs32 RW
__declspec(section "high_speed_buffer_storage") NET_BUFQ in_bufq[3];
NET_BUFQ in_bufq[] =
{
{ 16, 128 },
{ 33, 512 },
};
The compiler output is as follows:
D:/Freescale/CW MCU v10.4/MCU/ARM_GCC_Support/ewl/EWL_C/include/ctime:45:0: warning: ignoring #pragma options align [-Wunknown-pragmas]
D:/Freescale/CW MCU v10.4/MCU/ARM_GCC_Support/ewl/EWL_C/include/ctime:307:0: warning: ignoring #pragma options align [-Wunknown-pragmas]
../Sources/userdata.c:230:0: warning: ignoring #pragma define_section high_speed_buffer_storage [-Wunknown-pragmas]
../Sources/userdata.c:231:20: error: expected ')' before string constant
mingw32-make: *** [Sources/userdata.o] Error 1
What am I doing wrong?