Contiki OS can allow a lot of possibility but with time the firmware take more and more space in memory. We use Zolertia Firefly and Zolertia Remote for our experiments. After enabling TSCH and the Ipv6 stack, the firmware become so large that the memory can become too small for the motes. In practice we get and error indicating that we use more memory than available (.stack' will not fit in region 'FRSRAM'
memory error).
The Zolertia Firefly and Remote rests on a Zoul platform that use a CC2538 CPU. This chip can have up to 32 KB of RAM and 512 KB ROM. The Zoul integrate 32 KB of RAM.
In practice this memory is divided in two part 16 KB are full retention in all power modes and the other 16 KB part are without retention. Then if the CPU goes to sleep mode the part without retention will become corrupt. By default, the linker only use the first 16 Ko of RAM to allow Contiki to use the less power by going in sleep mode when possible.
In our case, has we want to try big schedule we need more memory. To be able to do that we disable the Low Power Mode of the CPU.
It’s simple. You just need to add a macro in the configuration (`contiki-conf.h` or `project-conf.h`).
#undef LPM_CONF_ENABLE
#define LPM_CONF_ENABLE 0
/!\ if you disable the LPM power consumption will be a lot bigger because your mote will not go to sleep. Be aware of this and don’t disable this feature if you want to use your mote with a battery or for a product in production .
I would like to David Hauweele to his help to found how to use more memory on these devices!