This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Error caused by two #pragma CODE_SECTION(s)



Found an interesting error apparently caused by:

#pragma CODE_SECTION (circulateBuffer, ".text");

#pragma CODE_SECTION (circulateBuffer, ".text");

Inside my function I have a memcpy that maintains a buffer as follows. (block size is 512)

 memcpy(pBuff,pBuff+BLOCK_SIZE,BLOCK_SIZE*sizeof(float));

With both #pragmas in my audio buffer is off by one sample. That is the element expected at location 0 is in location 1.  There are two memcpy's in the function.  When I take one pragma out it works as expected.  The memory is internal and block aligned.  function address in the map file does not change.   Any ideas why?

During the debug process I found if I use two memcpy calls also works.

Should I be concerned  about using memcpy at all?

Thanks!