<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Out of memory in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Out-of-memory/m-p/286192#M9064</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Camilo,&lt;/P&gt;&lt;P&gt;What's the meaning of "&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px; background-color: #ffffff;"&gt;if i want to modify the memory of one of them&lt;/SPAN&gt;"? Changing the stack size of the tasks. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MQX did not support stack increasing in run-time, so it is programmer's responsibilty to figure out the stack size of the tasks. A good news is that the stack usage can be get using MQX plug-in. So you can set a breakpoint in the deepest call stack of the task, and then check the stack usage of the task .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another option is "#define MQX_MONITOR_STACK&amp;nbsp; 1"&amp;nbsp; to make MQX fill 0x7374616B("stak") to the task's stack when the tast being created. Then after the task run for a while, you can dump the task's stack using JTAG tool to figure out the maxium usage ever.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Apr 2013 02:26:16 GMT</pubDate>
    <dc:creator>JerryFan</dc:creator>
    <dc:date>2013-04-26T02:26:16Z</dc:date>
    <item>
      <title>Out of memory</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Out-of-memory/m-p/286191#M9063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone, I`m having trouble with my task´s memory. The thing is as follows: I have several tasks, as ETH task, an SD (writing/erasing) task, a mifare task, a biometric device control task, among others. I`m running out of memory and my device is working right on the boundaries and if i want to modify the memory of one of them, right away another one starts to work badly. Is there by any chance a way to make this memory assignment dynamically? Right now I`m making the assignatios like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TASK_TEMPLATE_STRUCT MQX_template_list[] = &lt;/P&gt;&lt;P&gt;{ &lt;/P&gt;&lt;P&gt;/*&amp;nbsp; Task number, Entry point, Stack, Pri, String, Auto? */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; {GPIO_TASK,&amp;nbsp; Gpio_task,&amp;nbsp; /*1500*//*1000*/1000,12,&amp;nbsp; "GPIO", MQX_AUTO_START_TASK},&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; {LCD_TASK,&amp;nbsp;&amp;nbsp; Lcd_task,&amp;nbsp;&amp;nbsp; /*1500*//*1000*/900,&amp;nbsp; 12,&amp;nbsp;&amp;nbsp; "LCD", MQX_AUTO_START_TASK},// ojo modificado por miguel para lo de conalvias&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; MORPHOSMART_TASK_TAMPLATES,&lt;/P&gt;&lt;P&gt;&amp;nbsp; // WISMO_TASK_TAMPLATES,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; //{MODEM_TASK,&amp;nbsp;&amp;nbsp; Modem_task,&amp;nbsp;&amp;nbsp; 1500,&amp;nbsp; 11,&amp;nbsp;&amp;nbsp; "MODEM", MQX_AUTO_START_TASK}, // Ojo agregado por miguel para lo de conalvias&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; //{CBM_TASK,&amp;nbsp;&amp;nbsp; Cbm_task,&amp;nbsp;&amp;nbsp; 1500,&amp;nbsp; 10,&amp;nbsp;&amp;nbsp; "CBM", MQX_AUTO_START_TASK},&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; {ETH_TASK,&amp;nbsp;&amp;nbsp; Eth_task,&amp;nbsp;&amp;nbsp; /*1300*/1000,&amp;nbsp; 9,&amp;nbsp;&amp;nbsp; "ETH", 0}, // ojo modificado por miguel para lo de conalvias&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; {RTC_TASK,rtcinit_task,800,10,"rtcinit",MQX_AUTO_START_TASK},&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; {MIFARE_TASK, mifare_task, /*1500*/1000, 10,&amp;nbsp;&amp;nbsp; "mifare", 0},&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; {MIFARERX_TASK,mifarerx_task, /*1500*/1700, 9,&amp;nbsp;&amp;nbsp; "mifarerx",0},&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; {T_TASK,&amp;nbsp; t_task,&amp;nbsp; /*1000*/1500&amp;nbsp; ,12,&amp;nbsp; "TIMER", /*0*/MQX_AUTO_START_TASK},&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; {SD_TASK,&amp;nbsp; Install_SD,&amp;nbsp; /*2500*/2800&amp;nbsp; ,12,&amp;nbsp; "SD_Task",MQX_AUTO_START_TASK},&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; {PRINCIPAL_TASK,&amp;nbsp; Principal,&amp;nbsp; /*1500*/800&amp;nbsp; ,12,&amp;nbsp; "Principal_Task",MQX_AUTO_START_TASK},&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; //{RECIEVE_TASK,&amp;nbsp; Recieve_task,&amp;nbsp; 200&amp;nbsp; ,12,&amp;nbsp; "Recieve",MQX_AUTO_START_TASK}, // Ojo tarea agregada por miguel para lo de conalvias&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; //{WIEGAND_TASK,&amp;nbsp; Wiegand_task,&amp;nbsp; 800&amp;nbsp; ,12,&amp;nbsp; "Wiegand",MQX_AUTO_START_TASK}, // Ojo tarea agregada por miguel para lo de aireflex&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; {0,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0,&amp;nbsp;&amp;nbsp; 0,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for your time and cooperation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2013 19:42:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Out-of-memory/m-p/286191#M9063</guid>
      <dc:creator>CamiloA_</dc:creator>
      <dc:date>2013-04-25T19:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: Out of memory</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Out-of-memory/m-p/286192#M9064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Camilo,&lt;/P&gt;&lt;P&gt;What's the meaning of "&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px; background-color: #ffffff;"&gt;if i want to modify the memory of one of them&lt;/SPAN&gt;"? Changing the stack size of the tasks. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MQX did not support stack increasing in run-time, so it is programmer's responsibilty to figure out the stack size of the tasks. A good news is that the stack usage can be get using MQX plug-in. So you can set a breakpoint in the deepest call stack of the task, and then check the stack usage of the task .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another option is "#define MQX_MONITOR_STACK&amp;nbsp; 1"&amp;nbsp; to make MQX fill 0x7374616B("stak") to the task's stack when the tast being created. Then after the task run for a while, you can dump the task's stack using JTAG tool to figure out the maxium usage ever.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 02:26:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Out-of-memory/m-p/286192#M9064</guid>
      <dc:creator>JerryFan</dc:creator>
      <dc:date>2013-04-26T02:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: Out of memory</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Out-of-memory/m-p/286193#M9065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Camilo A Camacho D,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chongbin Fan made a good point to direct you right direction. The stack size of each task is statically allocated, not dynamically. Stack usage plug-in for MQX serves as watermark - highest usage of a stack per task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This thread is also related to stack size and how a user solved a problem with a stack overflow : &lt;A href="https://community.nxp.com/thread/306401"&gt;How to determine how much stack is used in a task&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;c0170&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 06:00:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Out-of-memory/m-p/286193#M9065</guid>
      <dc:creator>c0170</dc:creator>
      <dc:date>2013-04-26T06:00:35Z</dc:date>
    </item>
  </channel>
</rss>

