Forum : 8051
Original Post
Post Information | Post |
---|---|
March 23, 2009 - 11:51am
|
Dear sirs, I wanna place a string (the firmware version) on a determined code address. but this way the reference to the variable in placed at 0x7f00 in xdata... Is there any chance to place a code variable in a determined address in the range 0..0x7fff (code memory common area)? |
I've solved using assembler rsource
; Startup relocatable CODE segment name is set here.
?PR?VERSION? SEGMENT CODE
NAME VERSION
CSEG AT 07F00H ;
stringFirmwareVersion:
DB '0.10 '
end
But is there any chance to do the same from C?
Thx
Solved!
Ok sirs, sorry for the n-th autoreply.
The problem was caused by a dirty define
#define code //bad!!!!!!
using
code at 0x7f00 unsigned char stringaVersioneCnc[]=defVersioneCNC;
works well
best regards