CrasyCat:
Well, that movement works... now the application compiles...
I'm working on a project that was already started when I came in. I guess it was created from wizard, but I'm not completly sure. The person who create this made some changes on the PRM, he hasn't much experience on PRM files, and truly, me neither... I don't have the comment you mentioned, I'll post the entire PRM so you can see if you can give me some advices.
Lundin:
First of all I don't fully understand:
Zero page? What MCU are you using? S12 non-fixed flash is typically located at 8000 and C000 respectively, but on S12 the zero page is optimized for on-chip registers rather than user data, and is best kept that way.
I'm using HCS12, in ZERO PAGE I've got:
- Constants
- EEPROM writing routines
- ISRs (Interrup Service Routtines)
- FLASH writing routines
NOTE: By saying ZERO PAGE, I mean PAGE_C000 and PAGE_7000 (please read what's next)
As I said above it wasn't me how create that PRM file and again I don't fully understand them. If I'm not wrong PAGE_C000 and PAGE_7000 are both use as if there were ONE PAGE, the ZERO PAGE (and it's there were all the items above are stored). Is there any difference between them? If so, I didn't know about it
About:
You are also occupying the whole PAGE_7000 by writing PAGE_7000 INTO FLASH_PAGE7000;
And then you try to show even more stuff into it although it is already full.
Again I don't know much about PRM. I thought that when I do that I was allocating the other stuff in the "space" that was not ocuppied by PAGE_7000. Let's say I use pragma to strore 100bytes in PAGE_7000 I guess that the other stuff was allocated in the space that's left from PAGE_7000
Here's my FULL PRM FILE:
NAMES
END
SECTIONS
/* RAM */
RAM = READ_WRITE 0x04000 TO 0x6FFF;
/*banked FLASH ROM */
FLASH_PAGE7000 = READ_ONLY 0x07000 TO 0x07FFF;
FLASH_PAGEC000 = READ_ONLY 0x0C000 TO 0x0FEFF;
/* unbanked FLASH ROM */
PAGE_30_part = READ_ONLY 0x30B800 TO 0x30BFFF;
PAGE_31 = READ_ONLY 0x318000 TO 0x31BFFF;
PAGE_32 = READ_ONLY 0x328000 TO 0x32BFFF;
PAGE_33 = READ_ONLY 0x338000 TO 0x33BFFF;
PAGE_34 = READ_ONLY 0x348000 TO 0x34BFFF;
PAGE_35_part = READ_ONLY 0x35B002 TO 0x35BFFF;
PAGE_36 = READ_ONLY 0x368000 TO 0x36BFFF;
PAGE_37 = READ_ONLY 0x378000 TO 0x37BFFF;
PAGE_38 = READ_ONLY 0x388000 TO 0x38BFFF;
PAGE_39 = READ_ONLY 0x398000 TO 0x39BFFF;
PAGE_3A = READ_ONLY 0x3A8000 TO 0x3ABFFF;
PAGE_3B = READ_ONLY 0x3B8000 TO 0x3BBFFF;
PAGE_3C = READ_ONLY 0x3C8000 TO 0x3CBFFF;
PAGE_3D = READ_ONLY 0x3D8000 TO 0x3DBFFF;
/* PAGE_3E = READ_ONLY 0x3E8000 TO 0x3EBFFF;/* not used: equivalent to MY_ROM_1 */
/* PAGE_3F = READ_ONLY 0x3F8000 TO 0x3FBFFF;/* not used: equivalent to MY_ROM_2 */
END
PLACEMENT
NON_BANKED,
_PRESTART,
STARTUP,
ROM_VAR,
STRINGS,
VIRTUAL_TABLE_SEGMENT,
PAGE_C000,
PAGE_IRQ,
COPY INTO FLASH_PAGEC000,FLASH_PAGE7000;
PAGE_7000 INTO FLASH_PAGE7000;
//CODIGO
PAGE_30_CODE INTO PAGE_30_part;
PAGE_31_CODE INTO PAGE_31;
PAGE_32_CODE INTO PAGE_32;
PAGE_33_CODE INTO PAGE_33;
PAGE_34_CODE INTO PAGE_34;
PAGE_35_CODE INTO PAGE_35_part;
PAGE_36_CODE INTO PAGE_36;
PAGE_37_CODE INTO PAGE_37;
PAGE_38_CODE INTO PAGE_38;
PAGE_39_CODE INTO PAGE_39;
PAGE_3A_CODE INTO PAGE_3A;
PAGE_3B_CODE INTO PAGE_3B;
PAGE_3C_CODE INTO PAGE_3C;
PAGE_3D_CODE INTO PAGE_3D;
//CONSTANTES
//PAGE_30_CONST INTO PAGE_30;
PAGE_31_CONST INTO PAGE_31;
PAGE_32_CONST INTO PAGE_32;
PAGE_33_CONST INTO PAGE_33;
PAGE_34_CONST INTO PAGE_34;
PAGE_35_CONST INTO PAGE_35_part;
PAGE_36_CONST INTO PAGE_36;
PAGE_37_CONST INTO PAGE_37;
PAGE_38_CONST INTO PAGE_38;
PAGE_39_CONST INTO PAGE_39;
PAGE_3A_CONST INTO PAGE_3A;
PAGE_3B_CONST INTO PAGE_3B;
PAGE_3C_CONST INTO PAGE_3C;
PAGE_3D_CONST INTO PAGE_3D;
PAGE_CONST INTO FLASH_PAGEC000,FLASH_PAGE7000;
DEFAULT_ROM INTO PAGE_3C,PAGE_3D;
DEFAULT_RAM INTO RAM;
END
STACKSIZE 0x400
Anything.. I mean ANYTHING you notice in it please let me know... That's how I've been working for years and don't know why because it was that way when I start working.
Thanks!!!