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.

query about linker command file

hello,

I am trying to configure code composer linker command file to place sections of code to run from external 64 bit wide SDRAM.

How do I tell the linker that it is placing code and data into an area which is not 32 bits wide but 64 bits wide.

For example my current cmd file is

 -l iDENcfg.cmd -l rts6400.lib -l dsp64x.lib

MEMORY { FIFO_RSP_MEM (R): origin = 0xa0000000 length = 0x00000200

EXTERNAL_MEM0 : origin = 0x80000000 length = 0x8000000 }

SECTIONS { RSPFIFO load = FIFO_RSP_MEM

EXTERNAL_MEMORY0 load = EXTERNAL_MEM0

HOSTtoDSP load = 0x00001010

DSPtoHOST load = 0x00001020

HOSTPCIFLAG load = 0x00001030 .

externalMemoryFunction > EXTERNAL_MEM0 }

and then in code I have for code sections

#pragma CODE_SECTION(function1,".externalMemoryFunction");

void finction1 (...) { ..... }

#pragma CODE_SECTION(function2,".externalMemoryFunction");

 void finction2(...) { ..... }

and for data sections

 #pragma DATA_SECTION(array1, "EXTERNAL_MEMORY0"); static const int array1[] = { ........ };

#pragma DATA_SECTION(array1, "EXTERNAL_MEMORY0"); static const int array2[] = { ........ };

 

Regards,

Sonali

  • There is no way to tell the linker how wide your memory is, because it doesn't matter.  Folks have been linking code for 8, 16, 32 and 64-bit wide memory since the beginning.  It does matter when you use the hex utility to prepare for programming ROM or Flash.  For that there are command line options like -memwidth and -romwidth.

    Thanks and regards,

    -George