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

Can't change the address of ram start

Hi,

I tried to merge ble_app_multilink_central and ble_app_uart_c.

But, when I run the project It errors like below

<warning> nrf_sdh_ble: Insufficient RAM allocated for the SoftDevice.
<warning> nrf_sdh_ble: Change the RAM start location from 0x20004368 to 0x20004498.
<warning> nrf_sdh_ble: Maximum RAM size for application is 0x3BB68.
<error> nrf_sdh_ble: sd_ble_enable() returned NRF_ERROR_NO_MEM.
<error> app: Fatal error

I thougt the problem is the address of RAM_START and SIZE. So I changed it like below.

But, It doesn't work and RAM_START, RAM_SIZE are still same.

I changed sdk_config.h regarding the ram like below

#ifndef NRF_SDH_BLE_GAP_DATA_LENGTH
//#define NRF_SDH_BLE_GAP_DATA_LENGTH 27
#define NRF_SDH_BLE_GAP_DATA_LENGTH 251
#endif

// <o> NRF_SDH_BLE_PERIPHERAL_LINK_COUNT - Maximum number of peripheral links. 
#ifndef NRF_SDH_BLE_PERIPHERAL_LINK_COUNT
#define NRF_SDH_BLE_PERIPHERAL_LINK_COUNT 0
#endif

// <o> NRF_SDH_BLE_CENTRAL_LINK_COUNT - Maximum number of central links. 
#ifndef NRF_SDH_BLE_CENTRAL_LINK_COUNT
#define NRF_SDH_BLE_CENTRAL_LINK_COUNT 3
#endif

// <o> NRF_SDH_BLE_TOTAL_LINK_COUNT - Total link count. 
// <i> Maximum number of total concurrent connections using the default configuration.

#ifndef NRF_SDH_BLE_TOTAL_LINK_COUNT
#define NRF_SDH_BLE_TOTAL_LINK_COUNT 3
#endif

// <o> NRF_SDH_BLE_GAP_EVENT_LENGTH - GAP event length. 
// <i> The time set aside for this connection on every connection interval in 1.25 ms units.

#ifndef NRF_SDH_BLE_GAP_EVENT_LENGTH
#define NRF_SDH_BLE_GAP_EVENT_LENGTH 6
#endif

// <o> NRF_SDH_BLE_GATT_MAX_MTU_SIZE - Static maximum MTU size. 
#ifndef NRF_SDH_BLE_GATT_MAX_MTU_SIZE
#define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 247
//#define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 23
#endif

// <o> NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE - Attribute Table size in bytes. The size must be a multiple of 4. 
#ifndef NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE
#define NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE 1408
#endif

// <o> NRF_SDH_BLE_VS_UUID_COUNT - The number of vendor-specific UUIDs. 
#ifndef NRF_SDH_BLE_VS_UUID_COUNT
#define NRF_SDH_BLE_VS_UUID_COUNT 3
#endif

// <q> NRF_SDH_BLE_SERVICE_CHANGED  - Include the Service Changed characteristic in the Attribute Table.
 

#ifndef NRF_SDH_BLE_SERVICE_CHANGED
#define NRF_SDH_BLE_SERVICE_CHANGED 0
#endif

 How can I change those address?

Best regards,

Phil

  • Hi,

     How can I change those address?

    Assuming you have based your project on an example SES project from a recent SDK, the correct place to change the RAM start address and size is under section placement macros for the common target, which it looks like you do. However, I notice something strange with your section placement macros, and that is that the flash placement macros are missing. Why is that? Then the linker will not know how to place your application in flash. That does not seem directly related to the question, but it indicates that there is something fishy with your linker configuration.  Normally you should have a list looking something like this (where at least FLASH_START, FLASH_SIZE, RAM_START, and RAM_SIZE) are needed:

    FLASH_PH_START=0x0
    FLASH_PH_SIZE=0x100000
    RAM_PH_START=0x20000000
    RAM_PH_SIZE=0x40000
    FLASH_START=0x26000
    FLASH_SIZE=0xda000
    RAM_START=0x20002210
    RAM_SIZE=0x3ddf0

  • Hi Einar!

    Thank you for helping me, and not It works very well by following your advisement.

    Thank you again!

    Best regards

Related