<?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>LPCXpresso IDEのトピックLpc_1768_freertos_task_stack_size</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Lpc-1768-freertos-task-stack-size/m-p/537518#M5586</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by upadhyaya.sreenivasa on Tue Jul 05 21:54:56 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;[FONT=Times New Roman]Hi &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to implement FREERTOS concepts in LPC1769 MCU.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;when multiple tasks are created ,the code does not work when the combined stack sizes of the tasks exceed certain limit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In general whats the stack size limit when for tasks??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[/FONT]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 01:44:02 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T01:44:02Z</dc:date>
    <item>
      <title>Lpc_1768_freertos_task_stack_size</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Lpc-1768-freertos-task-stack-size/m-p/537518#M5586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by upadhyaya.sreenivasa on Tue Jul 05 21:54:56 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;[FONT=Times New Roman]Hi &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to implement FREERTOS concepts in LPC1769 MCU.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;when multiple tasks are created ,the code does not work when the combined stack sizes of the tasks exceed certain limit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In general whats the stack size limit when for tasks??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[/FONT]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:44:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Lpc-1768-freertos-task-stack-size/m-p/537518#M5586</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: Lpc_1768_freertos_task_stack_size</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Lpc-1768-freertos-task-stack-size/m-p/537519#M5587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by jharwood on Tue Jul 05 23:16:29 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: upadhyaya.sreenivasa&lt;/STRONG&gt;&lt;BR /&gt;[FONT=Times New Roman]&lt;BR /&gt;In general whats the stack size limit when for tasks??&lt;BR /&gt;&lt;BR /&gt;[/FONT]&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you be more specific? Have you done the appropriate analysis on your task's requirements for stack size?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On the LPC176x series, you can easily set the FreeRTOS memang library to use the second 32k block of AHB memory. If that isn't enough, well, dang, you have a very vigorous application :eek:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:44:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Lpc-1768-freertos-task-stack-size/m-p/537519#M5587</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Lpc_1768_freertos_task_stack_size</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Lpc-1768-freertos-task-stack-size/m-p/537520#M5588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by TheFallGuy on Tue Jul 05 23:52:03 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe better to ask this question on the freertos forum:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://sourceforge.net/projects/freertos/forums/forum/382005&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:44:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Lpc-1768-freertos-task-stack-size/m-p/537520#M5588</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Lpc_1768_freertos_task_stack_size</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Lpc-1768-freertos-task-stack-size/m-p/537521#M5589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by jharwood on Wed Jul 06 00:23:14 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: TheFallGuy&lt;/STRONG&gt;&lt;BR /&gt;Maybe better to ask this question on the freertos forum:&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you explain why? The OP is quite specific about the platform being LPC1768/9.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you saying that this is a too generic question?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My helpful suggestions may put the OP on the right track. Bugging Richard about it is going to achieve what, exactly?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:44:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Lpc-1768-freertos-task-stack-size/m-p/537521#M5589</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: Lpc_1768_freertos_task_stack_size</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Lpc-1768-freertos-task-stack-size/m-p/537522#M5590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Rob65 on Wed Jul 06 01:55:25 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;[FONT=Times New Roman]when multiple tasks are created ,the code does not work when the combined stack sizes of the tasks exceed certain limit.&lt;BR /&gt;[/FONT]&lt;/SPAN&gt;&lt;HR /&gt;&lt;SPAN&gt;[FONT=Times New Roman]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This all depends.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What kind of memory management are you using?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Per default the lpc17xx FreeRTOS port places stacks on the heap.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Depending on which version of FreeRTOS you grabbed from the net there will be a certain default heap size (defined using configTOTAL_HEAP_SIZE in FreeRTOSConfig.h).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I suggest to start with the FreeRTOS project from the project wizard that is delivered with the new LPCXpresso 4.0.5 setup. That will give you a nice and easy introduction to FreeRTOS with the new 7.0.1 version.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And buy the FreeRTOS book from Richard's website. It is so much easier to use an Operating System when you know how to use it &lt;SPAN class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;&lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[/FONT]&lt;/SPAN&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;[FONT=Times New Roman]In general whats the stack size limit when for tasks??&lt;BR /&gt;[/FONT]&lt;/SPAN&gt;&lt;HR /&gt;&lt;SPAN&gt;[FONT=Times New Roman]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There is no general stack size limit. It all depends on your application: how deep is the function call tree, how much local variables do you plae on the stack, which library functions do you use?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Most systems write a test-pattern to the stack space, let the application run and check the stack usage while running. You can then reduce the stack space when there is a lot of unused space but be warned...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;[/FONT]On the LPC176x series, you can easily set the FreeRTOS memang library to use the second 32k block of AHB memory.&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And you do this using:&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
__attribute__ ((__section__(".bss.$RAM2")))&amp;nbsp; static union xRTOS_HEAP
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;in the heap2.c file in FreeRTOS (providing your memmang is set up to use heap2.c.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rob&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[FONT=Times New Roman]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[/FONT]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:44:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Lpc-1768-freertos-task-stack-size/m-p/537522#M5590</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:44:04Z</dc:date>
    </item>
  </channel>
</rss>

