Here's my first attempt at a Getting Started guide for folk who don't want to go the whole hog and build their own compiler binaries but want to use and develop RTEMS for the ColdFire. Linux users might find this useful but should follow the RTEMS getting started docs to find out how to build the toolset.
This section describes the process of installing the version Beta20.1 VERSION of the Cygwin32 environment. It assumes that this toolset is installed in c:\coldfire.
mount -b c:\\coldfire /
mv sh.exe old_sh.exe
cp bash.exe sh.exe
cp /cygnus/cygnus-b20/H-i586-cygwin32/bin/sh.exe /bin
cp /cygnus/cygnus-b20/H-i586-cygwin32/bin/bash.exe /bin
SET CYGWIN=binmodeThis makes Cygwin pipes 8 bit clean and sets your unix home directory(~) to /home which is necessary for some programs
RTEMS requires a specially configured compiler. To unpack this run:
You will need to add
tar -xvf //c/download/files/gcc-m68k-rtems-win32-R2.tar.bz2 --use-compress-program=bzip2
c:\coldfire\gcc-m68k\bin to the
PATH statement in
c:\coldfire\cygnus\cygwin-b20\cygwin.bat. Note you can safely install a copy of this compiler over
the top of an existing m68k-coff compiler as the new compiler is m68k-rtems-*.
Copy the updated
/cygnus/cygnus-b20/H-i586-cygwin32/bin/. You must do this otherwise the compiler will fail to run.
Restart the Cygwin shell and run
m68k-rtems-gcc -v to check the compiler is working. The compiler will
print its version information something like:
bash-2.02$ m68k-rtems-gcc -v
Reading specs from \gcc-m68k\lib\gcc-lib\m68k-rtems\egcs-2.91.60\specs
gcc driver version egcs-2.91.60 19981201 (egcs-1.1.1 release) executing gcc vers
Go to the source directory
tar -xzvf //c/download/files/rtems-4_0_0.tar.gz
tar -xzvf //c/download/files/rtems-coldfire-bsp-981120.tar.gz
/source/rtems-4.0.0/configure --target=m68k-rtems --disable-posix --disable-tests
This configures RTEMS to not have support for the POSIX thread API and not to build all the tests and only enable the sbc5206 BSP. These options are enabled by default but take a long time to build. You can use the SBC5307 BSP by using --enable-rtemsbsp=sbc5307. RTEMS will be installed to the c:\coldfire\gcc-m68k\rtems directory change the --prefix value to point elsewhere if you want.
It should then go ahead and build the whole of RTEMS and copy the sample EXEs to the /tftpboot directory. You can then point your TFTP server at c:\coldfire\tftpboot and try running something ;)
OK. You've built RTEMS and got the examples running and now you want to use
it for a REAL application. To do this you must first install it by running
Unpack the simple C applicaton from the RTEMS web site into a suitable directory(anywhere you like). To get it to build you must tell the application's makefile where to pick up the RTEMS configuration and library. Type the following:
Then run "make" to build the sample app and it will copy the EXE to the
/tftpboot directory. If you find the
/tftpboot procedure annoying then edit
rtems-4.0.0/make/custom/sbc5206.cfg config file and change the lines in
the make-exe rule. This file also contains other useful configuration
parameters for the Board Support Package, gcc options, etc.
This procedure also works for the netdemos package that comes with RTEMS which(when I finish the rewrite of the NE2000 driver) will allow you to play with TCP/IP benchmarks and other network demos applications.
Drop me a line if you have any questions or there are problems with this guide.