You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by Thomas Axelsson <th...@actia.se> on 2020/08/19 08:50:55 UTC

Building a "single" build / no bootloader

Hi,

I'm trying to build a mynewt project for an nRF52811, without bootloader. Is there an example for doing this?

What I have found on the web, it should be a non-split build as long as I don't supply "loader" to newt target.

apache-newt-core/hw/bsp/nordic_pca10040 contains a no_boot.ld, but there are no examples of how to set the flash_map correctly and if any other options need to be changed.

Is there an example of a "single" build somewhere? I have found https://mynewt.apache.org/latest/tutorials/ble/ble_bare_bones.html but it does not say how to configure the BSP.

BR
Thomas 

Re: Building a "single" build / no bootloader

Posted by Jerzy Kasenberg <je...@codecoup.pl>.
Hi,

You could take a look at nucleo-f030r8 or nucleo-f072rb,  which has
very little flash and does not have a bootloader.

You need to make unwanted flash area sizes set to 0.
FLASH_AREA_BOOTLOADER:
    device: 0
    offset: 0x00000000
    size:   0kB
FLASH_AREA_IMAGE_0:
    device: 0
    offset: 0x00000000
    size: 160kB
FLASH_AREA_IMAGE_1:
    device: 0
    offset: 0x00000000
    size:   0kB
FLASH_AREA_IMAGE_SCRATCH:
    device: 0
    offset: 0x00000000
    size:   0kB

# User areas.
FLASH_AREA_REBOOT_LOG:
    user_id: 0
    device: 0
    offset: 0x00028000
    size: 16kB
FLASH_AREA_NFFS:
    user_id: 1
    device: 0
    offset: 0x0002c000
    size: 16kB

Make sure that flash size in the linker script corresponds to
FLASH_AREA_IMAGE_0.

MEMORY
{
  FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 160K
  RAM (rwx) :  ORIGIN = 0x20000000, LENGTH = 24K
}

two last flash areas could also be removed if needed, but they may be
used by some package.

best regards
Jerzy

śr., 19 sie 2020 o 10:51 Thomas Axelsson <th...@actia.se> napisał(a):
>
> Hi,
>
> I'm trying to build a mynewt project for an nRF52811, without bootloader. Is there an example for doing this?
>
> What I have found on the web, it should be a non-split build as long as I don't supply "loader" to newt target.
>
> apache-newt-core/hw/bsp/nordic_pca10040 contains a no_boot.ld, but there are no examples of how to set the flash_map correctly and if any other options need to be changed.
>
> Is there an example of a "single" build somewhere? I have found https://mynewt.apache.org/latest/tutorials/ble/ble_bare_bones.html but it does not say how to configure the BSP.
>
> BR
> Thomas