Build environment for BrailleBuzz (the GNU tool-chain for STM32F103) January 29, 2015
I am documenting from memory here, I did this over a year ago and have just now gotten round to documenting it. There are a bunch of things I gloss over and one or two inaccuracies that I am miss-remembering. Nevertheless, this should give you a clue and along with the excellent documentation over at gnu.org it should get you going. Of particular use are my bash scripts, read them, understand them, and optionally use them verbatim. Also use the docs on the olmex site. I used those development boards to bootstrap this project they are excellent! I don’t know if it’s the “right” way but what I did was to create a usr directory off my home directory. While I have root on my box, and everything else around here, my goal was to avoid using it so that I could simply zip it up and hand it off to another developer; which is what I have recently done.
tallen@timmy:~/usr$ ls -l
total 32
drwxrwxr-x 5 tallen tallen 4096 Jan 24 2014 arm-none-eabi
drwxrwxr-x 2 tallen tallen 4096 Mar 24 2014 bin
drwxrwxr-x 12 tallen tallen 4096 Feb 26 2014 build
drwxrwxr-x 3 tallen tallen 4096 Mar 17 2014 include
drwxrwxr-x 3 tallen tallen 4096 Mar 24 2014 lib
drwxrwxr-x 3 tallen tallen 4096 Jan 24 2014 libexec
drwxrwxr-x 9 tallen tallen 4096 Feb 12 2014 share
drwxrwxr-x 11 tallen tallen 4096 Mar 24 2014 src
Under src one puts the source for the various tools, e.g. binutils, gcc, gdb, openocd, speex, and gmp, mpc, mpfr; the latter three are prerequisites for gcc.
tallen@timmy:~/usr/src$ ls -l
total 138384
drwxrwxr-x 17 tallen tallen 4096 Jan 24 2014 binutils-2.24
-rw-rw-r-- 1 tallen tallen 22716802 Dec 2 2013 binutils-2.24.tar.bz2
drwxr-xr-x 33 tallen tallen 4096 Oct 16 2013 gcc-4.8.2
-rw-rw-r-- 1 tallen tallen 85999682 Oct 16 2013 gcc-4.8.2.tar.bz2
drwxrwxr-x 15 tallen tallen 4096 Feb 11 2014 gdb-7.7
-rw-rw-r-- 1 tallen tallen 24846320 Feb 5 2014 gdb-7.7.tar.bz2
drwxr-xr-x 15 tallen tallen 4096 Sep 30 2013 gmp-5.1.3
-rw-rw-r-- 1 tallen tallen 1818812 Sep 30 2013 gmp-5.1.3.tar.xz
drwxr-xr-x 6 tallen tallen 4096 Jan 15 2014 mpc-1.0.2
-rw-rw-r-- 1 tallen tallen 633173 Jan 15 2014 mpc-1.0.2.tar.gz
drwxr-xr-x 9 tallen tallen 4096 Mar 13 2013 mpfr-3.1.2
-rw-rw-r-- 1 tallen tallen 1074388 Mar 13 2013 mpfr-3.1.2.tar.xz
drwxrwxr-x 9 tallen tallen 4096 Mar 24 2014 newlib
drwxr-xr-x 8 tallen tallen 4096 May 5 2013 openocd-0.7.0
-rw------- 1 tallen tallen 3493924 Feb 10 2014 openocd-0.7.0.tar.bz2
drwxrwxr-x 9 tallen tallen 4096 Apr 7 2014 speex-1.2rc1
-rw-rw-r-- 1 tallen tallen 1061882 Jul 23 2008 speex-1.2rc1.tar.gz
Next one creates a build directory under usr. Under build one creates directories for each of the utilities enumerated below. I also played some games with soft links to facilitate version upgrades later:
tallen@timmy:~/usr/build$ ls -l
total 168
lrwxrwxrwx 1 tallen tallen 14 Jan 24 2014 binutils -> binutils-2.24/
drwxrwxr-x 11 tallen tallen 4096 Feb 18 2014 binutils-2.24
lrwxrwxrwx 1 tallen tallen 11 Jan 24 2014 gcc_1 -> gcc-4.8.2_1
lrwxrwxrwx 1 tallen tallen 11 Jan 24 2014 gcc_2 -> gcc-4.8.2_2
drwxrwxr-x 14 tallen tallen 4096 Feb 18 2014 gcc-4.8.2_1
drwxrwxr-x 12 tallen tallen 4096 Mar 24 2014 gcc-4.8.2_2
-rw-rw-r-- 1 tallen tallen 129742 Feb 10 2014 gcc_arm-eabi_build.pdf
lrwxrwxrwx 1 tallen tallen 7 Feb 11 2014 gdb -> gdb-7.7
drwxrwxr-x 11 tallen tallen 4096 Feb 11 2014 gdb-7.7
lrwxrwxrwx 1 tallen tallen 10 Jan 24 2014 gmp -> gmp-5.1.3/
drwxrwxr-x 15 tallen tallen 4096 May 29 14:20 gmp-5.1.3
lrwxrwxrwx 1 tallen tallen 10 Jan 24 2014 mpc -> mpc-1.0.2/
drwxrwxr-x 5 tallen tallen 4096 Apr 7 2014 mpc-1.0.2
lrwxrwxrwx 1 tallen tallen 10 Jan 24 2014 mpfr -> mpfr-3.1.2
drwxrwxr-x 6 tallen tallen 4096 Mar 17 2014 mpfr-3.1.2
drwxrwxr-x 4 tallen tallen 4096 Apr 7 2014 newlib
lrwxrwxrwx 1 tallen tallen 14 Feb 10 2014 openocd -> openocd-0.7.0/
drwxrwxr-x 5 tallen tallen 4096 Feb 11 2014 openocd-0.7.0
lrwxrwxrwx 1 tallen tallen 12 Feb 26 2014 speex -> speex-1.2rc1
drwxrwxr-x 9 tallen tallen 4096 Apr 9 2014 speex-1.2rc1