README.toolchain 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. Building our toolchain is easy:
  2. We use a GNU toolchain and require patches against binutils, gcc and gdb
  3. for our processor architecture. We currently investigate forward porting
  4. of these patches to more current versions.
  5. Note: 1) the root makefile handles all of this
  6. 2) GCC does not work correctly on 64 bit platform
  7. It appears that it generates 64 bit values, but the C33 is onl 32 bit
  8. so the result cannot work, it normally fails in the assemble stage
  9. I thing that the host bits/word and target bits/word are mixed somewhere
  10. (Presently just use 32 bit Linux in VM, chroot or schroot)
  11. Bintuils:
  12. (It is assumed that $PWD/README is this file)
  13. - Grab binutils 2.10.1 from ftp://ftp.gnu.org/gnu/binutils/binutils-2.10.1.tar.gz
  14. - tar -xvzf binutils-2.10.1.tar.gz
  15. - cd binutils-2.10.1
  16. - cat ../patches/0001-binutils-EPSON-changes-to-binutils.patch | patch -p1
  17. - cat ../patches/0002-binutils-EPSON-make-it-compile-hack-for-recent-gcc.patch | patch -p1
  18. - mkdir build
  19. - cd build
  20. - CPPFLAGS="-D_FORTIFY_SOURCE=0" ../configure --prefix $PWD/../../install --target=c33-epson-elf (tab complete the path)
  21. - make
  22. - make install
  23. GCC:
  24. (It is assumed that $PWD/README is this file)
  25. - export PATH=$PWD/install/bin:$PATH
  26. - Grab gcc 3.3.2 from ftp://ftp.gnu.org/gnu/gcc/gcc-3.3.2.tar.gz
  27. - tar -xvzf gcc-3.3.2.tar.gz
  28. - cd gcc-3.3.2
  29. - cat ../patches/0001-gcc-EPSON-modified-sources.patch | patch -p1
  30. - cat ../patches/0002-gcc-Force-that-the-assembly-of-libgcc-complies-wit.patch | patch -p1
  31. - cat ../patches/0003-gcc-Use-the-C-implementations-for-division-and-mod.patch | patch -p1
  32. - mkdir build
  33. - cd build
  34. - CPPFLAGS="-D_FORTIFY_SOURCE=0" ../configure --prefix $PWD/../../install --target=c33-epson-elf --enable-languages=c (tab complete the path)
  35. - make
  36. - make install
  37. Gdb:
  38. - TO BE DONE