===== Installation de PICGCC ===== ~~LINEBREAK~~ [[pic:picgcc |Retour à picgcc]] %%******************************%% %%** %%**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/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 Ficheros bash en http://per.launay.free.fr/picgcc/fuente_pic_gcc/ Un fichero de ayuda http://per.launay.free.fr/picgcc/fuente_pic_gcc/leeme-lisezmoi 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érente de /usr/bin/ il faut changer les macros DEFAULT_ASSEMBLER et DEFAULT_LINKER de gcc-4.0.2/gcc/config/pic/pic.h. Pour savoir : whereis gplink Téléchargez 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écompressez, appliquez le patch et compilez. Décompressez les sources de GCC 4.0.2 : tar xvf gcc-4.0.2.tar.bz2 Décompressez le patch pour PIC : bunzip2 picgcc-1.1.2_para_GCC_4.0.2.patch.bz2 Vérifiez le patch sans l'appliquer : patch -p0 --dry-run -i picgcc-1.1.2_para_GCC_4.0.2.patch Appliquez 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éez un répertoire pour la compilation : mkdir obj-pic Placez-vous dans le répertoire : cd obj-pic Lancez la configuration pour préparer la compilation : ../gcc-4.0.2/configure -target=pic -enable-languages=c Compilez : make Vous pouvez 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/) faîtes : make install Pour utiliser la dernière version du portage obtenez les sources avec svn checkout https://forja.rediris.es/svn/cls-pic-16f877 **Installation avec svn** #!/bin/bash tar xf gcc-4.0.2.tar.bz2 if [ -d cls-pic-16f877 ] then svn update cls-pic-16f877/ else svn checkout https://forja.rediris.es/svn/cls-pic-16f877 fi cp -r cls-pic-16f877/trunk/* gcc-4.0.2 vous trouverez ce [[http://per.launay.free.fr/picgcc/fuente_pic_gcc/instalacion_svn.sh |fichier ici]] reprendre la documentation ci-dessus à "Créez un répertoire pour la compilation : mkdir obj-pic" jusqu'à make install Des fichiers bash dans http://per.launay.free.fr/picgcc/fuente_pic_gcc/ un fichier d'aide http://per.launay.free.fr/picgcc/fuente_pic_gcc/leeme-lisezmoi Plus d'informations sur www.pjmicrocontroladores.es en espagnol évidemment ! Besoin d'aide, contacte le GUL le plus proche, sinon mon contact se déduit facilement de l'adresse web. --------------------------------------------------------------------------- ===== 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