2019-08-09 03:40 AM
Dear,
In CubeMx I have 3 statically allocated tasks wit stack size 256 words for each one, and also I have some Heap for dynamic allocation.
My Question:
Why in Cube I can not set TOTAL_HEAP_SIZE for example to 1000 (for my dynamic allocation pvPortMalloc) and stacks with size 256? The TOTAL_HEAP_SIZE should not affect to stack size is not it?
Also you can check problem on short video there: https://www.youtube.com/watch?v=ookcCYnF4k4&feature=youtu.be
If I know statically allocated memory, by definition, does not come out of the heap. The amount of memory available for use as the heap is the total memory available, minus statically allocated memory (minus the .data section, etc.).
2019-08-09 08:07 AM
FreeRTOS dynamically-allocated stacks and pvPortMalloc come from single pool TOTAL_HEAP_SIZE.
static stacks etc. not from this pool.
Can you clarify your question??
Are you saying CubeMX doesn't work properly for this case?
Warning: Using heap via malloc-functions in FreeRTOS tasks with STM-provided sbrk function always fails (pvPortMalloc OK);
2019-08-10 07:56 AM
Hi,
Maybe just a reminder:
Meaning:
It may help in the current example.
Regards,
Fred
2019-08-10 08:34 AM
This is the main problem with ST's software developers - absolutely blatant incompetency.
Go learn what a "static allocation" means...
https://www.freertos.org/Static_Vs_Dynamic_Memory_Allocation.html
2019-08-10 11:14 AM
Sorry for my previous post, completely out of scope. My mistake.
For sure, what I wrote only applies to dynamic tasks, it should in fact, as it is not right now: CubeMx Is wrongly applying that limit linked to the heap size to static tasks, while it should not, as analysed in the original post of JAN R.
This is a bug to be corrected in the next CubeMx release.
2019-08-10 12:02 PM
Now You're acting like You should! =)
Though "statically allocated tasks" were among the first words in the first sentence of original post and "statically allocated memory" repeated twice further down...
2019-08-12 12:08 AM
Thank you very much,
Do you have any estimate for date of release next CubeMX?