Russian,
Ok, I did some testing on a sample program of mine...
The *_ccm.ld file that Giovanni updated works! ( not that that is a surprise!!)
While I don't think I have done exhaustive testing, I found two things that need
to be done.
1. Declare your variable such as:
Code: Select all
volatile uint16_t zaudio_samples1[ 9000 ] __attribute__((section(".ccm")));
2. make REALLY SURE that you use your variable somewhere that the compiler
will find it. Otherwise, It looks like it will remove it from you code. Sometimes WITHOUT A TRACE!!!!
This seems to allow it to work without problems
Code: Select all
zaudio_samples1[493] -= 34;
zaudio_samples2[493] -= 34;
If I remember your code correctly you are doing a memcpy
Code: Select all
memcpy( zaudio_samples1, zaudio_samples2, sizeof(zaudio_samples1));
Seems to work, but throws warnings,
Code: Select all
myADC.c:225:3: warning: passing argument 1 of 'memcpy' discards 'volatile' qualifier from pointer target type [enabled by default]
In file included from myADC.c:4:0:
c:\chibistudio\tools\gnu tools arm embedded\4.7 2013q2\bin\../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/include/string.h:24:8: note: expected 'void *' but argument is of type 'volatile uint16_t *'
myADC.c:225:3: warning: passing argument 2 of 'memcpy' discards 'volatile' qualifier from pointer target type [enabled by default]
In file included from myADC.c:4:0:
c:\chibistudio\tools\gnu tools arm embedded\4.7 2013q2\bin\../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/include/string.h:24:8: note: expected 'const void *' but argument is of type 'volatile uint16_t *'
Give this a try and let me know what you find.
-John Scott