K70F120 - RTCS appears to consume all memory

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

K70F120 - RTCS appears to consume all memory

558 Views
regisgeorge
Contributor I

Have a small C++ prototype app up and running on TWR-K70F120 using MQX 4.2.  It uses two message queues.  Everything works.

I added RTCS.  I can  RTCS_create() and ipcfg_init_device() and they return without error.  I then get failures on subsequent _msgpool_create().

I'm assuming there's sufficient RAM, just not configured properly.  Haven't yet found anything in the documentation yet that helps.

Thanks,

0 Kudos
4 Replies

406 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi Regis,

please check in the Task Aware Debugger (TAD - which is under menu MQX when you are in debug mode) the stack usage of the tasks. If TCP/IP task is running out of memory then you can modify the variable below before calling RTCS_create().

_RTCSTASK_stacksize = 4500;

If it is not the case please attach an image of the task summary or task list (depending if you use CW or KDS respectively) and stack usage window.

Regards,

Carlos

0 Kudos

406 Views
regisgeorge
Contributor I

Thanks for the reply Carlos.

The stacks were fine.  I had to do some digging in the BSP config files it seemed odd to be out of memory.  I found that only 2 message pools were allocated by default (though there were significantly more message queues).  I guess that RTCS uses a message pool and that was what got me.

I have been able to get the the stack initialized successfully.

0 Kudos

406 Views
Carlos_Musich
NXP Employee
NXP Employee

Thank you for sharing your comments Regis,

I dont know how did you solved this, but you can easily reconfigure the number of message tools setting a value in variable _RTCS_msgpool_init before calling RTCS_create().

E.g.

_RTCS_msgpool_init = 6;

Regards,

Carlos

0 Kudos

406 Views
regisgeorge
Contributor I

I changed the value in the MQX_INITIALIZATION_STRUCT in mqx_init.c  It has a member MAX_MSGPOOLS that was defaulted to 2 in my BSP.

0 Kudos