This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How can I inlcude "C" header files into the link command file?

Hello, I have some basic question regarding the link command file.

The question is,

how to to include header files into the link command file?

I tried as below, but CCS complains:

===> error: illegal input character: hex 23

 

 

=== header fiile ===

system_def.h

#define PLATFORM_TYPE_A

... etc

 

=== link command file ===

#include "system_def.h"   /* how can I put this thing in the link command file?*/

MEMORY
{

#ifdef PLATFORM_TYPE_A
   VEC:         o=0x00000000 l=0x00000800
   L2:            o=0x00000800 l=0x00080000
   SDRAM:   o=0x80000000 l=0x10000000

#else

   /* some other memory mapping,,, */

#endif
}

SECTIONS
{

/* section */

}