How to jump to main program from boot-loader?

DSP Topics
Post Reply
Max
Sergeant
Sergeant
Posts: 17
Joined: Tue Jul 21, 2009 3:31 pm

How to jump to main program from boot-loader?

Post by Max » Tue Jul 21, 2009 3:35 pm

Hi friends,

My application has two parts. Boot-loader and the main application.
I have flashed the boot-loader at the right place and it seems it is working.
Now I need to jump to my main application which is written at a specific location in the flash.

Any help on this regards is kindly appreciated.

Max
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: How to jump to main program from boot-loader?

Post by Neo » Fri Aug 21, 2009 1:39 am

Hi,

I did this on a C64 as follows. Say the entry point is 0xE0000000 (as defined in the MAP file)

On a header or at top of the source file:

Code: Select all

typedef void (*BootFn) ();
At the beginning of source file:

Code: Select all

BootFn bootFunction;
At the end of boot code:

Code: Select all

// Assign pointer to application entry point
bootFunction = (BootFn) (0xE0000000);
// Pass execution to application
(*bootFunction)();
Hope this helps!
Post Reply

Return to “Digital Signal Processors”