Hi,
This is possible but it changes placement of all other constants used in DopyDown function because in the prm file is :
COPY INTO ROM;
The COPY is keyword for project processing.
In your case I would split flash and create my own Segment/Placement. Then I would use a new part of flash for my constants. Finally, I would use own routine to initialize RAM variables.
Moreover, there are two ways of data placement into flash.
1) The new space is created into the prm file and then variables are placed into this space
//original ROM = READ_ONLY 0xFE0000 TO 0xFFFDFF;
// adjusted
ROM = READ_ONLY 0xFE1000 TO 0xFFFDFF;
MY_DATA_ROM = READ_ONLY 0xFE0000 TO 0xFF0FFF;
...
...
MY_DATA_ROM INTO MY_DATA_ROM ;
In the code:
#pragma CONST_SEG MY_DATA_ROM // MY_DATA_ROM is "MY" extra segment created in the prm file
const unsigned int xxx;
#pragma CONST_SEG DEFAULT
The variables are placed into this segment by compiler.(Usually from lowest address of crated space)
#pragma CONST_SEG MY_DATA_ROM
2) A part of flash is removed from compiler visibility. For example:
//original ROM = READ_ONLY 0xFE0000 TO 0xFFFDFF;
// adjusted
ROM = READ_ONLY 0xFE1000 TO 0xFFFDFF;
...
....
Then in the code you can initialize variable:
const __far xxx[] @ 0xFE0000 = { 1,2,3,4,};
I hope I have not made a mistake.
Best regards,
Ladislav