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 Locate Heap in SDRAM  

Locate Heap in SDRAM

Tunisia

Hello Franz,

you need to specify SDRAM memory in your linker file (here I am using a linker for STM32L476RGTx with 1M FLASH and 96K RAM)

/* Specify the memory areas */
MEMORY
{
FLASH (rx)      : ORIGIN = 0x08000000, LENGTH = 1M
RAM (xrw)       : ORIGIN = 0x20000000, LENGTH = 96K
SDRAM(xrw)    : ORIGIN = 0x????????, LENGTH = 8M
}


And modify >RAM by >SDRAM

/* User_heap_stack section, used to check that there is enough RAM left */
  ._user_heap_stack :
  {
    . = ALIGN(4);
    PROVIDE ( end = . );
    PROVIDE ( _end = . );
    . = . + _Min_Heap_Size;
    . = . + _Min_Stack_Size;
    . = ALIGN(4);
  } >SDRAM


Update:
Do not forget to initialize you SDRAM before your application starts !
It should be done in Reset Handler (in startup file) in assembly.

There are better solutions that writing in assembler
1- Start with the default STACK&HEAP location (RAM), initialize your SDRAM then switch to SDRAM as STACK&HEAP location
2- Separate Heap and stack locations (STACK in RAM and HEAP in SDRAM) in linker file, than initialize SDRAM in your main before any malloc usage