2018-10-08 01:12 AM
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?
Solved! Go to Solution.
2018-10-08 05:52 AM
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
...
}
2018-10-08 03:20 AM
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.
2018-10-08 04:51 AM
Any example/video/blog/link/post?
2018-10-08 05:52 AM
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
...
}