Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ALL Preprocessor symbols common to boot loader and application for application to persist user configuration data

We am using SDK 16.0.0 with S132 v8.0.1 on an nRF52832 custom design.

We have ported the secure boot loader to our design and we can perform buttonless OTA.

The issue that we are running into is to set aside one page (4096 bytes) of flash storage for
the application to be able to read and possibly write certain user configuration data. I am aware
that this flash page must be right below the start of the boot loader starting address, and I have
done so as follows:
1. Starting address of boot loader is 0x72000 (as set in the linker script)
2. Starting address of the flash page for user configuration is at 0x71000.
    The application uses this hard coded address in its design.

There seems to be a few 'different' preprocessor symbols that have been used in the different examples
but I am still struggling to find a cohesive strategy that combines all of them in a meaningful manner.

The symbols I have discovered in my browsing on the Q&A portal have references to:

#define NRF_DFU_APP_DATA_AREA_SIZE                0x3000
#define FDS_VIRTUAL_PAGES                         3
#define FDS_VIRTUAL_PAGE_SIZE                     0x400
#define FDS_VIRTUAL_PAGES_RESERVED                1

However, it is not clear how to come up with a combination of the above numbers so as to be consistent.
Some of the blog posts suggest that 'NRF_DFU_APP_DATA_AREA_SIZE' should be set to the size of
the user configuration needs, a few others point to the need to define 'FDS_VIRTUAL_PAGES_RESERVED'

MY QUESTIONS are:

1. Does one need to do BOTH or EITHER (or maybe throw in some missing symbols that are magically designed into the SDK)?
2. Does one need to define ALL of the above symbols in BOTH Bootloader and Application configuration (or selectively in one or the other)

Cheers

RMV

Parents Reply Children
Related