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.

Question about C6670 L2RAM Address configuration

Guru 15520 points

Hi,

I have a question about C6670 MCSDK FFTC sample program.

I refer to MCSDK FFTC sample project, and made own project.
In sample project's linker command file, L2SRAM is defined with local address.
And in the code, there are process which convert local address to global address
or vice-versa.

But my program's linker command file, I set CorePac0 L2 memory area as follow;
(Set org to L2 Global address)

MEMORY
{
  L2SRAM (RWX) : org = 0x10800000, len = 0x100000
}

I use L2 global address so that I deleted the address convert process
from my program.

The following is my question:
1.Is it okay to define L2SRAM address with global address in linker command file?

2.I deleted the address convert process from my program but in sample program
  following comment was listed:
  (This is found in FFTC_MultiCore_testProject\test_osal.c Osal_biosFree())
  //////////////////////////////////////////////////////
  Convert the global address to local address since
  thats what the heap understands.
  //////////////////////////////////////////////////////
 
  If I allocate memory with Global address,
  do I need to convert to local address when freeing the memory as comment mentioned?
  Or just free memory with Global address?

best regards,
g.f.

  • Even if it works, I wouldn't advise what you are trying to do.

    Access to L2SRAM via global addresses is by default uncached and also has higher latencies compared to accessing it using local addresses. Maybe there is some short-circuit logic in there, but I wouldn't rely on it.