AnsweredAssumed Answered

MQX 4.2 Task Stack Allocation & Compiler Optimization

Question asked by Jason Scott on Mar 10, 2017
Latest reply on Mar 23, 2017 by Jason Scott

Good Afternoon,

I am having serious memory issues and i need help understanding a few things.

For starters here is some background information about what i am trying to do:

I am working on a custom board using the k60 processor.

I am using the KDS 3 with the GCC compiler.


What I need help with:

1) How do MQX tasks/sub-tasks allocate stack size & location?I currently run multiple sub tasks out of my "main task". I setup my SD card, start the shell, and a few other things. After entering a third task i feel like i am running out or stack space to allocate.


The screenshot above is right before i start my next task. After i enter the task, the MQX stack usage window goes gray and i can not see any information. however, i checked the stack pointer and i am at 0x1fffe938. I think i am expanding into another region or something.


2) Can I set a stack space for each individual task in external ram? If so, could i please see an example?

3) I read that the boot_stack is only used for the interrupts and a few basic things, are all of my MQX tasks running out of the boot_stack? Probably not right?

4) Does anyone have any recommendations on if building the bsp library's using optimizations/ debugging would alter my memory vs a release version? Again I am using the GCC 4.8.


Thanks for your time,


Any information or things to try would be appreciated!