<?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>MCUXpresso IDE中的主题 PN7462 RTOS Problem with Global Large Array Definitions</title>
    <link>https://community.nxp.com/t5/MCUXpresso-IDE/PN7462-RTOS-Problem-with-Global-Large-Array-Definitions/m-p/1384783#M7654</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If I define these two arrays&amp;nbsp;&lt;/P&gt;&lt;P&gt;uint8_t testArr[300];&lt;/P&gt;&lt;P&gt;uint8_t testArr[300];&lt;/P&gt;&lt;P&gt;in source file and try to use this source file in RTOS tasks firmware execution stops. But if I define them with size of 150 i'm not facing any problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to increase stack size of RTOS tasks without success.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I need to change? (I'm using PN7462AU_ex_phExCcid sample project)&lt;/P&gt;</description>
    <pubDate>Fri, 10 Dec 2021 10:19:34 GMT</pubDate>
    <dc:creator>EE_Ark</dc:creator>
    <dc:date>2021-12-10T10:19:34Z</dc:date>
    <item>
      <title>PN7462 RTOS Problem with Global Large Array Definitions</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/PN7462-RTOS-Problem-with-Global-Large-Array-Definitions/m-p/1384783#M7654</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If I define these two arrays&amp;nbsp;&lt;/P&gt;&lt;P&gt;uint8_t testArr[300];&lt;/P&gt;&lt;P&gt;uint8_t testArr[300];&lt;/P&gt;&lt;P&gt;in source file and try to use this source file in RTOS tasks firmware execution stops. But if I define them with size of 150 i'm not facing any problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to increase stack size of RTOS tasks without success.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I need to change? (I'm using PN7462AU_ex_phExCcid sample project)&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 10:19:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/PN7462-RTOS-Problem-with-Global-Large-Array-Definitions/m-p/1384783#M7654</guid>
      <dc:creator>EE_Ark</dc:creator>
      <dc:date>2021-12-10T10:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: PN7462 RTOS Problem with Global Large Array Definitions</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/PN7462-RTOS-Problem-with-Global-Large-Array-Definitions/m-p/1384826#M7655</link>
      <description>&lt;P&gt;Do you have this on the task stack (local variable?).&lt;/P&gt;&lt;P&gt;The both have the same name, are they in different scopes?&lt;/P&gt;&lt;P&gt;And you would need to have a task stack for this with at least 600 bytes (plus for everything else you have, probably around 1 KByte.&lt;/P&gt;&lt;P&gt;And where does it stop? Did you check it with the debugger?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 11:53:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/PN7462-RTOS-Problem-with-Global-Large-Array-Definitions/m-p/1384826#M7655</guid>
      <dc:creator>ErichStyger</dc:creator>
      <dc:date>2021-12-10T11:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: PN7462 RTOS Problem with Global Large Array Definitions</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/PN7462-RTOS-Problem-with-Global-Large-Array-Definitions/m-p/1384878#M7656</link>
      <description>&lt;P&gt;They are global static variables.&lt;/P&gt;&lt;P&gt;They have different names.&lt;/P&gt;&lt;P&gt;If I increase task stack size when using 'phRtos_TaskCreate' I end up with Hard page fault error.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If I debug it, firmware stops somewhere and if I try to pause debugging to see where it stops IDE gives an error like ''Can't halt processor'.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 13:28:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/PN7462-RTOS-Problem-with-Global-Large-Array-Definitions/m-p/1384878#M7656</guid>
      <dc:creator>EE_Ark</dc:creator>
      <dc:date>2021-12-10T13:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: PN7462 RTOS Problem with Global Large Array Definitions</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/PN7462-RTOS-Problem-with-Global-Large-Array-Definitions/m-p/1384894#M7657</link>
      <description>&lt;P&gt;If they are global variables, you don't have to increase the task stack size(s), as they are not allocated on the (task) stack memory.&lt;/P&gt;&lt;P&gt;Have you turned on the error hooks (e.g. for malloc failed)? If you try to create a task with a stack too large, and you don't have enough memory, this would be an error condition you have to catch.&lt;/P&gt;&lt;P&gt;So in essence: if the variables are global, you don't need to increase stack sizes. If you increase stack sizes, you might be running out of memory.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 13:50:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/PN7462-RTOS-Problem-with-Global-Large-Array-Definitions/m-p/1384894#M7657</guid>
      <dc:creator>ErichStyger</dc:creator>
      <dc:date>2021-12-10T13:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: PN7462 RTOS Problem with Global Large Array Definitions</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/PN7462-RTOS-Problem-with-Global-Large-Array-Definitions/m-p/1384916#M7658</link>
      <description>&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;So If I don't need to increase task stack sizes what's the couse of this problem?&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I said before I'm modifying 'PN7462AU_ex_phExCcid' example and&amp;nbsp;problem arises when i add these 2 array definitions to 'phExCcid_UsbCcid_Process.c' file and try to read &amp;amp; write something on it.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 14:09:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/PN7462-RTOS-Problem-with-Global-Large-Array-Definitions/m-p/1384916#M7658</guid>
      <dc:creator>EE_Ark</dc:creator>
      <dc:date>2021-12-10T14:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: PN7462 RTOS Problem with Global Large Array Definitions</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/PN7462-RTOS-Problem-with-Global-Large-Array-Definitions/m-p/1384935#M7659</link>
      <description>&lt;P&gt;I&amp;nbsp; have no experience with your device (I don't have one), so cannot comment if this is something related to it. Adding global arrays (as said again) should not have an impact on what you do.&lt;/P&gt;&lt;P&gt;So I think your problem is something different. Maybe you copy these arrays somewhere and you don't check if the destination is large enough.&lt;/P&gt;&lt;P&gt;I recommend you turn on the compiler warnings if there is anything reported. But at the end you would have to step through your code and try to find out what is going in.&lt;/P&gt;&lt;P&gt;If you suspect things are writing to a location where it should not, you could use watchpoints (data breakpoints) to find out who is making the write.&lt;/P&gt;&lt;P&gt;In case you are not familiar with this: I wrote an article about it here: &lt;A href="https://mcuoneclipse.com/2018/08/11/tutorial-catching-rogue-memory-accesses-with-eclipse-and-gdb-watchpoints/" target="_blank"&gt;https://mcuoneclipse.com/2018/08/11/tutorial-catching-rogue-memory-accesses-with-eclipse-and-gdb-watchpoints/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 14:29:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/PN7462-RTOS-Problem-with-Global-Large-Array-Definitions/m-p/1384935#M7659</guid>
      <dc:creator>ErichStyger</dc:creator>
      <dc:date>2021-12-10T14:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: PN7462 RTOS Problem with Global Large Array Definitions</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/PN7462-RTOS-Problem-with-Global-Large-Array-Definitions/m-p/1384970#M7661</link>
      <description>&lt;P&gt;I just debugged my project line by line and I saw that it freezes at&amp;nbsp;"phRtos_TaskCreate" function. It never returns from it. When I try to pause debugging it says 'Cannot halt processor'.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 14:55:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/PN7462-RTOS-Problem-with-Global-Large-Array-Definitions/m-p/1384970#M7661</guid>
      <dc:creator>EE_Ark</dc:creator>
      <dc:date>2021-12-10T14:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: PN7462 RTOS Problem with Global Large Array Definitions</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/PN7462-RTOS-Problem-with-Global-Large-Array-Definitions/m-p/1384976#M7662</link>
      <description>&lt;P&gt;can you step into the RTOS task create function?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 15:05:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/PN7462-RTOS-Problem-with-Global-Large-Array-Definitions/m-p/1384976#M7662</guid>
      <dc:creator>ErichStyger</dc:creator>
      <dc:date>2021-12-10T15:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: PN7462 RTOS Problem with Global Large Array Definitions</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/PN7462-RTOS-Problem-with-Global-Large-Array-Definitions/m-p/1384980#M7663</link>
      <description>&lt;P&gt;In 'freeRtos/tasks.c' file in 'prvInitialiseNewTask' function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Ensure the name string is terminated in the case that the string length&lt;BR /&gt;was greater or equal to configMAX_TASK_NAME_LEN. */&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;pxNewTCB-&amp;gt;pcTaskName[ configMAX_TASK_NAME_LEN - 1 ] = '\0';&amp;nbsp; &amp;nbsp; &amp;nbsp;//It freezes on this line.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 15:22:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/PN7462-RTOS-Problem-with-Global-Large-Array-Definitions/m-p/1384980#M7663</guid>
      <dc:creator>EE_Ark</dc:creator>
      <dc:date>2021-12-10T15:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: PN7462 RTOS Problem with Global Large Array Definitions</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/PN7462-RTOS-Problem-with-Global-Large-Array-Definitions/m-p/1391957#M7687</link>
      <description>&lt;P&gt;PN7462 only equipped with 12 KB of SRAM.&amp;nbsp; Heap, stack and global data (BSS) and some revered memory will be stored in this region.&amp;nbsp; &amp;nbsp;I would not suggest you add&amp;nbsp; so large array.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Sun, 26 Dec 2021 13:02:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/PN7462-RTOS-Problem-with-Global-Large-Array-Definitions/m-p/1391957#M7687</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2021-12-26T13:02:27Z</dc:date>
    </item>
  </channel>
</rss>

