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