Hello
So if it is for StarCore, you need to use an application configuration file.
Using #pragma rom_seg_name works too, but all constants within that module will be allocated in the same user defined segment.
Not sure that this is what you are looking for.
You define one or several rom segments there and then you place your variables in the different segments.
configuration
view MyView
section
rom = [
myConst1: ".MY_CONST_1",
myConst2: ".MY_CONST_2",
]
end section
place (_tab) in myConst1
place (_tab2) in myConst2
end view
end configuration
Then you place the two sections wherever you want in the linker control file.
Example below will place _tab at address 0x8007f000 and _tab2 at 0x80080000
.org 0x8007f000
.segment .myConst1, ".MY_CONST_1"
.org 0x80080000
.segment .myConst2, ".MY_CONST_2"
I am not sure where you have memory on your system, but this is the main idea.
Note that the constant are defined as tab and tab2 in the source code.
Compiler internally adds a _ prefix to symbol names.
I hope this helps.
CrasyCat
Message Edited by CrasyCat on
2007-05-21 02:33 PM