Re: Bootloader Placement



"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.


.



Relevant Pages

  • Re: Bootloader Placement
    ... which, firstly copies all code and data from flash to RAM and then checks data on an MMC card to see whether an update of the flash is necessary and, if so, copies new program data into the flash. ... At the moment I have two projects - the bootloader as a stand-alone loader and the full application, which has the bootloader code as part of it. ... 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. ... My thoughts were to define the first flash sector as a seperate linker section and locate all the bootloader functions and data in there but as part of the application software. ...
    (comp.arch.embedded)
  • Re: More about ROMOFFSET usage.
    ... ROMOFFSET is used as a convenience to allow the image to be ... The bootloader then copies the the image in flash to RAM, ... Boot loader, image ...
    (microsoft.public.windowsce.embedded)
  • Re: AVR Bootloader protection
    ... the CPU sets a bit of a byte.. ... When exiting the bootloader, clear this byte. ... unless you execute the boot loader from the start,. ... > erase or page write - so that routine does what's it's supposed to, ...
    (comp.arch.embedded)
  • Re: MSP430 in-circuit firmware upgrade question
    ... The firmware consists of a boot loader and ... boot loader will be able to receive new application firmware ... > over UART and program it into the flash to replace the older application. ... Just a flag to steer to mthe appropriate routine from the interrupt. ...
    (comp.arch.embedded)
  • Re: ADSP BF538_Board Bring Up Query
    ... I don't have any knowledge on boot loader. ... It really depends on the context in which the Blackfin is used. ... a flash chip, either 8-bit parallel or serial SPI, depending on code ... to store the Blackfin code in the host processor's flash and do a host ...
    (comp.arch.embedded)