|
|
| Re: Memory fill using configuration file [message #3215 is a reply to message #3109] |
Wed, 13 May 2009 13:27  |
dave russo Messages: 169 Registered: July 2009 |
Senior Member |
|
|
Martin Ambrose wrote:
> Hello.
>
> I have a separate linker command file with this directive:
>
> .data:DSPLINK_shmBaseAddress: fill=0xC3F05000 {} > SDRAM
>
> Ideally I could subsume this into my .cfg file but I don't know if this
> is possible. Last I checked (Oct 2008) it wasn't possible but on the
> list of future features.
>
The TI linker will accept multiple linker command files in the command
line. You can add your custom linker command file via lopts attribute
if you are using xdc to build or via the CCS4 linker options.
rm -f package/cfg/Hello.x64P.map
lnk6x -w -q -u _c_int00 foo.cmd -q -o Hello.x64P \
package/cfg/Hello_x64P.o64P package/cfg/Hello_x64P.xdl -c \
-m package/cfg//Hello.x64P.map \
-l rts64plus.lib
$cat foo.cmd
foo=3;
$grep foo package/cfg//Hello.x64P.map
00000003 foo
00000003 foo
If you need to modify the generated linker command file, the best way is
to simply supply a different template for its generation. This can also
be done relatively easily. See the linkTemplate attribute of
Executables:
http://rtsc.eclipse.org/cdoc-tip/index.html#xdc/bld/Executab le.html#.Attrs
Note there is also an --linkTemplate command option for configuro that
does the same thing.
You can copy the existing template from the ti.targets package
(linkcmd.xdt) and make the necessary changes.
> Intuitively this might be done via Program.sectMap but "fill" isn't an
> option per:
> http://rtsc.eclipse.org/cdoc-tip/xdc/cfg/Program.html
>
This would be a good addition to Program.SectionSpec. It's quite useful
for initializing stacks as well.
> Regards,
> Martin
>
|
|
|
Powered by
FUDForum. Page generated in 0.01509 seconds