Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
howtos:pic32mx_ubuntu [2025/02/24 17:42]
admin [Stage 2 - deploy newlib]
howtos:pic32mx_ubuntu [2025/02/24 18:31] (current)
admin
Line 71: Line 71:
 $ sudo make install $ sudo make install
 </​code>​ </​code>​
-===== binutils 2.22 ===== +===== copy Microchip libraries ​=====
-  * prepare working area+
 <​code>​ <​code>​
-mkdir ~/​projects/​gcc-mips/​ +mkdir /​opt/​mipsel-10.3.0/lib/microchip
-$ cd ~/​projects/​gcc-mips/​ +# cp libc_s_n.a libdsp.a libgcc_s_n./​opt/​mipsel-10.3.0/lib/microchip/
-$ mkdir build-binutils-el +
-</​code>​ +
-  * download and unpack +
-<​code>​ +
-$ wget http://​ftp.gnu.org/​gnu/​binutils/​binutils-2.22.tar.gz -O /​tmp/​binutils-2.22.tar.gz +
-$ tar xvpf /​tmp/​binutils-2.22.tar.gz +
-</​code>​ +
-  * build and install (all tools will be installed into /opt/mipsel/ directory) +
-<​code>​ +
-$ cd build-binutils-el +
-../​binutils-2.22/​configure --target=mipsel --prefix=/​opt/​mipsel +
-$ make +
-$ sudo make install +
-</​code>​ +
-===== gcc 4.5.2 with newlib 1.20.0 ===== +
-  * prepare working area +
-<​code>​ +
-$ cd ~/projects/gcc-mips+
-$ mkdir build-gcc-el +
-$ mkdir build-newlib-el +
-</​code>​ +
-  * download and unpack +
-<​code>​ +
-$ wget http://ftp.gnu.org/​gnu/​gcc/​gcc-4.5.2/​gcc-4.5.2.tar.gz -O /​tmp/​gcc-4.5.2.tar.gz +
-$ tar xvpf /​tmp/​gcc-4.5.2.tar.gz +
-$ wget ftp://​sources.redhat.com/​pub/​newlib/​newlib-1.20.0.tar.gz -O /​tmp/​newlib-1.20.0.tar.gz +
-$ tar xvpf /​tmp/​newlib-1.20.0.tar.gz +
-</​code>​ +
-  * build and install (tools will be installed into /opt/mipsel/ directory). Building gcc with newlib is done in three steps. +
-===== Stage 1 build bootstrap gcc ===== +
-<​code>​ +
-$ cd build-gcc-el +
-../gcc-4.5.2/​configure --target=mipsel --prefix=/​opt/​mipsel --with-gmp-include=/​usr/​include/​gmp --with-mpfr-include=/​usr/​include/​mpfr --without-headers --with-gnu-as --with-gnu-ld --with-newlib --enable-languages=c --with-local-prefix=/​opt/​mipsel --with-native-system-header-dir=/​opt/​mipsel/​include/​ --disable-nls --disable-shared ​ --enable-multilib --disable-decimal-float -disable-threads --disable-libmudflap --disable-libssp --disable-libgomp --disable-libquadmath +
-$ make +
-$ sudo make install +
-</​code>​ +
-  * **--enable-multilib** - builds several variants of libraries (big-endian,​ little-endian hard-float and soft-float). Default is little-endian hard-float. +
-<​code>​ +
-$ /​opt/​mipsel/​bin/​mipsel-gcc -print-multi-lib +
-.; +
-soft-float;​@msoft-float +
-eb;@EB +
-soft-float/eb;​@msoft-float@EB +
-+
-</code> +
-===== Stage 2 - deploy newlib ===== +
-  * build and install +
-<​code>​ +
-$ cd ~/​projects/​gcc-mips/​build-newlib-el +
-$ ../​newlib-1.20.0/​configure --target=mipsel --prefix=/​opt/​mipsel +
-$ make +
-$ sudo make install +
-</​code>​ +
-===== Stage 3 - deploy gcc with newlib suport ===== +
-<​code>​ +
-$ cd ~/​projects/​gcc-mips/​build-gcc-el +
-$ ../​gcc-4.5.2/​configure --target=mipsel --prefix=/​opt/​mipsel --with-gmp-include=/​usr/​include/​gmp --with-mpfr-include=/​usr/​include/​mpfr --with-gnu-as --with-gnu-ld --with-newlib --enable-languages=c --with-local-prefix=/​opt/​mipsel --with-native-system-header-dir=/​opt/​mipsel/​include --disable-nls --disable-shared ​ --enable-multilib --disable-decimal-float -disable-threads --disable-libmudflap --disable-libssp --disable-libgomp --disable-libquadmath +
-$ make +
-$ sudo make install+
 </​code>​ </​code>​
 +
howtos/pic32mx_ubuntu.1740415340.txt.gz · Last modified: 2025/02/24 17:42 by admin
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0