Our goal is to define a memory map for the C64 part that allows for as much use of FLASH as possible in the unbanked small memory model. Our solution was to relocate RAM to 0x8000 (the page window) to free up the 0x0400 to 0x3FFF FLASH space.
1. Can you suggest a better way to accomplish this? Note that we have a bootloader in the upper 4K of the FLASH. This is what our PRM file looks like:
SECTIONS
/* Application ROM block 1 checksum, img_type, ver @ 0x0400 (6 bytes) */
ROM_0400 = READ_ONLY 0x00000406 TO 0x00003FFD FILL 0xFF;
/* Application Checksum Verified flag @ 0x3FFE (2 bytes) - shared with bootloader */
/* Application ROM block 2 checksum @ 0x4000 (2 bytes) */
ROM_4000 = READ_ONLY 0x00004002 TO 0x00007FFF FILL 0xFF;
/* RAM Section */
RAM = READ_WRITE 0x00008000 TO 0x00008FFF;
/* Application ROM block 3 checksum @ 0x0C000 (2 bytes) */
ROM_C000 = READ_ONLY 0x0000C002 TO 0x0000EF7F FILL 0xFF;
/* Application Vector Table 0xEF80 - 0xEFFF */
/* Bootloader Block and Flash Security 0xF000 - 0xFF7F */
/* Defualt Vector Table 0xFF80 - 0xFFFF */
END
"I need to understand what you are trying to do here.
According to my understanding you are re-mapping RAM and ROM at run time (in your application). Am I right?
Where did you insert that re-mapping code?
Which version of CodeWarrior for HC12 are you using?"
We are using CodeWarrior for HC12 3.1. Yes the RAM is remapped at runtime. The INITRG and INITRM registers are the first thing the code sets up after reset.
2. Maybe you can answer why the debugger is not "getting" the memory map. The Debugger Memory Map is right but the problem is when the part is getting programmed.