high RAM consumption for a BLE app

Hi all!

I have created a simple application that only turns on a led and power it off using BLE in NRF52810. The thing is that simple app uses a huge RAM (~85%) and flash. There is a way to reduce the consumption of RAM? I have seen a post were configuring some parameters to reduce the consumption, I have tried it, but it led to some errors when using BLE.

Best regards

Parents
  • Hi

    For our SoCs that are on the lower end in terms of RAM and Flash memory, it's strongly recommended to build them with the minimal build variant overlay config. You can see how to do so in the "Activating sample extensions" or make your own "minimal" config file based on the prj_minimal.conf file. The projects in NCS should build for the nRF52810 as well with the minimal configs set.

    As CheMax says, the nRF52810 only has 24kB RAM, so there won't be too much left with the Zephyr or SoftDevice controller as well as a BLE application on top, but you can use the Memory Report in our VS Code nRF Connect extension to see what files, etc. is taking up most of your RAM and/or ROM.

    Best regards,

    Simon

  • Hi Sominr,

    I'll have a look at it. So the best way can be use the nrf SDK instead of using zephyr?

    Also for CheMax, I use the project peripheral_lbs and compile for the nrf52dk_nrf52810 without problems but this is the RAM/FLASH consumption of that project:

    [225/225] Linking C executable zephyr/zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:      173960 B       192 KB     88.48%
                SRAM:       24073 B        24 KB     97.95%
            IDT_LIST:          0 GB         2 KB      0.00%

    Best regards

Reply
  • Hi Sominr,

    I'll have a look at it. So the best way can be use the nrf SDK instead of using zephyr?

    Also for CheMax, I use the project peripheral_lbs and compile for the nrf52dk_nrf52810 without problems but this is the RAM/FLASH consumption of that project:

    [225/225] Linking C executable zephyr/zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:      173960 B       192 KB     88.48%
                SRAM:       24073 B        24 KB     97.95%
            IDT_LIST:          0 GB         2 KB      0.00%

    Best regards

Children
Related