I agree with all your statments.
The point that made me post is that I have to write the same information (the address) at two places : code and prm.
Since the prm will probably change, I'll have, as you say, to document and a maintain both informations by hands.
This makes me sad since there are many things possible with the linker, it misses just one tiny thing for me ...
Concerning the "0 value" if you have in code :
__SEG_END_DEF(CHECKSUM_PLACE);
#pragma CONST_SEG CHECKSUM_PLACE
/* No symbol defined */
#pragma CONST_SEG DEFAULT
const int *PointertoChecksum = __SEG_END_REF(CHECKSUM_PLACE);
and in the prm :
CHECKSUM_SECT =READ_ONLY 0xFBBC TO 0xFBBF ;
CHECKSUM_PLACE INTO CHECKSUM_SECT ;
Then :
at link : "WARNING L4024: No information available for segment 'CHECKSUM_PLACE'"
at runtime Hiwave indicates :
PointertoChecksum = 0
__SEG_END_CHECKSUM_PLACE = 0, size 0
__SEG_END_CHECKSUM_PLACE[0]=0 size 1 ???????????
If this pointer was well initialized (PointertoChecksum = 0xFBBF) despite the fact that the CHECKSUM_PLACE is empty, then everything would be fine : no overlapped symbols, and in the code I am sure that I have the real address of my data, whatever happened to the prm.
Perhaps this is due to an optimization ?
Thanks for the 0 sized object trick. I'ts the kind of solution I like, but I cannot implement...
My prm is generated using a spreadsheet.
Maybe if I can launch a macro inside the sheet from command line, I will include the "gear" that my "mechanic" lacks using makefile, this way I will be able to maintain consistency between adresses in code and prm.
Regards,
Pierre