EmbeddedRelated.com
Forums

Copying interrupt vector table to RAM

Started by ajellisuk March 25, 2009
Hi

In a previous thread:

http://tech.groups.yahoo.com/group/lpc2000/message/40140

I mentioned that I am trying to implment a secondary bootloader with an LPC2148 device. I'm having some problems with the interrupt vector table. I've set the register "MEMMAP" to 0x02 to remap interrupt vectors to RAM.

Do I need to copy an interrupt vector table to RAM, and if so how do I do it?

I'm using IAR embedded workbench for ARM.

Thanks in advance

Andrew

An Engineer's Guide to the LPC2100 Series

On Wed, 25 Mar 2009, ajellisuk wrote:

> I mentioned that I am trying to implment a secondary bootloader with
> an LPC2148 device. I'm having some problems with the interrupt vector
> table. I've set the register "MEMMAP" to 0x02 to remap interrupt
> vectors to RAM.

Curious- why not have the (in-flash, I presume) primary bootloader have
each vector determine if the secondary bootloader/main program is valid,
and if so just dispatch (jump to) the pre-defined locations the 2ndary
program uses for vectors?

-Kenny

--
Kenneth R. Crudup Sr. SW Engineer, Scott County Consulting, Los Angeles
O: 3630 S. Sepulveda Blvd. #138, L.A., CA 90034-6809 (888) 454-8181
--- In l..., Kenneth Crudup wrote:
> On Wed, 25 Mar 2009, ajellisuk wrote:
>
> > I mentioned that I am trying to implment a secondary bootloader with
> > an LPC2148 device. I'm having some problems with the interrupt vector
> > table. I've set the register "MEMMAP" to 0x02 to remap interrupt
> > vectors to RAM.
>
> Curious- why not have the (in-flash, I presume) primary bootloader have
> each vector determine if the secondary bootloader/main program is valid,
> and if so just dispatch (jump to) the pre-defined locations the 2ndary
> program uses for vectors?
>

Would that not mean checksumming the main app on every interrupt?

I use remapping to RAM for my app. The main app copies its own vectors into RAM and then does the remapping - the secondary bootloader doesn't have to do anything except jump to the main app start address.

Rgds,
Martin

On Thu, 26 Mar 2009, mjames_doveridge wrote:

> Would that not mean checksumming the main app on every interrupt?

Nah, just once- before you jump to the 2ndary loader.

-Kenny

--
Kenneth R. Crudup Sr. SW Engineer, Scott County Consulting, Los Angeles
O: 3630 S. Sepulveda Blvd. #138, L.A., CA 90034-6809 (888) 454-8181
Hi,

I have found the solution to my problem after further searches with google:

http://www.state-machine.com/arm/QDK_ARM-IAR_LPC213X.pdf

The section of interest is 3.1.2 on page 9.

Regards

Andrew

--- In l..., Kenneth Crudup wrote:
> On Thu, 26 Mar 2009, mjames_doveridge wrote:
>
> > Would that not mean checksumming the main app on every interrupt?
>
> Nah, just once- before you jump to the 2ndary loader.
>
> -Kenny
>
> --
> Kenneth R. Crudup Sr. SW Engineer, Scott County Consulting, Los Angeles
> O: 3630 S. Sepulveda Blvd. #138, L.A., CA 90034-6809 (888) 454-8181
>