Other Parts Discussed in Thread: SYSBIOS
Tool/software: TI-RTOS
Hello again,
Now I wish to control placement of the code in memory. I want to place it in SRAM, not in DDR.
I am using CCS 7.2 SysBios 6.46.5.55, XDC 3.32.2.25
The linker cmd file says this:
/*
* In order to put the .bass, .text, .data, .heap or .stack into a
* different memory section, change the corresponding REGION_ALIAS.
*/
REGION_ALIAS("REGION_BSS", DDR2);
REGION_ALIAS("REGION_TEXT", DDR2);
REGION_ALIAS("REGION_DATA", DDR2);
REGION_ALIAS("REGION_STACK", DDR2);
REGION_ALIAS("REGION_HEAP", DDR2);
REGION_ALIAS("REGION_ARM_EXTAB", DDR2);
REGION_ALIAS("REGION_ARM_EXIDX", DDR2);
Which makes ZERO sense to even put that comment in there, because it also clearly says " This file was generated by linkcmd_bm_v7a.xdt ..."
I already know it's done with the linker script. But, as usual, I don't have control over the script. So editing the file is out of the question. I have to control it with the CFG file... which is difficult to find any support. And there is nothing in the XGCONF interface that gives me any control over the linker settings.
I searched for quite a while, and landed on this:
processors.wiki.ti.com/.../BIOS_FAQs
Which doesn't work. I tried simply:
Program.sectMap[".text : { } "] = "SRAM_HI";
Which gave an error:
ld.exe:configPkg/linker.cmd:68: syntax error
And I tried to set the entry point (_c_int00) to the SRAM location using this
Program.sectMap[".c_int00 { C:/ti/bios_6_46_05_55/packages/gnu/targets/arm/rtsv7A/lib/boot.aa8fg (.text) }"] = new Program.SectionSpec();
Program.sectMap[".c_int00 { C:/ti/bios_6_46_05_55/packages/gnu/targets/arm/rtsv7A/lib/boot.aa8fg (.text) }"].loadAddress = 0x402F0400;
And still got the same error. Clearly the tools ARE NOT creating proper linker cmd file syntax. The error is:
SECTIONS {
.text : { } : {*(.text : { } )} AT> SRAM_HI
.vecs : {*(.vecs)} AT> DDR2
ti.sysbios.family.arm.a8.mmuTableSection (NOLOAD) : {*(ti.sysbios.family.arm.a8.mmuTableSection)} AT> DDR2
xdc.meta (COPY) : {KEEP(*(xdc.meta))} AT> DDR2
.c_int00 : {
KEEP (*(.c_int00))
} > REGION_TEXT
.text : {
CREATE_OBJECT_SYMBOLS
KEEP (*(.resetVecs))
KEEP (*(.text))
*(.text.*)
(Where is the "AT > ... " coming from?? None of the other sections stuff the word "AT" between the brace and the memory name )
Perhaps somewhere there is a better document describing how to use these Java instructions in the CFG file...? Because I haven't found anything. I would go straight to the linker file based on this information:
processors.wiki.ti.com/.../Linker_Command_File_Primer
But it's useless here because the build tools decide they will do it "their own way". And "their own way" isn't working in any fashion I can decipher.
On the other hand... If I try to use my own CMD file, such as:
SECTIONS {
.text : { * (.text) } > SRAM_HI
}
Or one of some dozen different variants, it happily ignores it, and stuffs everything into DDR2 (0x80000000 ) (Because it sets every REGION_ALIAS to DDR2, and then sets every section to one of those region alias')
Or, if I do this to my cmd file:
SECTIONS {
.text:_c_int00 0x402F0400 : {
C:/ti/bios_6_46_05_55/packages/gnu/targets/arm/rtsv7A/lib/boot.aa8fg (.text)
} > SRAM_HI
}
It very loyally places the entry point at 0x402F0400, and then commences to put every other function up in DDR2
Are there any useful doc or instructions out there...?
