Need help in redirecting ISR after switching to a new execution image in MSP430

Hi,

My earlier post was:

Creating multiple images (Boot & App) in a project (IDE: CCS/IAR/CrossWorks) ?

I am working with: Microcontroller: MSP430F1611 IDE: CrossWorks for MSP430

Right now I have managed to create and load the 2 images, namely, Bootloader and Application, in separate memory locations. And I am able to jump to the Application code by using the address of its "main" function.

I am not able to use the ISRs once I am in the Application image. I know this is because I am jumping past the initialization code which is created by the compiler. I don't know how to jump to this location where the ISR are all initialized for this image.

Another solution is Redirecting ISR's. I have read about creating a proxy vector table and re-routing. I understood the concept. But I am not having any clue how it can be implemented.

My goal is to use the newly defined ISRs in the new execution image after I make a switch to it.

I kindly request if anyone help me out with this?

Regards, Ananth

--------------------------------------- Posted through

formatting link

Reply to
an_anth
Loading thread data ...

o
d

try check what the initialisation code does, and replicate it as first thin g in the main() of the Application.

g

no clue (don't know the uC you're useing). It depends how the uC handles th e interrupt vectors. For example Freescale DSC have a register that is used to redirect the inte rrutp vectors, so it is trivial to switch interrupt vectors.

You could try to make the interrupt vectors point to a fixed location in RA M, and the location in RAM has a jump instruction to the correct ISR. The RAM vector is written with the correct data as soon as you enter the ma in of the bootloader or the application. You probably need some assembler a nd the uC has to be able to execute instructions from RAM.

Hope this helps.

Bye Jack

Reply to
Jack

Thank you for the reply Jack.

assembler

My uC does not support direct vector redirection support. So i can use this method instead. I am even contemplating to not use any ISRs in the Boot and only use it in the App. But so far I am not able to achieve it(coz I am simply not compiling the isr.c file in Boot). May be I am doin it wrong.

I am not able to figure out how to make the interrupt vectors point to a fixed location. Do I need to do some declarations in "isr.c" file where my ISR functions are declared?

I have got an idea as to how to place the RAM vectors. But I am yet to try it out.

And all that I have got access to in the CrossWorks IDE is the Section Placement File, where I can control the memory location of all the segments(code/ISR/comst...). This is how I got the hold to place 2 diff execution images in diff memory locations. They have not given any details on how to modify or use the linker file in their manuals. I haven't seen the linker file in the project section along with all other system files(like crt0.asm). According to my knowledge from reading about other similar projects, I think i need to get access to the linker files. Or is there any other way?

Regards, Ananth

--------------------------------------- Posted through

formatting link

Reply to
an_anth

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.