I am using an nRF52 DK with Soft Device 6.1.0 on a Windows platform.
I am trying to add a new BLE Service and calling function sd_ble_uuid_vs_add() but get NO_MEM error.
From the old blogs on the website, I got few recommendations, and I tried all of them, but none of them worked.
1) In sdk.config.h, I made NRF_SDH_BLE_VS_UUID_COUNT from 0 to 5. Did not make any difference.
2) I increased NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE from 1408 to 1600, but did not help either.
3) After keeping NRF_SDH_BLE_VS_UUID_COUNT to 5 and leaving NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE unchanged, to 1408, I got error in nrf_sdh_ble_enable() from if (*p_app_ram_start > app_ram_start_link)
I changed the linker script at pca10040\s132\armgcc\ble_app_hrs_gcc_nrf52.ld:
Modified
MEMORY
{
FLASH (rx) : ORIGIN = 0x26000, LENGTH = 0x5a000
RAM (rwx) : ORIGIN = 0x20002b90, LENGTH = 0xd470
}
to
MEMORY
{
FLASH (rx) : ORIGIN = 0x26000, LENGTH = 0x5a000
RAM (rwx) : ORIGIN = 0x20002a90, LENGTH = 0xd570
}
Also tried
MEMORY
{
FLASH (rx) : ORIGIN = 0x26000, LENGTH = 0x5a000
RAM (rwx) : ORIGIN = 0x20002cc8, LENGTH = 0xd338
}
But does not make any diference to the behavior.
I am not sure if the linker changes are taking effect or not.
If I compile and flash , that should be enough right?
Anything wrong that i am doing, or any suggestions?
Thank You