Hello
It depends on the type of the object you wish to place there.
If it is a variable, variable definition should be done as follows:
#pragma DATA_SEG MyDataSegment
int myVar;
#pragma DATA
EG DEFAULT.
You can then retrieve the segment start & end address using __SEG_START_MyDataSegment and __SEG_END_MyDataSegment .
If it is a constant, constant definition should be done as follows:
#pragma CONST_SEG MyConstSegment
conts int myVar= 10;
#pragma CONST_SEG DEFAULT.
You can then retrieve the segment start & end address using __SEG_START_MyConstSegment and __SEG_END_MyConstSegment.
If it is a function, function implementation should be done as follows:
#pragma CODE_SEG MyCodeSegment
void foo(void) {
}
#pragma CODE_SEG DEFAULT.
You can then retrieve the segment start & end address using __SEG_START_MyCodeSegment and __SEG_END_MyCodeSegment.
.
CrasyCat