Topic : Starting an application from within a bootloader on STR7x

Forum : ARM

Original Post
Post Information Post
April 30, 2008 - 4:55pm
Guest

Hi,

I'm writing a bootloader on a STR7x lacated in flash @0x40000000. The bootloader verifies the consistency of an application located in flash @0x40002000 and uses its own interrupt vector table. If no hardware bootstrap is set and the appl. is consistent, the bootloader starts the application located in flash @0x40002000. I use something like

void (*Application)(void) = 0x40002000;
...
if (ok)
(Application)();

to start the application from within the bootloader. I've instructed the linker to place the .text segment of the application at 0x40002000. This works fine, except for the applications interrupt vector. The interrupt vectors are still those of the bootloader.

How can I switch the interrupt vectors from those owned by the bootloader to the ones of the application? Should I place the vector table in RAM for the bootloader and in FLASH for the application to make the distinction and how can this be done? Any other suggestions?

with kind regards
Kris