Skip to main content
Abhishek Kumar
Associate III
October 8, 2018
Solved

How to use TCM memory on the STM32F7 series?

  • October 8, 2018
  • 3 replies
  • 2234 views

I am working on FreeRTOS on the STM32F777II. Was just curious, how can I configure TCM (CCM) memory for use and how can I force the linker to use this TCM memory only for selected variables declarations?

This topic has been closed for replies.
Best answer by Tesla DeLorean

There are manuals or online documentation? Perhaps grep the HAL/Cube example trees for .LD examples.

Along the lines of:

Assign_Pot Assign_Element[1000] __attribute__ ((section('.ccm')));

Assign_Pot* Assign_Tab[100] __attribute__ ((section('.ccm'))); 

MEMORY

{

...

CCMRAM (xrw)     : ORIGIN = 0x10000000, LENGTH = 32K

}

...

SECTIONS

{

...

 .ccm (NOLOAD) :

 {

   . = ALIGN(4);

   *(.ccm)

   *(.ccm.*)

   . = ALIGN(4);

 } >CCMRAM

...

}

https://www.st.com/content/ccc/resource/technical/document/application_note/bb/09/ca/83/14/e9/44/c5/DM00083249.pdf/files/DM00083249.pdf/jcr:content/translations/en.DM00083249.pdf

3 replies

Tesla DeLorean
Guru
October 8, 2018

Name sections within scatter file or linker script and direct variables via #pragma ​or attribute directive.

One might also do it dynamically by using an allocator for different pools. ​

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Abhishek Kumar
Associate III
October 8, 2018

Any example/video/blog/link/post?

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
October 8, 2018

There are manuals or online documentation? Perhaps grep the HAL/Cube example trees for .LD examples.

Along the lines of:

Assign_Pot Assign_Element[1000] __attribute__ ((section('.ccm')));

Assign_Pot* Assign_Tab[100] __attribute__ ((section('.ccm'))); 

MEMORY

{

...

CCMRAM (xrw)     : ORIGIN = 0x10000000, LENGTH = 32K

}

...

SECTIONS

{

...

 .ccm (NOLOAD) :

 {

   . = ALIGN(4);

   *(.ccm)

   *(.ccm.*)

   . = ALIGN(4);

 } >CCMRAM

...

}

https://www.st.com/content/ccc/resource/technical/document/application_note/bb/09/ca/83/14/e9/44/c5/DM00083249.pdf/files/DM00083249.pdf/jcr:content/translations/en.DM00083249.pdf

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