Forums

Metrowerks CodeWarrior Help

Started by somnambulator June 25, 2003
I'm trying to find information on how to use .prm files to dictate
RAM and ROM allocation with the CodeWarrior software on an HC12.
Can anybody help me out with this? I'm a beginner so any information
will most likely be helpful.

My intention is to use as much RAM as possible.

-mario



hallo Mario, look at the example, which are shipped with your tool. Copy one an modify it. -patrick
----- Original Message -----
From: somnambulator
To:
Sent: Thursday, June 26, 2003 1:17 AM
Subject: [68HC12] Metrowerks CodeWarrior Help I'm trying to find information on how to use .prm files to dictate
RAM and ROM allocation with the CodeWarrior software on an HC12.
Can anybody help me out with this? I'm a beginner so any information
will most likely be helpful.

My intention is to use as much RAM as possible.

-mario Yahoo! Groups Sponsor
--------------------


Mario,
I suggest you have a quick look into following PDF manual delivered:
CodeWarrior Manuals\pdf\Manual SmartLinker.pdf,
chapter 8, "The Parameter File".
Have a look to the .prm file with the stationeries provided,
or have a look into the .prm files provided in
lib\HC12c\prm

Below is an example for DP256B.
Basically: in SECTIONS the RAM/ROM areas are declared, where in the
PLACEMENT
the pieces are placed into the sections (there are few default names used,
see below and linker manual).
Additionally you can set up vectors or stack size too.
For more details: see above PDF.

Erich NAMES END

SECTIONS
RAM = READ_WRITE 0x1000 TO 0x3FFF;
/* unbanked FLASH ROM */
ROM_4000 = READ_ONLY 0x4000 TO 0x7FFF;
ROM_C000 = READ_ONLY 0xC000 TO 0xFEFF;
/* banked FLASH ROM */
PAGE_30 = READ_ONLY 0x308000 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 = READ_ONLY 0x358000 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
ROM_4000 */
/* PAGE_3F = READ_ONLY 0x3F8000 TO 0x3FBFFF; not used: equivalent to
ROM_C000 */
END

PLACEMENT
_PRESTART, STARTUP,
ROM_VAR, STRINGS,
VIRTUAL_TABLE_SEGMENT,
NON_BANKED, COPY INTO ROM_C000, ROM_4000;
DEFAULT_ROM INTO
PAGE_30,PAGE_31,PAGE_32,PAGE_33,PAGE_34,PAGE_35,PAGE_36,PAGE_37,

PAGE_38,PAGE_39,PAGE_3A,PAGE_3B,PAGE_3C,PAGE_3D;
DEFAULT_RAM INTO RAM;
END

STACKSIZE 0x100

VECTOR 0 _Startup

> -----Original Message-----
> From: somnambulator [mailto:]
> Sent: Donnerstag, 26. Juni 2003 01:18
> To:
> Subject: [68HC12] Metrowerks CodeWarrior Help > I'm trying to find information on how to use .prm files to dictate
> RAM and ROM allocation with the CodeWarrior software on an HC12.
> Can anybody help me out with this? I'm a beginner so any information
> will most likely be helpful.
>
> My intention is to use as much RAM as possible.
>
> -mario >
> -------------------- >
> ">http://docs.yahoo.com/info/terms/