# the task with large stack size can't work

**URL:** <https://forums.freertos.org/t/the-task-with-large-stack-size-cant-work/180>\
**Category:** Kernel\
**Created:** [June 8, 2012, 10:57pm UTC](https://forums.freertos.org/t/the-task-with-large-stack-size-cant-work/180 "2012-06-08T22:57:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [June 8, 2012, 10:57pm UTC](https://forums.freertos.org/t/the-task-with-large-stack-size-cant-work/180/1 "2012-06-08T22:57:10Z")

</div>

**[vicui](https://sourceforge.net/u/vicui/)** wrote on [Friday, June 08, 2012](https://sourceforge.net/p/freertos/discussion/382005/thread/03b10a0a/#e2bc):

all:

I create those tasks to run  
sys\_thread\_new(“USB”, usb\_task, NULL, configMINIMAL\_STACK\_SIZE, USB\_TASK\_PRIO);  
&nbsp; sys\_thread\_new(“LED”, led\_task, NULL, configMINIMAL\_STACK\_SIZE, LED\_TASK\_PRIO);  
&nbsp; sys\_thread\_new(“DHCP”, dhcp\_task, NULL, configMINIMAL\_STACK\_SIZE,&nbsp; DHCP\_TASK\_PRIO);  
sys\_thread\_new(“POWER”, power\_task, NULL, configMINIMAL\_STACK\_SIZE,&nbsp; RS485\_TASK\_PRIO);  
sys\_thread\_new(“RELAY”, relay\_task, NULL, configMINIMAL\_STACK\_SIZE, RS485\_TASK\_PRIO);  
sys\_thread\_new(“OLED”, oled\_task, NULL, configMINIMAL\_STACK\_SIZE\*2, OLED\_TASK\_PRIO);  
sys\_thread\_new(“COM”, serial\_task, NULL, configMINIMAL\_STACK\_SIZE\*2, COM\_TASK\_PRIO);  
sys\_thread\_new(“TELNET”, telnet\_task, NULL, configMINIMAL\_STACK\_SIZE\*2, TELNET\_THREAD\_PRIO);  
sys\_thread\_new(“HTTP”, http\_task, NULL, configMINIMAL\_STACK\_SIZE\*2, HTTPSERVER\_THREAD\_PRIO);  
sys\_thread\_new(“SSL”, ssl\_server, NULL, configMINIMAL\_STACK\_SIZE\*8,&nbsp; HTTPSERVER\_THREAD\_PRIO);

except those, TCPIP and ethernet task are also running background, I found that SSL task can’t start, I set the #define configTOTAL\_HEAP\_SIZE ( ( size\_t ) ( 16 \* 1024 ) )  
I thinik the size is enough. but why the task with 1024B can’t work.

vincent

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [June 9, 2012, 6:19pm UTC](https://forums.freertos.org/t/the-task-with-large-stack-size-cant-work/180/2 "2012-06-09T18:19:35Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Saturday, June 09, 2012](https://sourceforge.net/p/freertos/discussion/382005/thread/03b10a0a/#5ca3):

Without knowing what configMINIMAL\_STACK\_SIZE is, nobody will be able to answer your question for definite, and do you really mean the task can’t start, or that the task can’t be created.&nbsp; If it is that the task can’t be created, then the assumption is you have simply run out of heap space, so 16K is not enough.&nbsp; Remember when defining a task stack size you are specifying it in works, not bytes, to on a 32 bit architecture (you didn’t mention the architecture either) if configMINIMAL\_STACK\_SIZE is set to 256, then defining a task to be 8\*configMINIMAL\_STACK\_SIZE will allocate 8K bytes. (8 \* 256 \* 4).

See [http://www.freertos.org/a00111.html](http://www.freertos.org/a00111.html) and [http://www.freertos.org/a00125.html](http://www.freertos.org/a00125.html)

Hope this helps.

Regards.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [June 10, 2012, 12:16am UTC](https://forums.freertos.org/t/the-task-with-large-stack-size-cant-work/180/3 "2012-06-10T00:16:25Z")

</div>

**[vicui](https://sourceforge.net/u/vicui/)** wrote on [Sunday, June 10, 2012](https://sourceforge.net/p/freertos/discussion/382005/thread/03b10a0a/#63ca):

Hi rechard:

thank you for your useful link.  
I am working on porting PolarSSL in FreeRTOS, it is almost succesful. if you need, I could release to you .

by the way , there is a demo project that FreeRTOS runs in SumSung S5PV210 processor platform ?

vincent

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [June 10, 2012, 12:19am UTC](https://forums.freertos.org/t/the-task-with-large-stack-size-cant-work/180/4 "2012-06-10T00:19:29Z")

</div>

**[vicui](https://sourceforge.net/u/vicui/)** wrote on [Sunday, June 10, 2012](https://sourceforge.net/p/freertos/discussion/382005/thread/03b10a0a/#d244):

Hi Rechard:

I knew that FreeRTOS integerate CyaSSL in application level, but CyaSSL is not full free in some point, I am watching on this a long time event discuss it with CyaSSL company ,. I hope SSL should be open as FreeRTOS. just a wish.

vincent

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [June 12, 2012, 2:15pm UTC](https://forums.freertos.org/t/the-task-with-large-stack-size-cant-work/180/5 "2012-06-12T14:15:34Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Tuesday, June 12, 2012](https://sourceforge.net/p/freertos/discussion/382005/thread/03b10a0a/#a117):

I think the licenses for Polar and CyaSSL are very similar, they are both GPL v2 / Commercial dual licensed, so I’m not sure what the distinction is there.

Regards.
