Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


You are viewing a reply to How to adjust stack and heap  

How to adjust stack and heap

Tunisia

Hello,

You can increase minimal heap and stack by modifying _Min_Heap_Size and _Min_Stack_Size figuring within “STM32F401****_FLASH.ld”

_Min_Heap_Size = 0x200;; /* required amount of heap */
_Min_Stack_Size = 0x400;; /* required amount of stack */

TIP: These values are only to force linker to generate an error if the RAM usage exceeds the real RAM size.

If this does not work for you (99% of cases :-D), ensure that you have syscalls.c in your project.
If you cannot find this file in your project:
you can borrow it from “...\STM32Cube_FW_F4_V1.10.0\Projects\STM32F401RE-Nucleo\Examples\UART\UART_Printf\SW4STM32”
and include this file in your project. After that you have to remove “-specs=nosys.specs” from Project Properties > C/C++ Build > Settings > Tool Settings > MCU GCC Linker > Miscellaneous > Linker flags

Explanation: the syscalls.c contains the implementation of _sbrk() used by malloc and manage heap and stack collision ........
the usage of nosys.specs is enough (we do not need syscalls.c) if we do not use printf or dynamic memory allocation