How to specify which of multiple linkcmds?

Markku Puro markku.puro at kopteri.net
Thu Dec 2 21:48:58 UTC 2004


----- Original Message ----- 
From: "Peter Dufault" <dufault at hda.com>
To: <rtems-users at rtems.com>
Sent: Wednesday, December 01, 2004 8:51 PM
Subject: How to specify which of multiple linkcmds?


> I want multiple linkcmds for "phtyec565", one for flash and one for RAM 
> for development.
> 
> I think I see what to do based on gensh2:
> 
> 1. Create the startup/linkcmds.ram file with the layout I want;
> 2. Add to Makefile.am, as done in gensh2;
> 3. Reconfigure, rebuild, reinstall;
> 
> But now for my stupid question - How do I specify which linkcmds to use 
> at link time?
> I checked the "BSP and Device Driver Development Guide" and checked the 
> mailing list but didn't find it.
> 

I suppose that You can specify it in bsp_specs file
(if linkcmds.ram used with make VARIANT=DEBUG and linkcmds otherwise)
I also have to crate start_ram.S to use with linkcmds.ram
Here is what I have done:
--8<----------
*lib:
%{!qrtems: %(old_lib)} %{qrtems: --start-group \
%{!qrtems_debug: -lrtemsbsp -lrtemscpu} %{qrtems_debug: -lrtemsbsp_g -lrtemscpu_g} \
-lc -lgcc --end-group \
%{!qnolinkcmds: %{!qrtems_debug: -T linkcmds%s} %{qrtems_debug: -T linkcmds.ram%s}}}

*startfile:
%{!qrtems: %(old_startfile)} %{qrtems: \
%{!qrtems_debug: start.o%s} %{qrtems_debug: start_ram_g.o%s} crti.o%s crtbegin.o%s}

--8<----------
See also:
http://www.rtems.com/rtems/maillistArchives/rtems-users/2001/march/msg00151.html

Hope that helps.

  -Mp




More information about the users mailing list