Hardware manual

32
5.2. Preparation of the programming environment.
In this subsection I'll shortly present how to prepare programming environment for PXMC under
Linux operating system. Firstly, we need to download three packages:
binutils-2.16
gcc-3.4.3
newlib-1.14.0
       license and can be free used even for commercial
purposes. The question which can arise at this moment is, why above packages are so old? For
example current (31.03.07) stable version of gcc is 4.1.2. The answer is very easy. It is possible to
compile all these packages without any problems. Personally I tried to do it also with binutils-
2.17, gcc-4.0.3 and/or gcc-4.1.1. Unfortunately I (and not only I) got errors, which concerned
capability. Namely the support for h8300-coff was removed in newer versions of GNU tool
chain. It is worth to note that h8300-elf is still supported and with small modification of below
steps it should be possible to create it.
When we already have all three above mentioned packages, we need to compile them. The
procedure in most steps is standard one. It means we use ./configure, make and make install.
Only one essential thing is that we need to set up proper switches when we call ./configure.
Because of that the right command ./configure for binutils looks like:
./configure --with-gnu-ld --target=h8300-coff\
--enable-shared
--enable-commonbfdlib \
--with-mmap \
--enable-64-bit-bfd
To proper configure gcc, first we need to unpack gcc and newlib, and after that we need to
create symbolic link from gcc to newlib:
ln -s newlib-1.14.0/newlib gcc-3.4.3/newlib
Then we write:
./configure --target=h8300-coff --with-gnu-ld \
--with-gnu-as \
--without-nls --with-newlib \
--enable-languages=c,c++ \
--enable-target-optspace \
--enable-version-specific-runtime-libs