Secondary Bootloader

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Secondary Bootloader

549 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Dave on Sat Nov 09 00:51:45 MST 2013
Hi guys - I haven't been here in awhile - hope everybody's projects are working perfectly!

I'm starting work on a secondary bootloader, and I'm looking for suggestions...

Since my bootloader needs to interact with the GLCD, SDRAM, and USB (and probably the serial port for diagnostics), it's not going to be a tiny bootloader.  And since my main application interacts with all of these routines as well, I foresee wasted memory with redundant copies of code.

What if my bootloader has all the necessary routines (drivers, if you will) loaded, and the main application could have access to them after it's loaded.  This would remove the redundancy and allow for a larger main application.

Has anybody else run into this scenario, and actually made it work?

I'm looking for ideas.  I was thinking about forcing the mapping of driver routines using a scatter file when the bootloader is loaded, and then stubbing out function pointers in the main application at specific addresses, but that seemed a little "brute force".

Is there a mechanism for transferring a memory map from one application to another?

I'm using Keil's development environment.

Thanks in advance for any replys.

-Dave
Labels (1)
0 Kudos
3 Replies

488 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by david.harper on Thu Aug 14 20:57:32 MST 2014
I have a similar project going. My plan is to link against a symdefs file (see Kiel linker docs). Proof of concept code works but I'm hitting some issues with IAP.

Dave
0 Kudos

488 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Dave on Sat Jul 05 21:16:16 MST 2014
That's a really good idea!  Thanks for the suggestion.  I ended up just replicating everything in both, since I needed to get the project done, but I will probably have to revisit this issue when the app program gets too big.

I'll let everyone know if it ever comes up...
0 Kudos

488 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by xianghuiwang on Sat Nov 16 10:44:24 MST 2013
Hi David,
Maybe you can put your bootloader function locations at the end of the interrupt vector table and access them the same way as the interrupt functions.
Good luck!
0 Kudos