Failing to run on nRF52805

I compiled some legacy code (once written for the nRF52832), trying to adapt it for the nRF52805.

I have already done the following:

  • defining -DNRF52805_XXAA
  • defining -mfloat-abi=soft
  • defining-DFLOAT_ABI_SOFT
  • adapted the linker script to this:

  FLASH (rx) : ORIGIN = 0x1C000, LENGTH = 0x30000 - 0x1C000
  RAM (rwx) :  ORIGIN = 0x20002730, LENGTH = 0x6000 - 0x2730

My SD is configured like this:

#define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 247
#define NRF_SDH_BLE_VS_UUID_COUNT 3
#define NRF_SDH_BLE_GAP_EVENT_LENGTH 320
#define NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE 1408

Now I would be thankful to have these questions answered:

  1. Why does the SD113 require so much RAM (0x2730 compared to 0x1198 as in the docs)? I am using 3 VS UUIDs, but does that really hog so much memory?
  2. Do I need to compile gcc_startup_nrf52805.S or gcc_startup_nrf52.S? Same for system_nrf52805.c? When do I use which?
  3. The code will simply not boot on my nRF52805. Is there any setting I am missing?

Thanks!

Parents
  • Hi,

    Why does the SD113 require so much RAM (0x2730 compared to 0x1198 as in the docs)? I am using 3 VS UUIDs, but does that really hog so much memory?

    Minimum RAM requirement is 0x1198 bytes. Call stack usage comes on top, with maximum 0x700 bytes. In addition, depending on configuration, additional RAM requirements apply. Ref. S113 Release notes "SoftDevice properties" section for the given release (in this caes s113_nrf52_7.3.0.)

    Do I need to compile gcc_startup_nrf52805.S or gcc_startup_nrf52.S? Same for system_nrf52805.c? When do I use which?

    Setup, includes, etc. depend on toolchain (nRF5 SDK support multiple). However, switch between different SoCs typically involve changing RAM and Flash settings and a simple define change; the rest (which SoC specific files are involved in builds) is then typically handled by the MDK. For instance, for Keil, there should be a selection in project settings. You may have to also switch between hardware and software floating point.

    The code will simply not boot on my nRF52805. Is there any setting I am missing?

    If it still fails, please consult Developing for the nRF52805 with nRF5 SDK.

    Worst case, it might be that the total memory requirements of your application is simply too large for what is available on the nRF52805.

    Regards,
    Terje

  • Hello,

    thanks for the reply!

    1. Is 0x2730 realistic? I see that the SD may require more than 0x1198, but 0x2730 seems extremely large. Is there some formula available for the calculation?

    2. I am using nRF5 SDK 17.1. Should I include gcc_startup_nrf52805.S or gcc_startup_nrf52.S?

    3. My linker script is written to top out at the physical limit of the chip (0x6000). The firmware should fail at compilation time if it needed to much RAM, right? Or can it really fail at runtime aswell?

    Thanks again!

Reply
  • Hello,

    thanks for the reply!

    1. Is 0x2730 realistic? I see that the SD may require more than 0x1198, but 0x2730 seems extremely large. Is there some formula available for the calculation?

    2. I am using nRF5 SDK 17.1. Should I include gcc_startup_nrf52805.S or gcc_startup_nrf52.S?

    3. My linker script is written to top out at the physical limit of the chip (0x6000). The firmware should fail at compilation time if it needed to much RAM, right? Or can it really fail at runtime aswell?

    Thanks again!

Children
No Data
Related