Hello, guys.
We are using nRF51822 SoC together with nRF5 v12.3.0 SDK.
According to the nRF51822 memory layout, half of the 256KB flash memory space is taken by the Softdevice, MBR, and Bootloader.
The other half (~127KB) is at our disposal for the Application code. What I noticed is the following:
- When I enable debug logging with the NRF_LOG_ENABLED flag, an additional ~20KB space of the Application area is taken for that.
- When ble_init() function is included in the code that contains:
- ble_stack_init()
- peer_manager_init()
- gap_params_init()
- advertising_init()
- gatt_init()
- services_init()
- conn_params_init(),
additional ~40KB space is taken from the Application area, leaving us with only ~65KB for our application code.
Inside services_init(), two standardized BLE Services (BAS and DIS) are initialized together with one custom BLE Service that contains two custom BLE Characteristics.
Is there anything we can do to minimize the memory footprints of debugging and BLE so that we can have more space for our Application code? Here attached you can find the sdk_config.h file that we use in our project.
Thanks in advance for your time and efforts.
Sincerely,
Bojan.