Installation

***************************************

Porting de GCC a PIC16F

Pedro José Ramírez Gutiérrez
David Santo Orcero
www.pjmicrocontroladore.es
Bajo licencia GPL

***************************************

–> Notice d'installation en français après la version espagnole

–>English instruction above.


* Instalación básica *

Necesitas tener GPutils instalado en tu sistema. Si la ruta de los binarios
de GPutils es diferente a /usr/local/bin/ debe cambiar las macros DEFAULT_ASSEMBLER
y DEFAULT_LINKER de gcc-4.0.2/gcc/config/pic/pic.h.

Consigue las fuentes de GCC 4.0.2 y el porting (patch) para PIC, untar, configura y compila.
tar xvf gcc-4.0.2.tar.bz2
bunzip2 picgcc-1.1.2_para_GCC_4.0.2.patch.bz2
Comprobar el patch sin aplicarlo :
patch -p0 –dry-run -i picgcc-1.1.2_para_GCC_4.0.2.patch
Aplica el patch :
patch -p0 -i picgcc-1.1.2_para_GCC_4.0.2.patch
mkdir obj-pic
cd obj-pic
../gcc-4.0.2/configure -target=pic -enable-languages=c
make

Puedes instalar el port o usarlo desde gcc-4.0.2/gcc.
Para instalarlo en el directorio por defecto haz:

make install.

Para usar la ultima version del port consija las fuentes con
svn checkout https://forja.rediris.es/svn/cls-pic-16f877

Más información en www.pjmicrocontroladores.es



* Notice d'installation *

GPutils doit être installé sur ton système. Si le chemin des binaires
de GPutils est différent de /usr/local/bin/ il faudra changer les macros DEFAULT_ASSEMBLER
et DEFAULT_LINKER de gcc-4.0.2/gcc/config/pic/pic.h.
Pour savoir : whereis gplink

Télécharge les sources de GCC 4.0.2 : ftp://ftp.irisa.fr/pub/mirrors/gcc.gnu.org/gcc/releases/gcc-4.0.2/gcc-4.0.2.tar.bz2
et le portage (patch) pour PIC : http://forja.rediris.es/frs/download.php/771/picgcc-1.1.2_para_GCC_4.0.2.patch.bz2
décompresse, applique le patch et compile.

Décompresse les sources de GCC 4.0.2 :
tar xvf gcc-4.0.2.tar.bz2
Décompresse le patch pour PIC :
bunzip2 picgcc-1.1.2_para_GCC_4.0.2.patch.bz2
Vérifie le patch sans l'appliquer :
patch -p0 –dry-run -i picgcc-1.1.2_para_GCC_4.0.2.patch
Applique le patch :
patch -p0 -i picgcc-1.1.2_para_GCC_4.0.2.patch
C'est maintenant qu'il faut modifier gcc-4.0.2/gcc/config/pic/pic.h si nécessaire
Crée un répertoire pour la compilation :
mkdir obj-pic
Place-toi dans le répertoire :
cd obj-pic
Lance la configuration pour préparer la compilation :
../gcc-4.0.2/configure -target=pic -enable-languages=c
Compile :
make

Tu peux installer le portage pour PIC ou l'utiliser depuis gcc-4.0.2/gcc.
Pour l'installer dans le répertoire par défaut (/usr/local/) fais :

make install

Pour utiliser la dernière version du portage obtiens les sources avec
svn checkout https://forja.rediris.es/svn/cls-pic-16f877

Plus d'informations sur www.pjmicrocontroladores.es en espagnole évidemment !



* Basic instalation *

You have need GPutils installed in yours system. If your path of binary's
GPutils is different at /usr/bin/ you must change the macros DEFAULT_ASSEMBLER
and DEFAULT_LINKER in gcc-4.0.2/gcc/config/pic/pic.h.

Get source of GCC 4.0.2, and porting to pic, untar, configure and make.

tar xvf gcc-4.0.2.tar.bz2
bunzip2 picgcc-1.1.2_para_GCC_4.0.2.patch.bz2
patch -p0 –dry-run -i picgcc-1.1.2_para_GCC_4.0.2.patch
patch -p0 -i picgcc-1.1.2_para_GCC_4.0.2.patch
mkdir obj-pic
cd obj-pic
../gcc-4.0.2/configure -target=pic -enable-languages=c
make

You can install the port or used it from gcc-4.0.2/gcc.
For install in default directoy do

make install.

For used the last version of port catch the source with:
svn checkout https://forja.rediris.es/svn/cls-pic-16f877

More information (sorry in spanish) in www.pjmicrocontroladores.es