AN2548 Freescale Semiconductor / Motorola, AN2548 Datasheet - Page 15

no-image

AN2548

Manufacturer Part Number
AN2548
Description
Serial Monitor Program for HCS12 MCUs
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Software Detail
/* for Monitor based software remap the RAM & EEPROM to adhere
/* Here user defined code could be inserted, the stack could be used */
//INTERNAL_RAM = READ_WRITE 0x0400 TO 0x1FFF; /* Default for E128 */
INTERNAL_RAM = READ_WRITE 0x2000 TO 0x3FFF; /* For Monitor compatibility*/
MOTOROLA
to EB386. Edit RAM and EEPROM sections in PRM file to match these. */
*((unsigned char *) 0x0011)=0x00;
*((unsigned char *) 0x0012)=0x09;
*((unsigned char *) 0x0010)=0x39;
movb
movb
movb
#$00,INITRG
#$39,INITRM
#$09,INITEE
To create applications software that will run both with the monitor program and
without, several simple modifications must be made to the environment:
For assembly programs, the following lines should be added to the start of the
source code and executed:
For C programs, the following lines should be added to the Start12.c file at the
beginning of the _Startup() function, before any calls or jumps occur:
For assembly programs — All ORG statements in the application should be
adjusted, such that they reflect actual memory of their device with the above
setting.
For C programs — The projects linker file should be adjusted, such that they
reflect actual memory of their device with the above setting. In CodeWarrior,
this is the .prm file. Shown below is an example:
Change to:
1. Memory must be configured per EB386/D.
2. Memory definition should be adjusted to match above
3. Vectors should remain defined at $FF80–$FFFF. The monitor will
Freescale Semiconductor, Inc.
For More Information On This Product,
configurations.
create a copy of the application’s vectors in a jump table from
$F780–$F7FF.
Serial Monitor Program for HCS12 MCUs
;set registers at $0000
;set ram to end at $3fff
;set eeprom to end at $0fff
Go to: www.freescale.com
/* lock registers block to 0x0000 */
/* lock EEPROM block to 0x0000 */
/* lock Ram to end at 0x3FFF */
Software Detail
AN2548/D
15

Related parts for AN2548