cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO-H745ZI-Q missing ram space in example project

gasda.1
Associate II

Hi,

I've just received new nucleo board, created new project for this board using cubeIDE and first thing i wanted to check is how the memories are split between cores and i'm a bit confused because i'm missing atleast 500k of RAM as it's not in linker files.

CM7 Linker:

MEMORY
{
FLASH (rx)      : ORIGIN = 0x08000000, LENGTH = 1024K
RAM (xrw)      : ORIGIN = 0x20000000, LENGTH = 128K
ITCMRAM (xrw)      : ORIGIN = 0x00000000, LENGTH = 64K
}

CM4 Linker:

MEMORY
{
FLASH (rx)      : ORIGIN = 0x08100000, LENGTH = 1024K
RAM (xrw)      : ORIGIN = 0x10000000, LENGTH = 288K
}

Nucleo is advertised with 1Mb of ram so where is the missing part? It looks like i'm mising SRAM4, AXI SRAM and backup RAM sections, do i need to add them manualy to linker script or there is an option somewhere in .ioc file?

2 REPLIES 2

You'd need to add them to the linker script, and determine how you're going to floor plan your data/structures in to them.

You'll need to enable clocks in the startup.s, or to initialize external memories.

The startup.s for GNU/GCC tools will also need to be extended to initialize the statics into different memories.

And you'll also want to fix the __sbrk allocator for the heap so it is more aware that the heap/stack can use different memories.

Better professional tools will require less of this work/fiddling.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
berendi
Principal

CubeIDE/CubeMX generated code covers only a small subset of the capabilities of the STM32 hardware. If you want to use the full potential of your MCU, you can't rely on these tools.

There are lots of possible ways to share the remaining RAM between the two cores. If it is to be used as shared memory accessed by both cores, it might be a bad idea to tell the linker about it at all, because the linker might have a different idea about the order the variables that go into the common section when linking the other subproject.

Read chapter 2 of the reference manual carefully (skip the AXI matrix stuff for now), decide how the memory would be used in your project, and add them manually to the linker script if you want. Current CubeMX versions can't do it.