cancel
Showing results for 
Search instead for 
Did you mean: 

How to use TCM memory on the STM32F7 series?

Abhishek Kumar
Associate III

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?

1 ACCEPTED SOLUTION

Accepted Solutions

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 Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

3 REPLIES 3

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 Venmo
Up vote any posts that you find helpful, it shows what's working..
Abhishek Kumar
Associate III

Any example/video/blog/link/post?

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 Venmo
Up vote any posts that you find helpful, it shows what's working..