Hi Jacob,

On Sun, Jan 08, 2017 at 01:04:54PM -0700, Jacob Rosenthal wrote:
> On Mon, Jan 2, 2017 at 2:46 PM, Christopher Collins <ccoll...@apache.org>
> wrote:
> 
> > Do you know how big your loader is currently?
> 
> 
> Well, could be anything based on how much Im trying to strip from the
> nimble stack at any given time. but Im generally fighting to fit it within
> one slot which on the nrf51 is 110kB.

Yeah, it is currently pretty tough to get the OS + BLE stack to fit in
110kB.  Hopefully we'll get a chance to reduce the size of NimBLE soon.

> I'm also not sure if it would buy
> > you much extra flash space.
> 
> At this point Its not even about buying space, as I now have my other 110Kb
> back from the second image slot.. What I dont have anymore is update
> capability, so its about restoring that capability.
> 
> 
> > Im somewhat unclear if the 'loader' app can/should also serve as the
> > 'bootloader', or if it was intended that a separate bootloader would also
> > be present in addition to loader and application?
> >
> > This question of mine got buried above.. in this scenario, the distinction
> between loader and bootloader gets weird... My thought is theyre merged?

Sorry, I must have missed that question.  The boot loader is present in
the split image setup.  Here is how the boot sequence would look for the
various image setups:

1. Single image
    * no boot loader
    * image at address 0
    * hardware boots directly into image

2. Stub image
    * boot loader at address 0
    * hardware boots into boot loader
    * boot loader jumps to image in slot 0

3. Unified image (dual bank)
    * boot loader at address 0
    * hardware boots into boot loader
    * if required, boot loader swaps images in the two image slots
      (i.e., if an upgrade or a fallback is being performed).
    * boot loader jumps to image in slot 0

4. Split image
    * boot loader at address 0
    * hardware boots into boot loader
    * if required, boot loader swaps images in the two image slots
      (i.e., if an upgrade or a fallback *between two loaders* is being
      performed).
    * boot loader jumps to image in slot 0
    * loader in slot 0 jumps to "app" in slot 1.

The boot sequence and upgrade procedure for the split image setup is a
bit complicated.  I have been working on some documentation for this
area, but haven't quite finished it.  I hope to have something ready in
a day or two.  In the meantime, please feel free to ask any follow up
questions.

Thanks,
Chris

Reply via email to