disable copydown of rom constants

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

disable copydown of rom constants

Jump to solution
1,779 Views
mikeu
Contributor I
How can I force the compiler not to generate copy down code for rom constants.
 
For example if I have some constants like:
 
#pragma INTO_ROM
const signed char *test[4] =
{
{"one"},
{"two"},
{"three"},
{"four}
};
 
I do not want test included in the copydown section (and in ram)
Right now it is included in the copy down section in the map file when coded as above.
Any help is appreciated!!
 
 
Labels (1)
Tags (1)
0 Kudos
1 Solution
370 Views
CompilerGuru
NXP Employee
NXP Employee
The problem in your snippet is a missing const after the *.

Code:
const signed char * const test[4] ={

The first const says that the individual characters of each string are constant,
the const after the * states that the array members are constant too.

The #pragma INTO_ROM is as far as I remember only for the HIWARE object file format which you very probably do not use.

Daniel

View solution in original post

0 Kudos
2 Replies
371 Views
CompilerGuru
NXP Employee
NXP Employee
The problem in your snippet is a missing const after the *.

Code:
const signed char * const test[4] ={

The first const says that the individual characters of each string are constant,
the const after the * states that the array members are constant too.

The #pragma INTO_ROM is as far as I remember only for the HIWARE object file format which you very probably do not use.

Daniel
0 Kudos
370 Views
mikeu
Contributor I
That did it !!
 
Thanks very much for the help.
0 Kudos