nRF9160 custom board bootloader problems

Dear Nordic Team, 

I am working on a custom board  and I am currently implementing the firmware-over-the-air library via https.
For this I need to use the MCUBootloader. Unfortunately I ran into some troubles implementing the bootloader.

I am using Visual Studio in combination with the "nRF Connect for Desktop" and the SDK version 2.0.0.

To configure the bootloader I created a child_image folder in my project and in the folder I created a mcuboot.conf file like suggested in many of the Nordic devzone forum entries.

The changes in the mcuboot.conf are quite simple I changed the BOOT_SIGNATURE_TYPE to RSA and included a path for my key. Since I am working with a out-of-tree build I had to use a absolute file path for the key since otherwise the autogenerate file of the mcubootloader could not find the key file. 
Furthermore I activated the bootbanner and told the bootloader to use RTT for the logging interface. 

This seems to work fine when building the project and here is the bootloader logging information which I get:

But after that the nrf9160 does nothing and also does not start my application. 

At the end I added the  mcuboot.conf and the prj.conf files

I have searched through the forum and found some entries regarding the bootloader unfortunately none of the offered answeres helped in my case. 

I have also tried to to a simple small sample to make sure my custom board is not the problem and used the tfm_hello_world sample and added
"CONFIG_BOOTLOADER_MCUBOOT=y" to the sample prj.conf. This seems to work fine so I am very sure the problem somehow originates either in my bootloader configuration or in my application itself. 

I hope someone can help me with my problem.

Best regards,

Andreas 

mcuboot.conf:

proj.conf:

  • Hello Didrik,

    thank you for the information. I checked my partitions.yml and have gone through all its entries.

    The flash partition I am trying to access is at the address 0xfa000 and the flash_size I am tying to access is 0x6000.

    The first entry in my partitions.yml is:

    This should mean that the portion of the flash I am trying to access should be empty and not used by any other part of the application, if I am reading the partitions.yml right.

    Also all the others partitions.yml entries to not use the specified flash memory partition. 

    Best regards, 

    Andreas

  • Hello Didrik,

    after finding out the exact address of our empty flash portion I tried to change our flash read function accordingly, but unfortunately this did not work and the nrf9160 still just restarts, when trying to read the flash partition.

    Is it possible that with the addition of the bootloader this empty flash partition was somehow locked by the TF-M secure functions and that is why I am not able to access it?

    Best regards,

    Andreas

  • AscherA said:
    Is it possible that with the addition of the bootloader this empty flash partition was somehow locked by the TF-M secure functions and that is why I am not able to access it?

    Yes. The application (and non-secure flash area) must start at a 32kB boundary. If the TF-M partition isn't large enough to fill a whole sector, an empty partition will be inserted to enusre proper alignment of the non-secure area.

  • If I understand correctly this means, that the "EMPTY_0" partition is only a "filler", but it is automatically assigned to the secure partition of the TF-M. Is there a way to assign it to the none-secure partition?

  • No. The non-secure partition must start at a 32kB boundary, which means that there might be some empty space e´between the secure and the non-secure firmware if the secure FW doesn't use a whole multiplum of 32kB.

1 2 3