Home » Archived » DSDP - Real-Time Software Components (RTSC) » Code placement using RTSC(mapping of a CCSv3.0 linker command file to a command line RTSC build.)
() 1 Vote
Code placement using RTSC [message #511693] |
Tue, 02 February 2010 14:50 |
olivier Paviot Messages: 12 Registered: July 2009 |
Junior Member |
|
|
Hi all,
I used to create a linker command file under CCSV3.0 for creating memory area and code sections.
What is the way of doing that using RTSC? (creating memory area, creating code sections, allocating code to code sections in the linker command file)
I've seen this is about using the RTSC configuration file (.cfg) but things are not very clear to me.
Where to find documentation?
Thanks,
Br,
Olivier
[Updated on: Thu, 04 February 2010 08:54] Report message to a moderator
|
|
|
Re: Code placement using RTSC [message #511763 is a reply to message #511693] |
Tue, 02 February 2010 13:26 |
Dave Russo Messages: 172 Registered: July 2009 |
Senior Member |
|
|
Linker command file management is challenging since multiple
requirements need to be integrated into a single file. If you can be
more specific about what you want to do, we might be able to provide
some suggestions. In the meantime, some documentation links:
If you are creating a package that needs to add statements to the linker
command file, see
http://rtsc.eclipse.org/cdoc-tip/index.html#xdc/IPackage.htm l#get.Sects
If you are creating a configuration script that needs to do some basic
placement, see
http://rtsc.eclipse.org/cdoc-tip/index.html#xdc/cfg/Program. html#sect.Map
If you need complete control over the generated linker command file from
1. a configuration script, see
http://rtsc.eclipse.org/cdoc-tip/index.html#xdc/cfg/Program. html#link.Template
2. a build script, see the linkTemplate field of
http://rtsc.eclipse.org/cdoc-tip/index.html#xdc/bld/Executab le.html#.Attrs
On 2/2/2010 6:50 AM, olivier Paviot wrote:
> Hi all,
>
> I used to create a linker command file under CCSV3.0 for creating memory
> area and code sections.
>
> What is the way of doing that using RTSC? (creating memory area,
> creating code sections, allocating code to code sections in the linker
> command file)
> I've seen this is about using the RTSC configuration file (.cfg) but
> things are not very clear to me.
>
> Where to find documentation?
>
> Thanks,
>
> Br,
>
> Olivier
>
|
|
|
Re: Code placement using RTSC [message #511977 is a reply to message #511763] |
Wed, 03 February 2010 15:12 |
olivier Paviot Messages: 12 Registered: July 2009 |
Junior Member |
|
|
Hi Dave, all,
Thanks for the documentation you pointed me on.
The main difficulty I have right now is that I still don't have a global understanding of RTSC.
I was able to create memory area and code sections using the folllowing method (that is perhaps not the best to use but at least I'm not stop in my work any more). Any comment is welcome.
in the config.bld, I added this:
var C64PLE = xdc.useModule('ti.targets.C64P');
var Build = xdc.useModule('xdc.bld.BuildEnvironment');
/* setup new platform */
Build.platformTable['ti.platforms.generic'] =
{
clockRate: 1000,
catalogName: 'ti.catalog.c6000',
deviceName: 'TMS320CTCI6498',
customMemoryMap:
[
["L1P", {name: "L1P", base: 0x00e00000, len: 0x00008000, space: "code",access: "RWX"}],
["L1D", {name: "L1D", base: 0x00f00000, len: 0x00008000, space: "data",access: "RW"}],
["LL2", {name: "LL2", base: 0x00800000, len: 0x00080000, space: "code/data",access: "RWX"}],
["RL2", {name: "RL2", base: 0x10800000, len: 0x00080000, space: "code/data",access: "RWX"}],
["SL2", {name: "SL2", base: 0x0c000000, len: 0x00080000, space: "code/data",access: "RWX"}],
["EXT", {name: "EXT", base: 0x80000000, len: 0x00080000, space: "code/data",access: "RWX"}],
]
};
/* C64Plus compiler configuration for Little Endian Mode. */
C64PLE.rootDir = toolsBaseDir;
C64PLE.platform = 'ti.platforms.generic';
Then, in a release.cfg file, I added this:
var comLib = xdc.useModule('ti.wbi.garage_nice.multicore_tci6498.com.Sett ings');
var Program = xdc.useModule('xdc.cfg.Program');
comLib.variant = comLib.Release;
Program.sectMap["my_text"] = new prog.SectionSpec();
Program.sectMap[".text"] = new prog.SectionSpec();
Program.sectMap["shared_buffer0"] = new prog.SectionSpec();
Program.sectMap["shared_buffer1"] = new prog.SectionSpec();
Program.sectMap["my_text"].loadSegment = 'L1D';
Program.sectMap[".text"].loadSegment = 'L1D';
Program.sectMap["shared_buffer0"].loadSegment = 'SL2';
Program.sectMap["shared_buffer1"].loadSegment = 'EXT';
The last issue I have is that, for now, Pragmas are used in the source files to map objects (functions for example) on to sections.
I still have to figure out how to remove the Pragmas from the source files to have the mapping deported in a configuration file as before when this mapping was specified in my old linker command file.
Any idea how to do that with RTSC? I'm going to look around the config .bld file.
again, thanks for your answers,
Br,
Olivier
[Updated on: Wed, 03 February 2010 16:28] Report message to a moderator
|
|
| | | |
Re: Code placement using RTSC [message #512678 is a reply to message #512616] |
Fri, 05 February 2010 21:28 |
Dave Russo Messages: 172 Registered: July 2009 |
Senior Member |
|
|
This may be a bit overkill but ...
By default, linker command files are generated from a template supplied
by the platform specified during configuration. However, it is possible
to override this template with your own and, as a result, completely
control the contents of the linker command file; see
http://rtsc.eclipse.org/cdoc-tip/index.html#xdc/cfg/Program. html#link.Template
Of course, this means that you don't get the benefit of all the stuff
that is normally automatically generated for you by the platform's
linker template. But you can, with a few lines of cryptic XDCscript,
insert the platform's generated command file into your own template.
The example template that follows illustrates how to do this:
foo=bar; /* a custom linker command file line */
%%{
/* get the platform's linker command file template */
var templateName = this.platform.getLinkTemplate(this);
/* load the template */
var t = xdc.loadTemplate(templateName);
/* expand the template here (in the middle of this template) */
t.genStream($out, this, $args);
%%}
baz=42; /* another custom line */
For general information about templates see
http://rtsc.eclipse.org/docs-tip/XDCscript_-_Template-Body and
http://rtsc.eclipse.org/docs-tip/The_XDCscript_Language#Meth ods_for_generating_other_files.
On 2/5/2010 8:12 AM, olivier Paviot wrote:
> Sasha,
>
> basically, we have one function per source file generating one object
> that can be mapped to one section in the linker command file.
>
> The same name is applied to the function and the source file.
>
> Br,
>
> Olivier
|
|
|
Goto Forum:
Current Time: Sat Nov 09 01:16:59 GMT 2024
Powered by FUDForum. Page generated in 0.25860 seconds
|