Quan Nguyen

Coldfire: How to use symbols in lcf file?

Discussion created by Quan Nguyen on Sep 14, 2006
Latest reply on Sep 14, 2006 by CompilerGuru
Hi all,

Since I am a newbie to CW, please excuse me for such a elementary question.

I'm using CW 6.3 with M5211DEMO board. In the M5211DEMO_SRAM.lcf file, I declare a buffer as:
___BUF_SIZE = 0x400;
___BUF_START = ___HEAP_END;
___BUF_END = ___BUF_START + ___BUF_SIZE;

I want to use these symbols, so in a header file (test.h), I re-define them as:
#define BUF_START ___BUF_START
#define BUF_SIZE ___BUF_SIZE

In the main program, I include "test.h" and use BUF_START and BUF_SIZE in main(). However, when I compile, I got the error message saying that ___BUF_START and ___BUF_SIZE are undefined identifiers.

Can anyone let me know what I am missing here?

Thank you very much.

Message Edited by CrasyCat on 2007-04-13 02:18 PM

Outcomes