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.

Compiler/TMS320C6657: Locating strings in external memory

Part Number: TMS320C6657


Tool/software: TI C/C++ Compiler

PRAGMA(SET_CODE_SECTION("ext_data_ram"))

char *p_strings[] = 
{
   "foo",
   "bar",
};

where "ext_data_ram" is the external DDR memory.

The problem is that the pointers go into external memory but the strings themselves wind up in internal memory which wastes memory space.

Any suggestions on how to get both the pointers and strings into external memory?

  • Hi,

    Literal constant string are placed in ".const:string". As far as I know there isn't a pragma to set this section. You can move "p_string" but not the memory where the (char*) pointers point to.

    In the linker script you can easily allocate the entire ".const:string" to DDR.
  • Alberto is correct. The recommended way to place string constants is to use the linker command file to place the section ".const:string"
    There is no source-code annotation or pragma that will allow you to direct placement of string constants from the source code.