E
E
eegmak2020-03-31 14:23:10
STM
eegmak, 2020-03-31 14:23:10

In what tasks can one not do without the concept of "stack" and "heap"?

In cubemx In the "project manager" tab "linker settings" there are two parameters "minimum stack size" and "minimum heap size" why is this needed and in what cases should the default values ​​be changed?
For which tasks can not do without a stack or a heap?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Papayaved, 2020-04-09
@Papayaved

For the stack, TrueStudio has a Static Stack Analyzer, but there is no analyzer for the heap. A static stack analyzer should not, I think, be tempted by recursive functions.
For an average program, the stack has to be increased several times. The heap is used, for example, by HAL USB - so it also needs to be increased, it simply won't work with the default heap.
The word "minimum" in the settings is superfluous in my opinion, exactly the required size should be set, although at the beginning I also thought that the stack and heap grow in the direction of each other and the minimum size does not matter and all free memory (which is a lot) will be used, but in practice, program failures occur.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question