# Increase Thread Stack Size on Microblaze System

**URL:** <https://forums.freertos.org/t/increase-thread-stack-size-on-microblaze-system/7055>\
**Category:** Kernel\
**Created:** [March 13, 2018, 11:46am UTC](https://forums.freertos.org/t/increase-thread-stack-size-on-microblaze-system/7055 "2018-03-13T11:46:27Z")\
**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:** [March 13, 2018, 11:46am UTC](https://forums.freertos.org/t/increase-thread-stack-size-on-microblaze-system/7055/1 "2018-03-13T11:46:27Z")

</div>

**[mike-ascend](https://sourceforge.net/u/mike-ascend/)** wrote on [Tuesday, March 13, 2018](https://sourceforge.net/p/freertos/discussion/382005/thread/50d6fa00/#2789):

I am using a Microblaze CPU with FRTOS version 8.2.3. Is it possible to increase the stack size beyond the limit imposed by the prototype of function xTaskCreate.

usStackDepth is declared as a unsigned short which means, on a 32 bit Microblaze, the stack for threads has a maximum limit of 4 \* 65353 = 262140 bytes (256 KB).

I know there a lot of questions regarding stacks size and I have been through them but they do not seem to answer the above question.

Thanks.

---

<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:** [March 13, 2018, 3:46pm UTC](https://forums.freertos.org/t/increase-thread-stack-size-on-microblaze-system/7055/2 "2018-03-13T15:46:40Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Tuesday, March 13, 2018](https://sourceforge.net/p/freertos/discussion/382005/thread/50d6fa00/#379d):

FreeRTOS V10 introduced a macro configSTACK\_DEPTH\_TYPE that can be defined in FreeRTOSConfig.h to whichever type you like - if it is left undefined then it defaults to uint16\_t for backward compatibility.

You could either just drop the FreeRTOS V10 source files over the top of your V8.2.3 files to upgrade the FreeRTOS version, or grep the V10 code to see everywhere where configSTACK\_DEPTH\_TYPE is used and make the same chanages in your V8.x code.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [March 13, 2018, 3:52pm UTC](https://forums.freertos.org/t/increase-thread-stack-size-on-microblaze-system/7055/3 "2018-03-13T15:52:39Z")

</div>

**[mike-ascend](https://sourceforge.net/u/mike-ascend/)** wrote on [Tuesday, March 13, 2018](https://sourceforge.net/p/freertos/discussion/382005/thread/50d6fa00/#379d/211f):

Thanks for the information.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [March 13, 2018, 4:43pm UTC](https://forums.freertos.org/t/increase-thread-stack-size-on-microblaze-system/7055/4 "2018-03-13T16:43:26Z")

</div>

**[mike-ascend](https://sourceforge.net/u/mike-ascend/)** wrote on [Tuesday, March 13, 2018](https://sourceforge.net/p/freertos/discussion/382005/thread/50d6fa00/#a89c):

I do not expect details, but in your opinion, how compatible would you expect the CPU port layer to be with FRTOS 10; when it was written for FRTOS 8.2.3?

---

<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:** [March 13, 2018, 4:45pm UTC](https://forums.freertos.org/t/increase-thread-stack-size-on-microblaze-system/7055/5 "2018-03-13T16:45:46Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Tuesday, March 13, 2018](https://sourceforge.net/p/freertos/discussion/382005/thread/50d6fa00/#a89c/57ba):

It should be a drop in replacement. Best thing to do would be to take a  
back up of what you have already, drop the new files in (all of them,  
including the port layer, etc.) and give it a go. You can always revert.
