D60A Bootloader

Started by bitjockey1 November 24, 2003
Hello All,
I have written a bootloader for the hc12d60a based on Gordon D's
app note. What I want to do is force the addresses in the secondary
jump table and point the original vectors to the secondary ones. My
question is in CW how do I force the address of the secondary jump
table???? Does it have to be done in the prm file??? or is there some
pragma that would do this????

Thanks,

Brian



Look up SWI (software Interupt).
software interrupt (SWI) - An instruction that causes an interrupt and its associated vector
fetch.
Jim breakpoint - A number written into the break address registers of the break module. When a
number appears on the internal address bus that is the same as the number in the break
address registers, the CPU executes the software interrupt instruction (SWI).

SWI Dual Address
Mode
In this mode, dual address-only breakpoints can be set, each of which
cause a software interrupt. This is the only breakpoint mode which can
force the CPU to execute a SWI. Program fetch tagging is the default in
this mode; data breakpoints are not possible. In the dual mode each
address breakpoint is affected by the BKPM bit and the BKALE bit. The
BKxRW and BKxRWE bits are ignored. In dual address mode the
BKDBE becomes an enable for the second address breakpoint. The
BKSZ8 bit will have no effect when in a dual address mode.

INT: DISABLING INTERRUPT WITH I MASK BIT CLEAR CAN CAUSE SWI
AR527
If the source of an interrupt is taken away by disabling the interrupt without setting
the I mask bit in the CCR, an SWI interrupt may be fetched instead of the vector for
the interrupt source that was disabled.
Work-
around
Before disabling an interrupt using a local interrupt control bit, set the I mask bit in
the CCR.

-----Original Message-----
From: bitjockey1 [mailto:]
Sent: Monday, November 24, 2003 10:11 AM
To:
Subject: [68HC12] D60A Bootloader Hello All,
I have written a bootloader for the hc12d60a based on Gordon D's
app note. What I want to do is force the addresses in the secondary
jump table and point the original vectors to the secondary ones. My
question is in CW how do I force the address of the secondary jump
table???? Does it have to be done in the prm file??? or is there some
pragma that would do this????

Thanks,

Brian
--------------------
">http://docs.yahoo.com/info/terms/


> I have written a bootloader for the hc12d60a based on Gordon D's
> app note. What I want to do is force the addresses in the secondary
> jump table and point the original vectors to the secondary ones. My
> question is in CW how do I force the address of the secondary jump
> table???? Does it have to be done in the prm file??? or is there some
> pragma that would do this????

Is this what you are looking for?

//Excerpt from PRM file follows.

VECTOR ADDRESS 0xFFB0 0x3FD3 /*CAN0 Tx Interrupt */
VECTOR ADDRESS 0xFFB2 0x3FD0 /*CAN0 Rx Interrupt */
VECTOR ADDRESS 0xFFBA 0x3FC4 /*EEPROM Interrupt */
VECTOR ADDRESS 0xFFD2 0x3FA3 /*Analog to Digital Interrupt */
VECTOR ADDRESS 0xFFD6 0x3F9D /*SCI0 Interrupt */
VECTOR ADDRESS 0xFFEE 0x3F79 /*Enhanced Capture Timer 0 */
VECTOR ADDRESS 0xFFF0 0x3F76 /*RTI Interrupt */

VECTOR ADDRESS 0xFFFE main

//Just replace 0x3Fxx with the locations of your own secondary Vector
Table.

John
http://embedded.mistekllc.com