AnsweredAssumed Answered

sdram ldf issues

Question asked by dlh on Sep 28, 2011
Latest reply on Oct 7, 2011 by dlh



I am trying to modify the Talkthrough example for the BF561 ezkit so that I can store a large amount of samples (10-100's thousands) into a bufffer. Once the buffer is full I then write the buffer to file and exit.


I have managed to successfully do this using a small buffer size of 1000, by adding "extern volatile int capture_buffer[]; " and "volatile int capture_buffer[BUFF_SIZE];" to the Talkthrough.h and main.c respectively. I then simply popuplate the capture_buffer in Process_Data until its full.


In order to get many more samples, I need the buffer to reside in the SDRAM, however when I modify the declarations to include "section("sdram0")  it compiles, but when I try to access the array (e.g. capture_buffer[0] = 1) I get this compilation warning/error combo:



[Warning li2060]  The following input section(s) that contain program code
        and/or data have not been placed into the executable for processor 'p0'
        as there are no relevant commands specified in the LDF:
[Error li1060]  The following symbols are referenced, but not mapped:
        '_capture_buffer' referenced from corea.dlb[main_core_A.doj](program)
Linker finished with 1 error and 1 warning
cc3089: fatal error: Link failed



And also:

Device 0:a: Warning: External memory is disabled for this region of memory.



However, if I put the following in the code it seems to compile and print out the correct data:

section("sdram0") int test[100];

int j;

for (j=0; j<100; j++) {

     test[j] = j+10;

     printf("%d = %d\n", j, test[j]);


(But I still get: Device 0:a: Warning: External memory is disabled for this region of memory.)


Is this just because the SDRAM is failing and its defaulting back to L2?

Does the LDF for the Talkthrough need to be modified if I wish to use the SDRAM?

Do I need to initialise the SDRAM in the code - or this sorted out by the ldf/compiler?

And as a side note, what is the default samplerate in the Talkthrough example?