This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Running out of FLASH memory on nRF52810

I have a nRF52810 project which initially used the ble_peripheral/ble_app_hrs from the enRF5_SDK_15.3.0_59ac345 as a starting point.  I have changed to a custom service and characteristics, with pairing/bonding and using the UART for serial communications to another processor, and need to add various peripheral functionality (e.g. discrete I/O and ADC) for custom features.

I am initially developing on a dev kit using the nRF52832 device, but based on the pc10040e / S112 softdevice to emulate a nRF52810, so that I can develop for the nRF52810.

However, I have run out of FLASH memory even though at the current time my own program is small.

From the .map file, there is a grand total of 91558 bytes (ro code and ro data), plus 100kBytes of SoftDevice.  In addition there is also FDS storage:

#define FDS_ENABLED 1

#define FDS_VIRTUAL_PAGES 3

#define FDS_VIRTUAL_PAGE_SIZE 1024

 My own routines in the initial project modules take up 3576 bytes (which include some based on the original example).  Otherwise, the main bulk of the FLASH is made up of library routines.  My understanding is that the FLASH memory size on the nRF52810 is 192kByte - I was not expecting to run out of FLASH on what seems like a relatively simple project at this stage.

I am using an IAR compiler (8.40.1), with optimisation set to High/Size (i.e. the same as the original example).

Would the situation be any better on an actual nRF52810 as opposed to an emulated one (on nRF52832)?

Do you have any information/application notes/suggestions that might help about how to conserve FLASH memory?

I have searched for this in support, but not been able to find a solution.

Thanks.

Related