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


Linker Error "section `._user_heap_stack' will not fit in region `FLASH'"

I solved the issue.
It looks like the linker increments the FLASH location counter (load address, LMA) with the size of every section different from the canonical ones, i.e. .text, .data and .bss, even if they are to be located in RAM region.
The solution is to declare with NOLOAD mark type every section located in RAM region:

/* User_heap_stack section, used to check that there is enough RAM left */
._user_heap_stack (NOLOAD) :
{
. = ALIGN(8);

*(HEAP4) /* FreeRTOS heap4 */

PROVIDE ( end = . );
PROVIDE ( _end = . );
. = . + _Min_Heap_Size;
. = . + _Min_Stack_Size;
. = ALIGN(8);
} >RAM

With the NOLOAD mark type the section will not be loaded into FLASH memory and my application linking is successful.

France

Hi,

Sorry to have missed this question. In fact the linker allocates for every section some space in FLASH to hold the initialization data for the RAM... The only sections that have no initializatio data in FLASH are:

  • Sections marked a NOLOAD (as you did)
  • Sections that load in the .bss region (which is NOLOAD by default)


What I don’t understand is why your heap is not placed in .bss by the default allocation done by FREErtos’ heap_4.c file, but is in an HEAP4 file, where it is not placed in .bss but some other section... Do you use configAPPLICATION_ALLOCATED_HEAP and allocate it explicitly?

Best regards,

Bernard (Ac6)