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.

Data alignment to 64kb

i have a C6678 DSP and i need to create a buffer aligned to 64kb.

I knew the DATA_ALIGN pragma for data alignment, but in SPRU187V is written that the maximum alignment is 32kb.

Is there anything i can do for obtain automatically a 64kb alignment or i have to declare in the Linker Command File a fixed memory space already aligned?

  • There are a few ways to do this.  I recommend you create the buffer in hand coded assembly.  Use the .usect directive.  Read up on that in the C6000 assembly tools manual.  You'll see how to set the alignment to any power of 2.  Back in C, define that buffer as "extern".  I presume you build for the newer EABI.  If so, then the name of the buffer in assembly is exactly the same as the name in C.

    Thanks and regards,

    -George