getting started with CEXP on coldfire?
Till Straumann
strauman at slac.stanford.edu
Thu Oct 25 00:03:09 UTC 2007
Alan Cudmore wrote:
> I would like to use CEXP on a coldfire BSP ( RTEMS 4.7, mcf5235 ).
>
> What is the best way to get started?
>
> I have built the cexp-1.5 package with the m68k-rtems4.7 tools and I
> "almost" had a sample program linking with a cexp call. After
> figuring out all of the libraries to link in, it still had undefined
> references to cexpWriteLock, cexpWriteUnlock etc.. These symbols were
> macros in a header file, but they were not in my libcexp.a file.
>
Yeah - I discovered that problem recently. There is a
'configure' test [which I have since eliminated] which assumes
that you're configuring for '<cpu>-rtems' and which brakes
if your 'host' system is called 'm68k-rtems4.7' (rather than m68k-rtems).
> I also looked at the GeSys 2.1 beta package. That seems like the best
> place to start. Has anyone built GeSys and CEXP for a coldfire target?
>
Yes. I have - but for the uC5282 BSP not mcf5235 so you might
have to tweak the GeSys Makefile (I just added 'mcf5235' in the
places where I think it makes sense).
In particular, if this BSP has a way to retrieve IP setup information
from NVRAM or flash then you'd want to define the BSP_NETWORK_SETUP
macro -- otherwise GeSys falls back on BOOTP.
I created an up-to-date snapshot (downloadable here: but it won't be
posted there forever :-) here:
http://www.slac.stanford.edu/~strauman/gesys-snap-20071024.tgz
The snapshot contains
rtemsNfs-1.5
cexp snapshot
gesys snapshot
and it seems to build all-right for the mcf5235 BSP:
edit 'defs.local' to point RTEMS_SITE_INSTALLDIR to
where you want NFS/GESYS installed. If you leave
this undefined then they will go to the standard BSP installation dir.
build+install CEXP; set <your prefix> to the same directory
you chose for RTEMS_SITE_INSTALLDIR. If you want things to
go to the standard RTEMS installdir then you'd have to provide
more configuration options (these go into the value of TGT_CONFIG_OPTS)
- in particular you want --includedir=<prefix>/lib/include
cd cexp;
make TGT_CONFIG_OPTS='--prefix=<your prefix> CFLAGS=-m528x' cross-m68k-rtems
make install-m68k-rtems
setenv RTEMS_MAKEFILE_PATH <your BSP's makefile path>
build and install NFS
cd ../rtemsNfs-1.5;
make
make install
build and install GESYS
cd ../gesys-20071024;
make
make install
NOTE: I did have to tweak the rtems-4.7.1 linkcmds for mcf5235 to fix
a linkage error when linking gesys (see diff below); the issue has
since been fixed in rtems IIRC.
Please let me know of any critical changes you have to make
so that I can merge them.
BTW: I left the binaries in the snapshot so you could try to load
+ run 'inst/rtems.exe'
HTH
-- Till
*** linkcmds.orig 2007-10-24 16:56:24.000000000 -0700
--- linkcmds 2007-10-24 16:55:59.000000000 -0700
***************
*** 146,152 ****
.data : {
PROVIDE( _data_dest_start = . );
PROVIDE( _copy_start = .);
! *(.data)
*(.gnu.linkonce.d*)
*(.gcc_except_table)
*(.jcr)
--- 146,152 ----
.data : {
PROVIDE( _data_dest_start = . );
PROVIDE( _copy_start = .);
! *(.data*)
*(.gnu.linkonce.d*)
*(.gcc_except_table)
*(.jcr)
>
> Thanks,
> Alan Cudmore
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users
>
More information about the users
mailing list