SOP 002-Environnement informatique » Historique » Version 21
Patrice Nadeau, 2015-11-07 09:57
| 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 | 14 | Patrice Nadeau | sudo zypper install gvim vim-data vim-plugin-a |
| 73 | 1 | Patrice Nadeau | </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 | 14 | Patrice Nadeau | sudo zypper install ctags |
| 83 | 1 | Patrice Nadeau | </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 | 15 | Patrice Nadeau | sudo zypper install unison |
| 112 | 1 | Patrice Nadeau | </code></pre> |
| 113 | |||
| 114 | h3. Minicom |
||
| 115 | |||
| 116 | Logiciel de terminal sous GNU/Linux |
||
| 117 | |||
| 118 | Installation |
||
| 119 | <pre><code class="bash"> |
||
| 120 | 16 | Patrice Nadeau | sudo zypper install minicom |
| 121 | 1 | Patrice Nadeau | </code></pre> |
| 122 | |||
| 123 | Personnalisation |
||
| 124 | Ajouter l’utilisateur dans le groupe *dialout*. |
||
| 125 | <pre><code class="bash"> |
||
| 126 | 16 | Patrice Nadeau | sudo usermod --groups dialout username |
| 127 | 1 | Patrice Nadeau | </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 | 17 | Patrice Nadeau | sudo zypper install gcc make |
| 151 | 1 | Patrice Nadeau | </code></pre> |
| 152 | |||
| 153 | h4. splint |
||
| 154 | |||
| 155 | Vérificateur de syntaxe C |
||
| 156 | <pre><code class="bash"> |
||
| 157 | 17 | Patrice Nadeau | sudo zypper install splint |
| 158 | 1 | Patrice Nadeau | </code></pre> |
| 159 | |||
| 160 | h3. Doxygen |
||
| 161 | |||
| 162 | Outil de documentation (C/C++, java) |
||
| 163 | |||
| 164 | Installation |
||
| 165 | <pre><code class="bash"> |
||
| 166 | 18 | Patrice Nadeau | sudo zypper install doxygen texlive-latex |
| 167 | 1 | Patrice Nadeau | </code></pre> |
| 168 | |||
| 169 | h3. Git |
||
| 170 | |||
| 171 | Système de contrôle de version |
||
| 172 | |||
| 173 | Installation |
||
| 174 | <pre><code class="bash"> |
||
| 175 | 19 | Patrice Nadeau | sudo zypper install git |
| 176 | 1 | Patrice Nadeau | </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 | 21 | Patrice Nadeau | <pre><code class="bash"> |
| 191 | tar xf Downloads/avr8-gnu-toolchain-3.5.0.1662-linux.any.x86_64.tar.gz |
||
| 192 | </code></pre> |
||
| 193 | |||
| 194 | Copier les fichiers : |
||
| 195 | 1 | Patrice Nadeau | <pre><code class="bash"> |
| 196 | # Créer le dossier (si n’existe pas déjà) |
||
| 197 | 20 | Patrice Nadeau | sudo mkdir --parents /opt/cross/avr |
| 198 | 1 | Patrice Nadeau | # Copier les fichiers |
| 199 | cp --recursive avr8-gnu-toolchain-linux_x86/* /opt/cross/avr |
||
| 200 | # Creer les liens |
||
| 201 | 20 | Patrice Nadeau | sudo ln --symbolic /opt/cross/avr/ /usr/local/avr |
| 202 | 1 | Patrice Nadeau | </code></pre> |
| 203 | |||
| 204 | Créer le fichier */etc/profile.d/avr.sh* avec le contenu suivant : |
||
| 205 | <pre><code class="bash"> |
||
| 206 | #!/bin/bash |
||
| 207 | # Export path for AVR toolchain |
||
| 208 | export PATH=/usr/local/avr/bin:${PATH} |
||
| 209 | export MANPATH=/usr/local/avr/man:/usr/local/avr/share/man:${MANPATH} |
||
| 210 | </code></pre> |
||
| 211 | |||
| 212 | Se loguer en tant que l’utilisateur et exécuter |
||
| 213 | <pre><code class="bash"> |
||
| 214 | source /etc/profile.d/avr.sh |
||
| 215 | </code></pre> |
||
| 216 | |||
| 217 | h4. Avrdude |
||
| 218 | |||
| 219 | Logiciel de transfert pour AVR. |
||
| 220 | |||
| 221 | openSUSE inclus la version 5.11.1. |
||
| 222 | >La version 6.0.1 ne DOIT PAS être installée, elle contient le bogue "#40142":https://savannah.nongnu.org/bugs/?40142 |
||
| 223 | |||
| 224 | Installation Les modules suivant sont nécessaire : |
||
| 225 | <pre><code class="bash"> |
||
| 226 | zypper install avrdude libusb-compat-devel |
||
| 227 | </code></pre> |
||
| 228 | |||
| 229 | Permissions USB (GNU\Linux) |
||
| 230 | Créer le fichier */etc/udev/rules.d/60-avrisp.rules* contenant |
||
| 231 | <pre><code class="bash"> |
||
| 232 | SUBSYSTEM!="usb_device", ACTION!="add", GOTO="avrisp_end" |
||
| 233 | # Atmel Corp. JTAG ICE mkII |
||
| 234 | ATTR{idVendor}=="03eb", ATTR{idProduct}=="2103", MODE="660", GROUP="avr" |
||
| 235 | # Atmel Corp. AVRISP mkII |
||
| 236 | ATTR{idVendor}=="03eb", ATTR{idProduct}=="2104", MODE="660", GROUP="avr" |
||
| 237 | # Atmel Corp. Dragon |
||
| 238 | ATTR{idVendor}=="03eb", ATTR{idProduct}=="2107", MODE="660", GROUP="avr" |
||
| 239 | LABEL="avrisp_end" |
||
| 240 | </code></pre> |
||
| 241 | |||
| 242 | Rebrancher le programmeur USB pour relire le fichier */etc/udev/rules.d* |
||
| 243 | |||
| 244 | Créer un groupe *avr* et y ajouter les usagers nécessaires. |
||
| 245 | <pre><code class="bash"> |
||
| 246 | groupadd avr |
||
| 247 | usermod --groups avr username |
||
| 248 | </code></pre> |
||
| 249 | |||
| 250 | L’usager doit se reloguer. |
||
| 251 | |||
| 252 | h3. BeagleBone |
||
| 253 | |||
| 254 | h2. CAD |
||
| 255 | |||
| 256 | h3. KiCAD |
||
| 257 | |||
| 258 | h4. Installation |
||
| 259 | |||
| 260 | <pre><code class="bash"> |
||
| 261 | zypper install kicad |
||
| 262 | </code></pre> |
||
| 263 | |||
| 264 | h4. Personnalisation |
||
| 265 | |||
| 266 | 13 | Patrice Nadeau | Les fichiers gabarit d'un +nouveau+ projet sont : |
| 267 | 4 | Patrice Nadeau | * Global (system wide) : */usr/share/kicad/template/kicad.pro*. |
| 268 | * Utilisateur courant : *~/noname.pro* |
||
| 269 | 5 | Patrice Nadeau | |
| 270 | 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. |
| 271 | >J’enlève donc les librairies de KiCad et j'ajoute les miennes. |
||
| 272 | >Fichier _~/noname.pro_ (2 lignes à modifier) : |
||
| 273 | >* _LibDir_ : */home/pnadeau/Documents/projects/cad/libraries/kicad/* |
||
| 274 | 1 | Patrice Nadeau | |
| 275 | h2. Autres |
||
| 276 | |||
| 277 | h3. Logic |
||
| 278 | |||
| 279 | Analyseur logique |
||
| 280 | |||
| 281 | Téléchargement à partir de http://www.saleae.com/downloads |
||
| 282 | |||
| 283 | Décompresser le fichier et placer les fichiers dans *~/Logic* |
||
| 284 | |||
| 285 | Installer le pilote |
||
| 286 | <pre><code class="bash"> |
||
| 287 | ~/Logic/Drivers/install_driver |
||
| 288 | </code></pre> |
||
| 289 | |||
| 290 | Débrancher et rebrancher la sonde. |