| Details | Message |
|---|
Read-Only Author mark thompson Posted 14-Nov-2000 21:44 GMT Toolset C51 |  Boot Loader and Int Vector table reloacation mark thompson Im trying to determine the best way to deal with the Interrupt vector tables in a system where the main code will be downloaded into ram and a bootloader will be in the ROM.
I need to move the vector table up into RAM without moving the base address of the bootloader ROM code.
Thanks Mark
|
|
Read-Only Author Mark Odell Posted 14-Nov-2000 22:44 GMT Toolset C51 |  RE: Boot Loader and Int Vector table reloacation Mark Odell You cannot move the IVT in the 8051, it is unchangeable. You could put LCALL's to your RAM-based ISR's in your ROM. Then locate the ISR's at specific addresses in RAM.
- Mark
P.S. I'm 99% sure about the IVT being unchangeable. |
|
Read-Only Author Thomas Mazowiesky Posted 15-Nov-2000 04:20 GMT Toolset C51 |  RE: Boot Loader and Int Vector table reloacation Thomas Mazowiesky Mark is correct, the interrupt vectors for the 8051 and derivatives is fixed. If your code loads into RAM, you place LCALLS to the interrupt routines in your ROM at the vector locations in low memory.
|
|
Read-Only Author Keil Support Posted 15-Nov-2000 09:09 GMT Toolset C51 |  RE: Boot Loader and Int Vector table reloacation Keil Support I need to move the vector table up into RAM without moving the base address of the bootloader ROM code.
Refer to the following support solution for details on one way to do this.
http://www.keil.com/support/docs/132.htm
Keil Support |
|
Read-Only Author Andrew Korell Posted 20-Feb-2003 14:17 GMT Toolset C51 |  RE: Boot Loader and Int Vector table reloacation Andrew Korell Is there a real code example of this method? I am fairly new to this processor and a bit confused as to how to plug this all in. |
|
Read-Only Author erik malund Posted 20-Feb-2003 14:58 GMT Toolset C51 |  RE: Boot Loader and Int Vector table reloacation erik malund Is there a real code example of this method? I am fairly new to this processor and a bit confused as to how to plug this all in. If, indeed you are fairly new, why do you deal with issues as complex as this. Get some wear on your '51 shoes, then come back to this issue. The way to get practice on the '51 is to use it as it is intended before "going excotic".
Erik
|
|
Read-Only Author Andrew Korell Posted 20-Feb-2003 15:39 GMT Toolset C51 |  RE: Boot Loader and Int Vector table reloacation Andrew Korell Fortunately I don't have much of a choice in this matter. It's what the project requires and I happen to be the resources for it at the moment. It's good to know that it's not simple though. |
|
Read-Only Author Thomas Zepf Posted 20-Feb-2003 19:40 GMT Toolset C51 |  RE: Boot Loader and Int Vector table reloacation Thomas Zepf I did a similar thing when I had to update my firmware over usb. In my case one interwupt was used in the update code and regular firmware and the code hat to respond as fast as possible.
in ASM I used the following: (note the RET instead of RETI)
extrn DATA (USB_VECT)
extrn DATA (V24_VECT)
CSEG at 00003h
PUSH USB_VECT+1
PUSH USB_VECT+0
RET
CSEG at 00023
PUSH V24_VECT+1
PUSH V24_VECT+0
RET
end
and in c
#pragma NOIV
void V24Irq(void) interrupt SIO_VECTOR
{
...
}
void USBIrq(void) interrupt IE0_VECTOR
{
...
}
and at init Time:
UINT16 usb_vect _at_ 0x20;
UINT16 sio_vect _at_ 0x22;
void initirq(void)
{
usb_vect = (UINT8 code *) &UsbIrq;
sio_vect = (UINT8 code *) &V24Irq;
EA=1;
}
Hope this helps Thomas |
|