2024-09-27 01:35 AM
In the STM32CubeIDE predecessor (Atollic IDE) it was possible to set the page size allocation for malloc.
Is this somehow also possible in the STM32CubeIDE?
Is my understanding correct, that this page size will be reserved from the RAM by the sbrk() function. Then the malloc gets the needed size from this buffer. As soon as there is no longer enough space, the sbrk() functions gets another block?
Kind regards
Mathias
2024-09-27 05:34 AM
In the C library that goes with CubeIDE you don't need it.
2024-09-27 07:11 AM
Thanks for the reply.
But can I change it from 4096 bytes (default) to e.g. 128 bytes?
2024-09-27 07:41 AM - edited 2024-09-27 02:45 PM
Yes you can. But you don't need to, with the current version of newlib shipped with CubeIDE.
2024-10-01 01:19 AM
But if I would like to do it, how can I configure it?
2024-10-01 03:25 AM
By modification of _sbrk (sysmem.c in your project) or by modification of malloc in newlib and rebuilding the newlib.