Other Parts Discussed in Thread: SYSBIOS,
Tool/software: Code Composer Studio
Hi,
I am working on Sitara DSP C6xx project using SYSBIOS, trying to change memory map via configuration build file (config.bld) I included in the CCSv8 project. Just like in the IPC example C:\ti\ipc_3_47_01_00\examples\DRA7XX_bios_elf\ex02_messageq.
I followed the instructions here:
processors.wiki.ti.com/.../Linux_IPC_on_AM57xx
Tried to merge two project but failed, due to IPC project changes and not being able to work with StdMini library due to failed memory mapping. That is why I need new maping for.
I have created a custom platform based on DRA7XXX, added some aditional memory sections like so:
MEMORY
{
L2SRAM 00800000 00040000 00008000 00038000 RW X
L1PSRAM 00e00000 00008000 00008000 00000000 RW X
L1DSRAM 00f00000 00008000 00007720 000008e0 RW
OCMC_RAM1 40300000 00080000 00000000 00080000 RW X
OCMC_RAM2 40400000 00100000 00000000 00100000 RW X
OCMC_RAM3 40500000 00100000 00000000 00100000 RW X
EXT_RAM 80000000 00002000 00000000 00002000 RW X
EXT_RAM_2 90000000 00002000 00000000 00002000 RW X
}
In the RTSC tool, and saved the configuration under name: MyPlatformDevice. I did'nt want to do the rest of it through a tool because I have over 50 required memory sections for my project. So I relied on that I could add the memory map through config.bld file
var SR_0 = {
name: "SR_0", space: "data", access: "RW",
base: 0x8E000000, len: 0x1000000,
comment: "SR#0 Memory (16 MB)"
};
var ExtMemMapDsp1 = {
EXT_CODE: {
name: "EXT_CODE",
base: 0x00004000,
len: 0x000FC000,
space: "code",
access: "RWX"
},
EXT_DATA: {
name: "EXT_DATA",
base: 0x80000000,
len: 0x00200000,
space: "data",
access: "RW"
},
EXT_HEAP: {
name: "EXT_HEAP",
base: 0x80200000,
len: 0x00300000,
space: "data",
access: "RW"
},
TRACE_BUF: {
name: "TRACE_BUF",
base: 0x9F000000,
len: 0x00060000,
space: "data",
access: "RW"
},
EXC_DATA: {
name: "EXC_DATA",
base: 0x9F060000,
len: 0x00010000,
space: "data",
access: "RW"
},
PM_DATA: {
name: "PM_DATA",
base: 0x9F070000,
len: 0x00020000,
space: "data",
access: "RWX" /* should this have execute perm? */
}
};
Build.platformTable["MyPlatformDevice:dsp1"] = {
externalMemoryMap: [
[ "EXT_RAM", {
name: "EXT_RAM", space: "code/data", access: "RWX",
base: 0x8C000000, len: 0x1000000,
comment: "DSP1 Program Memory (16 MB)"
}],
[ "SR_0", SR_0 ],
[ "EXT_CODE", ExtMemMapDsp1.EXT_CODE ],
[ "EXT_DATA", ExtMemMapDsp1.EXT_DATA ],
[ "EXT_HEAP", ExtMemMapDsp1.EXT_HEAP ],
[ "TRACE_BUF", ExtMemMapDsp1.TRACE_BUF ],
[ "EXC_DATA", ExtMemMapDsp1.EXC_DATA ],
[ "PM_DATA", ExtMemMapDsp1.PM_DATA ]
],
codeMemory: "L1PSRAM",
dataMemory: "L2SRAM",
stackMemory: "L1DSRAM",
l1DMode: "32k",
l1PMode: "0k",
l2Mode: "0k"
};
/*
* ======== ti.targets.elf.C66 ========
*/
var C66 = xdc.useModule('ti.targets.elf.C66');
C66.ccOpts.suffix += " -mi10 -mo -pdr -pden -pds=238 -pds=880 -pds1110 ";
C66.platform = "MyPlatformDevice:dsp1";
C66.rootDir = java.lang.System.getenv("CGTOOLS_DSP");
Build.targets.$add(C66);
And I am certain that I am using the following platform in targets: (General->Products)
MyPlatformDevice:dsp1
Memory sections does not change for some reason, and corect result would have :
MEMORY
{
"SR_0", -> some memory description
"EXT_CODE", -> some memory description
"EXT_DATA", -> some memory description
"EXT_HEAP", -> some memory description
"TRACE_BUF" -> some memory description
"EXC_DATA", -> some memory description
"PM_DATA", -> some memory description
L2SRAM 00800000 00040000 00008000 00038000 RW X
L1PSRAM 00e00000 00008000 00008000 00000000 RW X
L1DSRAM 00f00000 00008000 00007720 000008e0 RW
OCMC_RAM1 40300000 00080000 00000000 00080000 RW X
OCMC_RAM2 40400000 00100000 00000000 00100000 RW X
OCMC_RAM3 40500000 00100000 00000000 00100000 RW X
EXT_RAM 80000000 00002000 00000000 00002000 RW X
EXT_RAM_2 90000000 00002000 00000000 00002000 RW X
}
But this is not the case. Also I get overlap of every defined memory sector with the "Default" one !? I don''t know where is this default sector defined. (Searched it on E2E, looks like I have to add more specific sectors, but I can't do that :( )
So what are other valid ways to add memory sections? And why does this not work ? Do linkdef.CMD files work with this generated one ?
Thanks and kind regards,
Nikola