Thanks Daniel for your reply, but I have already done that. My compiler options are the following:
Code:-CPUHCS12X -D_BootLoader -D__FAR_DATA -D__NO_FLOAT__ -Lasm=%n.lst -Mb -Ot -Onf -OiLib=a -OnB=abl -OnCstVar -OnPMNC -PSegObj -TuE
Here are som extracts from my PRM file:
Code:/* non-paged RAM */ STK = READ_WRITE 0x3D00 TO 0x3FFF; RAM = READ_WRITE 0x2000 TO 0x3CFF ALIGN 2[1:1]; /* word align for XGATE accesses */../* paged RAM: 0x1000 TO 0x1FFF; addressed through RPAGE */ RAM_XGATE_STK = READ_WRITE 0xFC1000 TO 0xFC10FF; /* The stack is set by the XGATE compiler option -Cstv=C100 */ RAM_FC = READ_WRITE 0xFC1100 TO 0xFC1FFF ALIGN 2[1:1]; /* is also mapped to XGATE: 0xC100..0xCFFF */ // RAM_FD = READ_WRITE 0xFD1000 TO 0xFD1FFF ALIGN 2[1:1]; /* is also mapped to XGATE: 0xD000..0xDFFF *//* RAM_FE = READ_WRITE 0xFE1000 TO 0xFE1FFF; intentionally not defined: equivalent to RAM: 0x2000..0x2FFF *//* RAM_FF = READ_WRITE 0xFF1000 TO 0xFF1FFF; intentionally not defined: equivalent to RAM: 0x3000..0x3FFF */.. //SSTACK, /* allocate stack first to avoid overwriting variables */ SHARED_DATA, /* variables that are shared between CPU12 and XGATE */ DEFAULT_RAM /* all variables, the default RAM location */ INTO RAM; SSTACK INTO STK; XGATE_VECTORS, /* XGATE vector table has to be copied into RAM by HCS12X */ XGATE_STRING, /* XGATE string literals have to be copied into RAM by HCS12X */ XGATE_CONST, /* XGATE constants have to be copied into RAM by HCS12X */ XGATE_CODE, /* XGATE functions have to be copied into RAM by HCS12X */ XGATE_STRING_RAM, /* XGATE strings that should always go into RAM */ XGATE_CONST_RAM, /* XGATE constants what should always go into RAM */ XGATE_CODE_RAM, /* XGATE code that should always run out of RAM */ XGATE_DATA /* data that are accessed by XGATE only */ INTO RAM_FC /*, RAM_FD */; //PAGED_RAM /* paged data accessed by CPU12 only */ // INTO /* when using banked addressing for variable data, make sure to specify // the option -D__FAR_DATA on the compiler command line */ // RAM_FD /*, RAM_FC */;
I had assumed that I just could change the start address of the RAM segment from 2000 to 1000 (and assure that the RPAGE is set to FD) without having to do anything else (as converting the whole program to paged data with three-byte pointers and such). When I look at the datasheet, I get the impression that one RAM-page always should be present between 1000...1fff, and so it lookes when I look at the area with the debugger, but when I try it the program crashes in the init()-routine.
thanks for any further info
Sten