Bringing a linkcmds script into play
ralf_corsepius at rtems.org
Wed Jul 21 23:35:34 UTC 2004
On Thu, 2004-07-22 at 00:45, Martin R. Calsyn wrote:
> Apologies in advance if this is a fairly rudimentary question...
> I have gotten the most recent snapshot downloaded and built under
> cygwin with the binary tool chain (yes, path of least resistance) and
> have verified that the hello.exe and related sample and test code runs
> on my target board, a Mini Robo-Minds m68k (68332) board.
> The MRM has flash memory that one can load programs into by specifying
> a different start address. The RTEMS snapshot provides a linkcmds_ROM
> and an MRM_IN_ROM flag in make/custom/mrm332.cfg, but I haven't been
> able to figure out how to bring these into play.
> If, for instance, I would like hello.exe to be compiled for ROM, where
> do I insert the MRM_IN_ROM=yes flag?
Do you mean to add a define to CPPFLAGS?
There exist several ways to do so, e.g.
* pass it to the configure script on the command line:
<rtems>/configure --target=... --enable-rtems-bsp=mrm332 \
CFLAGS_FOR_TARGET="-DMRM_IN_ROM <more cflags>"
* implement the corresponding autoconf magic into the BSP's configure
* implement another BSP.
Or do you mean to use the alternative make-exe defines from mrm332.cfg?
Simpy pass it to make:
make MRM_IN_ROM=yes all
> I also find no references to mrm332.cfg in any files, so I'm not even
> sure it is consulted during builds of the sample code.
There are two places where *.cfgs are used:
1. c/src and below (cf. c/src/configure.ac, c/src/Makefile.am and
In short: c/src/configure invokes bsp.mak, extracts a set of
make-variables from $(RTEMS_BSP).cfg and propagates the extracted value
to the Makefiles below c/src.
The MRM_IN_ROM stuff in mrm332.cfg is *not* amongst the variables being
extracted there, so it is not available below c/src
2. Makefiles below c/src/tests (rtems-4.6.x) rsp. testsuites
(rtems-cvs/rtems-4.7) include $(RTEMS_BSP).cfg directly. i.e.
MRM_IN_ROM etc. is available there.
More information about the users