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