Hello everyone,
I just wanted to post an important detail when using Nordic's DFU.
After the successful run of the Nordic's buttonless DFU example (by following this tutorial https://devzone.nordicsemi.com/nordic/short-range-guides/b/software-development-kit/posts/getting-started-with-nordics-secure-dfu-bootloader), we tried to merge the DFU functionality to an existing firmware with UART service. However a problem arises - only one service could work at once. The other service would throw an NRF_ERROR_NO_MEM error.
To fix this, we used the following methodology:
1. In sdk_config.h change NRF_SDH_BLE_VS_UUID_COUNT from 1 to 2
2. In sdk_config.h change NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE from 1408 to 2816
3. Turn on debug messages from the nrf_sdh_ble_enable( ) API. Those messages will tell you how to edit your linker script.
In our case linker.ld was changed from this
RAM (rwx) : ORIGIN = 0x20002ad8, LENGTH = 0xd528
to this
RAM (rwx) : ORIGIN = 0x20003068, LENGTH = 0xcf98
Now we have both services running correctly.
Is there a more elegant solution to add a new service? (NRF52832, nRF5_SDK_17.0.2_d674dde)
Regards,
L. B.