Hi,
The only thing you have to do is to modify your linker command file.
In your linker file add those two lines
* (.const.data.char)
* (.const.data)
to section that is mapped to xFlash (Data Flash)
so every constant declaration (int, long, or char, etc.) will be put in Data
Flash, dont need to put all constant in one file. Put your constant where you
want!
Exemple:
.InitializedConstData :
{
* (.const.data.char)
* (.const.data)
#const.c (.data) # DONT NEED
#appconst.c (.data) # DONT NEED
} > .xFlash # mapped to x Flash
Bye
FC
Constant Data
Started by ●August 5, 2005
Reply by ●August 11, 20052005-08-11
If you use codewarrior 7.2, the constants can also be
put in program flash. So every constant declares with
prefix "__pmem", such as "__pmem const int x;", will
be put in program flash and uses like data stored in
data memory space. But link command file also needs to
be modified by adding * (.const.data.pmem) in >.p_code
section, example:
.ApplicationCode :
{ * (.text)
* (rtlib.text)
* (startup.text)
* (fp_engine.text)
* (user.text)
* (.const.data.pmem) #to put constant in
program flash. } > .p_Code C.W.
--- fred_cantin@fred... wrote:
> Hi,
>
> The only thing you have to do is to modify your
> linker command file.
> In your linker file add those two lines
>
> * (.const.data.char)
> * (.const.data)
>
> to section that is mapped to xFlash (Data Flash)
>
> so every constant declaration (int, long, or char,
> etc.) will be put in Data Flash, dont need to put
> all constant in one file. Put your constant where
> you want!
>
> Exemple:
>
> .InitializedConstData :
> {
> * (.const.data.char)
> * (.const.data)
> #const.c (.data) # DONT NEED
> #appconst.c (.data) # DONT NEED
> } > .xFlash # mapped to x Flash > Bye
> FC
>
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
put in program flash. So every constant declares with
prefix "__pmem", such as "__pmem const int x;", will
be put in program flash and uses like data stored in
data memory space. But link command file also needs to
be modified by adding * (.const.data.pmem) in >.p_code
section, example:
.ApplicationCode :
{ * (.text)
* (rtlib.text)
* (startup.text)
* (fp_engine.text)
* (user.text)
* (.const.data.pmem) #to put constant in
program flash. } > .p_Code C.W.
--- fred_cantin@fred... wrote:
> Hi,
>
> The only thing you have to do is to modify your
> linker command file.
> In your linker file add those two lines
>
> * (.const.data.char)
> * (.const.data)
>
> to section that is mapped to xFlash (Data Flash)
>
> so every constant declaration (int, long, or char,
> etc.) will be put in Data Flash, dont need to put
> all constant in one file. Put your constant where
> you want!
>
> Exemple:
>
> .InitializedConstData :
> {
> * (.const.data.char)
> * (.const.data)
> #const.c (.data) # DONT NEED
> #appconst.c (.data) # DONT NEED
> } > .xFlash # mapped to x Flash > Bye
> FC
>
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs