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.
Hello to everybody.
I have the seguent linker script
MEMORY
{
[etc...]
RAML0 : origin = 0x008000, length = _2k
RAML1 : origin = 0x008800, length = _1k
[etc...]
}
SECTIONS
{
.buffer : > RAML1&RAML1, PAGE 1<--------- I want to place ".buffer" both in RAML0 and RAML1
}
The compiler error me: "expection GROUP or UNION"
I have read "SPRU513C–October 2007" on page 188
The guide talks about "[...] same RUN address [...]" but section ".buffer" is not code, is data.
Can you help me?
I try this way:
MEMORY
[etc...]
RAML0 : origin = 0x008000, length = _2k
RAML1 : origin = 0x008800, length = _1k
[etc...]
}
SECTIONS
{
ramfuncs: > RAML0, PAGE 1
.sysmem: > RAML0, page 1
.buffer : > > RAMLO|RAML1, PAGE 1
}
But the linker answer
run placement fails for object ".sysmem", size 0x1a0 (page 1). [etc...]
run placement fails for object "ramfuncs", size 0x14c (page 1). [etc...]
I resolved the problem in this way but I don't know if is there a better way:
MEMORY
[etc...]
PAGE 1:
RAML0 : origin = 0x008000, length = _2k
RAML1 : origin = 0x008800, length = _1k
PAGE 3:
RAML0L1: origin= 0x008000, length = _3k
[etc...]
}
SECTIONS
{
ramfuncs: > RAML0, PAGE 1
.sysmem: > RAML0, PAGE 1
.buffer : > RAML0L1, PAGE 3
}
Mauro Fantina said:I resolved the problem in this way but I don't know if is there a better way:
You got the code to link. But I would be surprised if it executes the way you expect. It is OK for the ramfuncs section and .buffer section to reside at the same memory address? Unlikely.
This has me confused ...
Mauro Fantina said:length = _2k
That is not legal linker command file syntax. You have to write a constant integer such as 2048 or 0x800.
I think you want to use section splitting to have .buffer split across the RAML0 and RAML1 memory ranges. That is described in this application note. However, section splitting may not be a solution in this specific case. If .buffer is defined in a single source file as a large buffer shared by the rest of the application, then the section splitting feature in the linker will not split it up.
Thanks and regards,
-George
Mauro Fantina said:I resolved the problem in this way but I don't know if is there a better way:
You are right ! The code doesn't work correctly.
I post the REPLY as soon as linker ok me!
Mauro Fantina said:length = _2k
I use a define "#define _2k 0x800"
In my code I want to use the unused 2k ram to acquire pid signals.
There is a file where I define "buffer"
#pragma DATA_SECTION(buffer,".buffer");
Uint16 buffer[0x0800]; //2k
I read application note.
Thankyou
Let's back up here. Why don't you have one memory range ...
MEMORY
{
RAM : origin = 0x008000, length = _3k
}
and then you allocate everything into it ...
SECTIONS
{
ramfuncs > RAM
.sysmem > RAM
.buffer > RAM
/* and so on ... */
}
That's doesn't work for you for some reason. Why?
Thanks and regards,
-George
I use TMS320F 28035 (piccolo B). On page 16 of "SPRS584D–APRIL 2009–REVISED JUNE 2010" you can see memory map.
L0 SARAM is "Dual Mapped" data and code. L1 SARAM is not "Dual Mapped"
Mauro Fantina said:I use TMS320F 28035 (piccolo B). On page 16 of "SPRS584D–APRIL 2009–REVISED JUNE 2010" you can see memory map.
L0 SARAM is "Dual Mapped" data and code. L1 SARAM is not "Dual Mapped"
Mauro,
The "dual mapped" note means it is seen twice in the memory map. Once at 0x8000 and also at 0x3F80000. The higher address is typically used for compatiblity with some older devices.
All SARAM blocks are available in both program and data space for the main CPU.
L1, L2 can be remapped to the CLA's data space and L3 can be remapped to the CLA's program space.
Hope this helps.
-L
Ok, thankyou very much.
As soon as possibile I simplify "*.cmd" file in this way:
>>> RAML0L1 : origin = 0x008000, length = _3k
A question:
Have I to click "Verify" button at every answer in a thread ? Or I have to click "Verify" at the BEST answer ?
Mauro Fantina said:Have I to click "Verify" button at every answer in a thread ? Or I have to click "Verify" at the BEST answer ?
I appreciate you clicking "Verify" on anything. Ideally, though, you click it for any post which forms even part of the answer. The idea is to direct later readers to the most useful post or posts in the thread.
Thanks and regards,
-George