31
FreescaleTM MC9S12NE64 / Re: No memory from 0x8000 to 0xbfff
« on: October 16, 2008, 10:18:04 PM »
I found this on the Freescale forum and it works. What a mess, though.
Regards, Ewan.
http://forums.freescale.com/freescale/board/message?board.id=CW816COMM&thread.id=4146
Here's the solution given to me by Freescale:
"... The previous solution I mentioned was not useful as there was no possibility to debug the code. So finally the one possible solution is just include the PAGE_3C segment into your default placements :
PLACEMENT
_PRESTART, STARTUP,
ROM_VAR, STRINGS,
VIRTUAL_TABLE_SEGMENT,
DEFAULT_ROM , NON_BANKED,
COPY INTO ROM_C000,
ROM_4000,PAGE_3C;
(please notice the order of segments!)
And to ensure the correct PPAGE register settings you have to modify Start12c file (_Startup function)
___INITRM = 0x39; /* lock Ram to end at 0x3FFF */
/* new line to set the correct PPAGE register value */ *(unsigned char *)0x30 = 0x3C;
#ifdef _HCS12_SERIALMON
/* for Monitor based software remap the RAM & EEPROM to adhere
to EB386. Edit RAM and EEPROM sections in PRM file to match these. */
___INITRG = 0x00; /* lock registers block to 0x0000 */
___INITRM = 0x39; /* lock Ram to end at 0x3FFF */
___INITEE = 0x09; /* lock EEPROM block to end at 0x0fff */ #endif "
Hope this helps,
Anders.
Regards, Ewan.
http://forums.freescale.com/freescale/board/message?board.id=CW816COMM&thread.id=4146
Here's the solution given to me by Freescale:
"... The previous solution I mentioned was not useful as there was no possibility to debug the code. So finally the one possible solution is just include the PAGE_3C segment into your default placements :
PLACEMENT
_PRESTART, STARTUP,
ROM_VAR, STRINGS,
VIRTUAL_TABLE_SEGMENT,
DEFAULT_ROM , NON_BANKED,
COPY INTO ROM_C000,
ROM_4000,PAGE_3C;
(please notice the order of segments!)
And to ensure the correct PPAGE register settings you have to modify Start12c file (_Startup function)
___INITRM = 0x39; /* lock Ram to end at 0x3FFF */
/* new line to set the correct PPAGE register value */ *(unsigned char *)0x30 = 0x3C;
#ifdef _HCS12_SERIALMON
/* for Monitor based software remap the RAM & EEPROM to adhere
to EB386. Edit RAM and EEPROM sections in PRM file to match these. */
___INITRG = 0x00; /* lock registers block to 0x0000 */
___INITRM = 0x39; /* lock Ram to end at 0x3FFF */
___INITEE = 0x09; /* lock EEPROM block to end at 0x0fff */ #endif "
Hope this helps,
Anders.