Re: Question about mynewt Single mode

2019-10-01 Thread Christopher Collins
Hi Nicola,

On Fri, Sep 27, 2019 at 04:48:18PM +0200, Nicola Bizzotto wrote:
> Hi,
> I'm currently using an Espruino Puck.js device. I'm programming it with a
> Segger J-Link programmer. I have already experience with mynewt OS (I used
> it with a Bluefruit nRF52 Feather) and now I want to use it also with the
> Puck.js. I also would like to use 'Single' image setup, which is described
> here: https://mynewt.apache.org/latest/os/modules/split/split.html.
> By now I've always used 'Split' mode.
> I searched on your site but failed to find some information about the setup
> and use of 'Single' mode. Can you give me some help, or point me to some
> useful resources?

Mynewt doesn't offer any "direct" support for the single image setup,
but I believe it is still possible to use (it definitely used to work).

I don't believe there is any documentation for the single-image setup,
so here are some (untested) thoughts on how you should proceed:

1. (bsp.yml): In your BSP's flash map, shrink the
`FLASH_AREA_BOOTLOADER`, `FLASH_AREA_IMAGE_1`, and
`FLASH_AREA_IMAGE_SCRATCH` flash areas down to one sector each.  You
might be able to remove the "image 1" and "image scratch" areas entirely
(I'm not sure), but you definitely need to keep the bootloader area.

2. (bsp.yml): Set the `FLASH_AREA_IMAGE_0` area's offset to 0 and increase
its size as needed.  Your single image will reside in this area.

3. (bsp.yml): Set the `FLASH_AREA_BOOTLOADER` area's offset to something
other than 0.  Make sure it doesn't overlap any other areas.

4. Fix up the BSP linker script.  Copy the normal linker script and
modify its `FLASH` memory region so that it matches the
`FLASH_AREA_IMAGE_0` flash area (set `ORIGIN` to 0; set `LENGTH` to the
size of the flash area).

That should be it.  You might run into issues if some of your target's
dependencies expect all these flash areas to exist.  For example, you
will have to ensure you aren't pulling in `mgmt/imgmgr`.

Chris


Question about mynewt Single mode

2019-09-27 Thread Nicola Bizzotto
Hi,
I'm currently using an Espruino Puck.js device. I'm programming it with a
Segger J-Link programmer. I have already experience with mynewt OS (I used
it with a Bluefruit nRF52 Feather) and now I want to use it also with the
Puck.js. I also would like to use 'Single' image setup, which is described
here: https://mynewt.apache.org/latest/os/modules/split/split.html.
By now I've always used 'Split' mode.
I searched on your site but failed to find some information about the setup
and use of 'Single' mode. Can you give me some help, or point me to some
useful resources?

Distinti saluti

Nicola Bizzotto

Tel: 0445 874462

http://www.redmountain.it/

Red Mountain è un marchio FG s.a.s.


Questo messaggio e gli eventuali allegati sono confidenziali e riservati.
Se vi è stato recapitato per errore e non siete fra i destinatari elencati,
siete pregati di darne immediatamente avviso al mittente. Le informazioni
contenute non devono essere utilizzate, ne memorizzate o copiate in
qualsiasi forma possono variare senza preavviso alcuno.