Part Number: TMS320C6678
I have created a project based on the example code at ipc_3_50_04_08\examples\C6678_bios_elf\ex11_ping.
It is a makefile project and it uses TI-RTOS, RTSC and the platrorm ti.platforms.evm6678.
The file config.bld configures code to be linked into external DDR3 memory:
var SR_0 = {
name: "SR_0", space: "data", access: "RW",
base: 0x84000000, len: 0x200000,
comment: "SR#0 Memory (2 MB)"
};
Build.platformTable["ti.platforms.evm6678:core0"] = {
externalMemoryMap: [
[ "CORE0_PROG", {
name: "CORE0_PROG", space: "code/data", access: "RWX",
base: 0x80000000, len: 0x1000000,
comment: "CORE0 Program Memory (16 MB)"
}],
[ "SR_0", SR_0 ]
],
codeMemory: "CORE0_PROG",
dataMemory: "CORE0_PROG",
stackMemory: "CORE0_PROG"
};
…
Now I need to link some of the code into internal memory. (For example, DDR3 memory test should be run from internal memory so that it won't trash its own code.)
I have a linker command file that is appended by makefile to the automatically generated linker.cmd file during the build process.
The file contains lines like:
SECTIONS
{
.dsp2hostmailbox > MSMCSRAM
.host2dspmailbox > MSMCSRAM
.tsipData > L2SRAM
...
}
With it, I have been able to link some data segments to required memory areas. But that does not work with code.
What I have tried so far:
- Use #pragma CODE_SECTION in the C code and add section for that as above.
- Add the following line in the extra linker command file: memtest.oe66 > MSMCSRAM.
But these do not work.
The reason may be that the automatically generated linker.cmd file contains a line
.text: load >> CORE0_PROG
So all the code is loaded to DDR3 and that can not be changed afterwards in the additional linker command file.
Is there any way to override this?



