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.

CCS/TMS320C5505: The program unable to function after linker command file modification

Part Number: TMS320C5505

Tool/software: Code Composer Studio

I am working on a program which required Int16 data[48000] allocation, initially the linker warns me about the .bss allocation is not successful due to memory insufficiency.

Therefore I changed the linker command file as follow:

SECTIONS
{
.text > DARAM align(32) fill = 20h { * (.text) }

/* Primary system stack */
.stack > DARAM align(32) fill = 00h
/* Secondary system stack */
.sysstack > DARAM align(32) fill = 00h
/* CSL data */
.csldata > DARAM align(32) fill = 00h
/* Initialized vars */
.data > DARAM align(32) fill = 00h
/* Global & static vars */
.bss > CE1 align(32) fill = 00h //Initially this is allocated to DARAM
/* Constant data */
.const > DARAM align(32) fill = 00h
/* Dynamic memory (malloc) */
.sysmem > DARAM
/* Switch statement tables */
.switch > DARAM
/* Auto-initialization tables */
.cinit > DARAM
/* Initialization fn tables */
.pinit > DARAM align(32) fill = 00h
/* C I/O buffers */
.cio > DARAM align(32) fill = 00h
/* Arguments to main() */
.args > DARAM align(32) fill = 00h

When the program can be compiled successfully, When I run a sample program which read data from audio in with AIC3204 and output from 3.5 audio port, I heard nothing from the output but some buzzling sound when the song is playing, when the song isn't playing, the buzzling is not there.

Can any expert explain what happen to this modification to .bss allocation?

Thank you sooo much :)))))

  • Which memory region is CE1 mapped to?

    If mapped to an external memory, has the external memory interface been initialised?

  • Hi,

    Did you already solve the issue you are having on this thread? The reason of my question is that you posted a new thread half hour later. 

    The comment to the highlighted line above indicates you are allocating CE1 to DARAM, which is only ~64 kiB. Your array is 48000 positions of 16-bits, thus 96 kB. If you defined CE1 as having this size, you will get to SARAM territory and potentially disrupt your runtime execution if you rely on double access memory to meet the realtime constraints. 

    https://www.ti.com/lit/ds/symlink/tms320c5505.pdf 

    Always keep in mind the linker knows nothing about the hardware memory organization and is fully slave to what the linker command file says. 

    Hope this helps,

    Rafael