Re: Bootloader Placement
- From: "Tom Lucas" <news@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 19 Apr 2006 13:48:44 +0100
"Hans-Bernhard Broeker" <broeker@xxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4ammlpFtmsapU2@xxxxxxxxxxxxxxxxx
Tom Lucas <news@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
What I'd like to do is seperate the bootloader code from the
application code and have the boot loader pass control to the
application once it has done its checks and, if necessary,
reprogramming. However, I don't think I could have the application
as stand-alone code as well because it would then be re-initialising
the hardware and memory of what was initialised previously in the
bootloader.
As has been said, re-initialization shouldn't usually be problematic
--- at worst, it'll just be a small waste of time on startup. If in
your case the hardware really can't be initialized more than once, I
think you should consider splitting up your mental image of the job
into *three* parts: a bootloader, a flash-updater, and the main
application. The bootloader would treat both of the others as
optional. I.e. if they're present, they're executed. This requires
some management (how to test whether the code is present, how to avoid
memory space collisions between flasher and main app...). This would
allow to keep all initializations that can't be re-done in the
bootloader.
It's an interesting thought but the bulk of the boot loader is an MMC card
reader and accompanying filesystem so it's probably easier just to lump them
together as the flash loading part is so much smaller. I think I could avoid
the collisions by altering the flash description for the linker but it is
sharing data between that will be tricky. I would need to determine which
version of application software is currently loaded and the details of that
would only be known to the flash software.
My thought was to pick something that would always be at a known location
once compiled and linked and store a unique ID there. I'm not expecting any
Prefetch Abort exceptions and don't intend to include a handler so I could
use that spot for an ID. On an abort then the ID would be executed and
either not be recogized or run and flow onto the Data Abort which would
catch it. This would work as long as the ID isn't interpretted as a branch I
believe.
.
- References:
- Bootloader Placement
- From: Tom Lucas
- Re: Bootloader Placement
- From: Hans-Bernhard Broeker
- Bootloader Placement
- Prev by Date: Re: FM0 (bi-phase space) decoding!
- Next by Date: Re: FM0 (bi-phase space) decoding!
- Previous by thread: Re: Bootloader Placement
- Next by thread: Re: Bootloader Placement
- Index(es):
Relevant Pages
|