Skip to main content
ludovic Wiart
Associate II
Sep 15, 2017 3:52 PM UTC
Solved

display address CCM

Posted on September 15, 2017 at 17:52

Hi,

I try to move some array in CCM on stm32f415.

I modify the ld script with 

 CCM_SRAM   (rwx) : ORIGIN = 0x10000000, LENGTH = 64K 

.ccmram :

{

. = ALIGN(4);

_sccmram = .; /* create a global symbol at ccmram start */

*(.ccmram)

*(.ccmram*)

. = ALIGN(4);

_eccmram = .; /* create a global symbol at ccmram end */

}> CCM_SRAM

In my programe I had 2 global array:

char buffer[1024];

char in_ccram_buffer[1024] __attribute__((section('ccmram')));

and I print there address :

printf (' buffer = %08x    in_ccram_buffer = %08x\n',&buffer,&in_ccram_buffer  );

the result is :

buffer = 20001a3c    in_ccram_buffer = 20000ce4

I don't understand why the 

in_ccram_buffer isn't in 0x1000.....

#ccm #sram-ccm
    This topic has been closed for replies.
    Tesla DeLorean
    Tesla DeLoreanBest answer
    Guru
    Sep 15, 2017 6:01 PM UTC
    Posted on September 15, 2017 at 18:01

     ,

     ,

    Keil example

     ,

    Look at how the symbol is described in the .MAP file, and why that would end up in SRAM

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

    3 replies

    Tesla DeLorean
    Guru
    Sep 15, 2017 3:57 PM UTC
    Posted on September 15, 2017 at 17:57

    Use DOT CCMRAM perhaps?

    char in_ccram_buffer[1024] __attribute__((section('.ccmram')));

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Tesla DeLorean
    Tesla DeLoreanBest answer
    Guru
    Sep 15, 2017 6:01 PM UTC
    Posted on September 15, 2017 at 18:01

     ,

     ,

    Keil example

     ,

    Look at how the symbol is described in the .MAP file, and why that would end up in SRAM

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