SOP 002-Environnement informatique » Historique » Version 13
  Patrice Nadeau, 2015-09-20 10:58 
  
| 1 | 1 | Patrice Nadeau | h1. SOP 002-Environnement informatique  | 
|---|---|---|---|
| 2 | |||
| 3 | Ce SOP explique comment configurer un poste pour  | 
||
| 4 | * la programmation (C)  | 
||
| 5 | 3 | Patrice Nadeau | * le désign de circuits électroniques  | 
| 6 | 1 | Patrice Nadeau | > Pour l’instant, seulement un environnement GNU\Linux (openSUSE) est documenté.  | 
| 7 | > Certaines sections peuvent avoir de la documentation pour Windows.  | 
||
| 8 | |||
| 9 | {{lastupdated_at}} {{lastupdated_by}} | 
||
| 10 | |||
| 11 | ---  | 
||
| 12 | |||
| 13 | {{toc}} | 
||
| 14 | |||
| 15 | h2. Matériel  | 
||
| 16 | |||
| 17 | h3. Ordinateur  | 
||
| 18 | |||
| 19 | * Processeur  | 
||
| 20 | ** Intel Atom et plus  | 
||
| 21 | * Mémoire  | 
||
| 22 | ** 2 Mo  | 
||
| 23 | * Disque  | 
||
| 24 | * Port série ou convertisseur USB/série (communication série et programmeur AVR)  | 
||
| 25 | * Port USB 2.0 ou plus (sonde Logic et programmeur AVR)  | 
||
| 26 | |||
| 27 | |||
| 28 | h3. Écran  | 
||
| 29 | |||
| 30 | * Résolution minimal de 1690x900 (VIM 2 x 80 colonnes + taglist)  | 
||
| 31 | ** 1 minimum, 2 fortement recommandés  | 
||
| 32 | |||
| 33 | h3. Programmeur  | 
||
| 34 | |||
| 35 | Pour le transfert des programmes vers les uC AVR.  | 
||
| 36 | |||
| 37 | Les programmeur suivants ont été testés :  | 
||
| 38 | * Atmel STK500  | 
||
| 39 | * Atmel STK600  | 
||
| 40 | * Atmel Dragon  | 
||
| 41 | ** Ne seras plus supporté  | 
||
| 42 | * Atmel AVRISP mkII  | 
||
| 43 | |||
| 44 | h2. Logiciels  | 
||
| 45 | |||
| 46 | h3. Système d'exploitation  | 
||
| 47 | |||
| 48 | Dernière version _openSUSE_ avec interface graphique (_Xfce_ suggéré)  | 
||
| 49 | |||
| 50 | h3. Navigateur Web  | 
||
| 51 | |||
| 52 | Pour l’accès à Redmine  | 
||
| 53 | |||
| 54 | h4. Firefox  | 
||
| 55 | |||
| 56 | Dictionnaire français  | 
||
| 57 | |||
| 58 | h3. Suite bureautique  | 
||
| 59 | |||
| 60 | LibreOffice  | 
||
| 61 | |||
| 62 | h3. Autres  | 
||
| 63 | |||
| 64 | Document viewer (Evince)  | 
||
| 65 | |||
| 66 | h3. Éditeur  | 
||
| 67 | |||
| 68 | L’éditeur "VIM":http://www.vim.org est utilisé.  | 
||
| 69 | Plusieurs compléments sont installés et une personnalisation est appliquée.  | 
||
| 70 | |||
| 71 | <pre><code class="bash">  | 
||
| 72 | zypper install gvim vim-data vim-plugin-a  | 
||
| 73 | </code></pre>  | 
||
| 74 | |||
| 75 | Plugin de http://www.vim.org/  | 
||
| 76 | * puppet_syntax  | 
||
| 77 | * taglist  | 
||
| 78 | * NERDTree  | 
||
| 79 | |||
| 80 | Ctags  | 
||
| 81 | <pre><code class="bash">  | 
||
| 82 | zypper install ctags  | 
||
| 83 | </code></pre>  | 
||
| 84 | |||
| 85 | h4. Personnalisation  | 
||
| 86 | |||
| 87 | Copier les gabarits  | 
||
| 88 | > TODO : gabarits Vim  | 
||
| 89 | |||
| 90 | <pre><code class="bash">  | 
||
| 91 | mkdir ~/Documents/projects  | 
||
| 92 | ...  | 
||
| 93 | </code></pre>  | 
||
| 94 | |||
| 95 | Créer des liens symboliques pour :  | 
||
| 96 | <pre><code class="bash">  | 
||
| 97 | ln -s ~/Documents/projects/vim/vimrc ~/.vimrc  | 
||
| 98 | ln -s~/Documents/projects/vim/vim ~/.vim  | 
||
| 99 | ln -s~/Documents/projects/vim/ctags ~/.ctags  | 
||
| 100 | </code></pre>  | 
||
| 101 | |||
| 102 | Créer un raccourci pour l’application  | 
||
| 103 | <pre><code class="bash">  | 
||
| 104 | gvim –cmd:cd /home/repertoire_projets  | 
||
| 105 | </code></pre>  | 
||
| 106 | |||
| 107 | h3. Unison  | 
||
| 108 | |||
| 109 | Synchronisation de données  | 
||
| 110 | <pre><code class="bash">  | 
||
| 111 | zypper install unison  | 
||
| 112 | </code></pre>  | 
||
| 113 | |||
| 114 | h3. Minicom  | 
||
| 115 | |||
| 116 | Logiciel de terminal sous GNU/Linux  | 
||
| 117 | |||
| 118 | Installation  | 
||
| 119 | <pre><code class="bash">  | 
||
| 120 | zypper install minicom  | 
||
| 121 | </code></pre>  | 
||
| 122 | |||
| 123 | Personnalisation  | 
||
| 124 | Ajouter l’utilisateur dans le groupe *dialout*.  | 
||
| 125 | <pre><code class="bash">  | 
||
| 126 | usermod --groups dialout username  | 
||
| 127 | </code></pre>  | 
||
| 128 | L’usager doit se reloguer.  | 
||
| 129 | |||
| 130 | h3. XƎTEX  | 
||
| 131 | |||
| 132 | Installation  | 
||
| 133 | <pre><code class="bash">  | 
||
| 134 | zypper install texlive-latex texlive-listing texlive-fancyhdr texlive-graphics texlive-todo texlive-siunitx texlive-beamer texlive-context-fullpage texlive-lastpage texlive-polyglosisa  | 
||
| 135 | </code></pre>  | 
||
| 136 | |||
| 137 | h2. Programmation  | 
||
| 138 | |||
| 139 | Le langage _C_ est celui utilisé pour les systèmes embarqués.  | 
||
| 140 | |||
| 141 | h3. Éditeur  | 
||
| 142 | |||
| 143 | Ajouts supplémentaire à VIM  | 
||
| 144 | |||
| 145 | h3. Compilateur C  | 
||
| 146 | |||
| 147 | h4. gcc  | 
||
| 148 | |||
| 149 | <pre><code class="bash">  | 
||
| 150 | zypper install gcc make  | 
||
| 151 | </code></pre>  | 
||
| 152 | |||
| 153 | h4. splint  | 
||
| 154 | |||
| 155 | Vérificateur de syntaxe C  | 
||
| 156 | <pre><code class="bash">  | 
||
| 157 | zypper install splint  | 
||
| 158 | </code></pre>  | 
||
| 159 | |||
| 160 | h3. Doxygen  | 
||
| 161 | |||
| 162 | Outil de documentation (C/C++, java)  | 
||
| 163 | |||
| 164 | Installation  | 
||
| 165 | <pre><code class="bash">  | 
||
| 166 | zypper install doxygen texlive-latex  | 
||
| 167 | </code></pre>  | 
||
| 168 | |||
| 169 | h3. Git  | 
||
| 170 | |||
| 171 | Système de contrôle de version  | 
||
| 172 | |||
| 173 | Installation  | 
||
| 174 | <pre><code class="bash">  | 
||
| 175 | zypper install git  | 
||
| 176 | </code></pre>  | 
||
| 177 | |||
| 178 | h3. Atmel AVR  | 
||
| 179 | |||
| 180 | Pour la programmation des micro-controleur AVR 8 bits d’Atmel.  | 
||
| 181 | |||
| 182 | h4. Atmel AVR 8-bit toolchain  | 
||
| 183 | |||
| 184 | Télécharger du site de Atmel (un compte n’est pas obligatoire)  | 
||
| 185 | >Choisir la version 32 ou 64 bits selon le système d’exploitation installé.  | 
||
| 186 | GNU\Linux : http://www.atmel.com/tools/ATMELAVRTOOLCHAINFORLINUX.aspx  | 
||
| 187 | Windows : http://www.atmel.com/tools/ATMELAVRTOOLCHAINFORWINDOWS.aspx  | 
||
| 188 | |||
| 189 | Décompresser le fichier.  | 
||
| 190 | En tant que root :  | 
||
| 191 | <pre><code class="bash">  | 
||
| 192 | # Créer le dossier (si n’existe pas déjà)  | 
||
| 193 | mkdir --parents /opt/cross/avr  | 
||
| 194 | # Copier les fichiers  | 
||
| 195 | cp --recursive avr8-gnu-toolchain-linux_x86/* /opt/cross/avr  | 
||
| 196 | # Creer les liens  | 
||
| 197 | ln --symbolic /opt/cross/avr/ /usr/local/avr  | 
||
| 198 | </code></pre>  | 
||
| 199 | |||
| 200 | Créer le fichier */etc/profile.d/avr.sh* avec le contenu suivant :  | 
||
| 201 | <pre><code class="bash">  | 
||
| 202 | #!/bin/bash  | 
||
| 203 | # Export path for AVR toolchain  | 
||
| 204 | export PATH=/usr/local/avr/bin:${PATH} | 
||
| 205 | export MANPATH=/usr/local/avr/man:/usr/local/avr/share/man:${MANPATH} | 
||
| 206 | </code></pre>  | 
||
| 207 | |||
| 208 | Se loguer en tant que l’utilisateur et exécuter  | 
||
| 209 | <pre><code class="bash">  | 
||
| 210 | source /etc/profile.d/avr.sh  | 
||
| 211 | </code></pre>  | 
||
| 212 | |||
| 213 | h4. Avrdude  | 
||
| 214 | |||
| 215 | Logiciel de transfert pour AVR.  | 
||
| 216 | |||
| 217 | openSUSE inclus la version 5.11.1.  | 
||
| 218 | >La version 6.0.1 ne DOIT PAS être installée, elle contient le bogue "#40142":https://savannah.nongnu.org/bugs/?40142  | 
||
| 219 | |||
| 220 | Installation Les modules suivant sont nécessaire :  | 
||
| 221 | <pre><code class="bash">  | 
||
| 222 | zypper install avrdude libusb-compat-devel  | 
||
| 223 | </code></pre>  | 
||
| 224 | |||
| 225 | Permissions USB (GNU\Linux)  | 
||
| 226 | Créer le fichier */etc/udev/rules.d/60-avrisp.rules* contenant  | 
||
| 227 | <pre><code class="bash">  | 
||
| 228 | SUBSYSTEM!="usb_device", ACTION!="add", GOTO="avrisp_end"  | 
||
| 229 | # Atmel Corp. JTAG ICE mkII  | 
||
| 230 | ATTR{idVendor}=="03eb", ATTR{idProduct}=="2103", MODE="660", GROUP="avr" | 
||
| 231 | # Atmel Corp. AVRISP mkII  | 
||
| 232 | ATTR{idVendor}=="03eb", ATTR{idProduct}=="2104", MODE="660", GROUP="avr" | 
||
| 233 | # Atmel Corp. Dragon  | 
||
| 234 | ATTR{idVendor}=="03eb", ATTR{idProduct}=="2107", MODE="660", GROUP="avr" | 
||
| 235 | LABEL="avrisp_end"  | 
||
| 236 | </code></pre>  | 
||
| 237 | |||
| 238 | Rebrancher le programmeur USB pour relire le fichier */etc/udev/rules.d*  | 
||
| 239 | |||
| 240 | Créer un groupe *avr* et y ajouter les usagers nécessaires.  | 
||
| 241 | <pre><code class="bash">  | 
||
| 242 | groupadd avr  | 
||
| 243 | usermod --groups avr username  | 
||
| 244 | </code></pre>  | 
||
| 245 | |||
| 246 | L’usager doit se reloguer.  | 
||
| 247 | |||
| 248 | h3. BeagleBone  | 
||
| 249 | |||
| 250 | h2. CAD  | 
||
| 251 | |||
| 252 | h3. KiCAD  | 
||
| 253 | |||
| 254 | h4. Installation  | 
||
| 255 | |||
| 256 | <pre><code class="bash">  | 
||
| 257 | zypper install kicad  | 
||
| 258 | </code></pre>  | 
||
| 259 | |||
| 260 | h4. Personnalisation  | 
||
| 261 | |||
| 262 | 13 | Patrice Nadeau | Les fichiers gabarit d'un +nouveau+ projet sont :  | 
| 263 | 4 | Patrice Nadeau | * Global (system wide) : */usr/share/kicad/template/kicad.pro*.  | 
| 264 | * Utilisateur courant : *~/noname.pro*  | 
||
| 265 | 5 | Patrice Nadeau | |
| 266 | 10 | Patrice Nadeau | >Comme les libraires fournis proviennent de source divers et que je ne contrôle pas, je ne travaille qu’avec mes propres libraires.  | 
| 267 | >J’enlève donc les librairies de KiCad et j'ajoute les miennes.  | 
||
| 268 | >Fichier _~/noname.pro_ (2 lignes à modifier) :  | 
||
| 269 | >* _LibDir_ : */home/pnadeau/Documents/projects/cad/libraries/kicad/*  | 
||
| 270 | 1 | Patrice Nadeau | |
| 271 | h2. Autres  | 
||
| 272 | |||
| 273 | h3. Logic  | 
||
| 274 | |||
| 275 | Analyseur logique  | 
||
| 276 | |||
| 277 | Téléchargement à partir de http://www.saleae.com/downloads  | 
||
| 278 | |||
| 279 | Décompresser le fichier et placer les fichiers dans *~/Logic*  | 
||
| 280 | |||
| 281 | Installer le pilote  | 
||
| 282 | <pre><code class="bash">  | 
||
| 283 | ~/Logic/Drivers/install_driver  | 
||
| 284 | </code></pre>  | 
||
| 285 | |||
| 286 | Débrancher et rebrancher la sonde.  |