Hello people,

I will try to keep it short. After more than one entire week of intense work on making the given examples for data logging and MQTT communication working without bugs, I am now facing - again btw - a severe problem, that makes the use of the XDK somehow almost impossible at the moment.
After making the examples for DL and MQTT seperately compilable, I have now joined the two solutions into one project. Now the Problem is:
"ERROR : region RAM overflowed with stack"

I would really like to have data logging and mqtt connection running on only one device, but as it seems, the RAM of the XDK is not sufficient. Any suggestions?

I am using Bosch XDK110 and XDK Workbench version 3.3.1

Thank you in advance!

0 (0 Votes)
4/12/18 11:27 AM as a reply to Chris.
Hello Chris,

given the error message ERROR : region RAM overflowed with stack , it is safe to assume that the memory did not suffice for the application in its current state.

The DataLoggerDemo was not built with the intention of merging it with another application (while of course, the possibility was always there). This is why the memory management had not been optimized.

But the first things I would recommend changing are the stack depths of the various tasks and command processors that are running in the background, and afterwards the size of the FreeRTOS heap as well.

The command processors do not need nearly as much memory as they are given. The App Command Processor and the ServalPAL Command Processor are given 700 and 600 words respectively. That's 20kB in total, and the Application Command Processor is not even used after initializing the applications, but the memory remains reserved.

If you reduce that as much as possible (ensuring that the XDK still runs), then you can also reduce the total FreeRTOS heap size, allowing the MCU's stack to use more memory. You can do this by going to SDK > xdk110 > Common > config > FreeRTOSConfig.h and modifying #define configTOTAL_HEAP_SIZE to suit your needs. Per default, it is set to use 61kB of the MCU's 128kB total RAM.

Of course, changing this is not neccessarily going to solve your issue once and for all, but it should definitely help.

Please tell me if this was helpful, and do not hesitate to ask further questions.

Kind regards,
0 (0 Votes)