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

Not able to compile mesh sdk for nrf51822 (QFAA H1 16KB RAM and 256 kb Flash). (Using gccarmemb)

HI, 

I have been trying to generate the hex files for the mesh sdk (Latest) examples using cmake following the instructions in the documentation.

But the platforms supported out of the boc for the sdk are  nrf51422_xxACnrf52832_xxAAnrf52840_xxAA. But i have been trying to generate the hex files for nrf51822_xxAA. I had modified the cmake files so that the board that gets selected is pca20006 with soft device s130 and at the same time decreased the flash size top 256kb and ram size too 16kb and generated the cmake files successfully. But i got a build error of

"c:/progra~2/gnutoo~1/62017-~1/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/ld.exe: examples\beaconing\beaconing_nrf51422_xxAC_s130_2.0.1.elf section `.bss' will not fit in region `RAM'
c:/progra~2/gnutoo~1/62017-~1/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/ld.exe: region RAM overflowed with stack
c:/progra~2/gnutoo~1/62017-~1/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/ld.exe: region `RAM' overflowed by 5424 bytes
collect2.exe: error: ld returned 1 exit status
[6/102] Building C object examples/light_switch/client/CMakeFiles/light...xxAC_s130_2.0.1.dir/__/__/__/mesh/access/src/device_state_manager.c.obj
ninja: build stopped: subcommand failed."

when i tried to build using the ccommand "ninja". 

Please help me as to if my hardware configuration supports mesh and if so where i went wrong.

Thanking You,

Sivaguru Ravi

 

  • Hi,

    You would need minimum a 32Kb RAM nRF51 or nRF52 device to run the both the Mesh stack + the SoftDevice stack.

    E.g the light_switch_server example uses about 15 kB RAM in the latest Mesh SDK, + you need about 8 kB RAM for the SoftDevice. 15 + 8 = 23 Kb, so it will not fit into a 16 kB RAM device. From the build error you are getting, you can see that you are missing 5kB RAM in order to run the client example. If you want to still use the nRF51822 you could go for the nRF51822 QF AC variant with 32 kB RAM, but I would recommend using the nRF52832 with 64 kB RAM if you are developing a mesh application.

  • Alternatively, if you are stuck on nrf51822 (QFAA) hardware or simply want to use them in a mesh network in some meaningful way, you could look into the Zephyr Project mesh stack which supports mesh for devices as small as the bbc:microbit (which is based on the nrf51822_QFAA).

    The caveats being:

    (1) the Zephyr mesh stack currently doesn't support device state persistence (provisioning will need to be done upon device reboot)

    (2) it's a different learning curve to the Nordic Mesh SDK (however just as relevant). A demo of Zephyr mesh on nrf51822_QFAA/bbc:microbit can be seen here.

    (3) based upon how persistence is finally implemented in the Zephyr mesh stack, it may be a short-term solution (although based upon my current understanding, even with persistence it should still fit on the 16KB/256KB RAM/FLASH variants going forward)

    (4) on a positive front, you get to see how well interoperability of the Bluetooth Mesh standard actually works across vendor stacks

    Regards,

Related