How does the linker assign anything to ITCMRAM on STM32 H7 series Arm Cortex M MCU?

136 Views Asked by At

How does the linker assign anything to ITCMRAM on STM32 H7 series Arm Cortex M MCU?

The linker script provided by ST has a section defining ITCMRAM:

/* Memories definition */
MEMORY
{
  ITCMRAM    (xrw)    : ORIGIN = 0x00000000,   LENGTH = 64K
  RAM    (xrw)    : ORIGIN = 0x20000000,   LENGTH = 128K
  ROM    (rx)    : ORIGIN = 0x08000000,   LENGTH = 1024K
}

Yet there are no references anywhere to ITCMRAM that I can find. Does the linker actually ever use it? If not, what is the point of defining it?

1

There are 1 best solutions below

2
the busybee On BEST ANSWER

To effectively assign anything to this memory, the linker script would need something like this in its SECTIONS:

  .itcmram :
  {
    . = ALIGN(4);
    KEEP(*(.itcm)) /* or other name(s) */
    . = ALIGN(4);
  } >ITCMRAM

The definition in MEMORY might simply be a remainder of a general and bigger linker script used as a template, which was reduced to the one you look at.