SOP 002-Environnement informatique » Historique » Version 81
  Patrice Nadeau, 2017-07-29 16:03 
  
| 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 | 73 | Patrice Nadeau | openSUSE Leap 42.3 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 | 80 | Patrice Nadeau | h4. Atmel AVR 8-bit GNU toolchain | 
| 179 | 59 | Patrice Nadeau | |
| 180 | 48 | Patrice Nadeau | h4. Logiciel tiers pour toolchain | 
| 181 | 44 | Patrice Nadeau | |
| 182 | 78 | Patrice Nadeau | > Version 5.4.0 de avr-gcc | 
| 183 | 76 | Patrice Nadeau | |
| 184 | <pre><code class="bash"> | ||
| 185 | sudo zypper addrepo http://download.opensuse.org/repositories/CrossToolchain:avr/openSUSE_Leap_42.3/CrossToolchain:avr.repo | ||
| 186 | sudo zypper refresh | ||
| 187 | 79 | Patrice Nadeau | sudo zypper install cross-avr-gcc cross-avr-binutils avr-libc | 
| 188 | 76 | Patrice Nadeau | </code></pre> | 
| 189 | |||
| 190 | 1 | Patrice Nadeau | h4. Avrdude | 
| 191 | 34 | Patrice Nadeau | > Version 6.1 | 
| 192 | 1 | Patrice Nadeau | |
| 193 | Logiciel de transfert pour AVR. | ||
| 194 | |||
| 195 | Installation Les modules suivant sont nécessaire : | ||
| 196 | <pre><code class="bash"> | ||
| 197 | 24 | Patrice Nadeau | sudo zypper install avrdude libusb-compat-devel | 
| 198 | 1 | Patrice Nadeau | </code></pre> | 
| 199 | |||
| 200 | 25 | Patrice Nadeau | Permissions USB | 
| 201 | 24 | Patrice Nadeau | Créer le fichier de règle : | 
| 202 | <pre><code class="bash"> | ||
| 203 | 26 | Patrice Nadeau | sudo vi /etc/udev/rules.d/60-avrisp.rules | 
| 204 | 24 | Patrice Nadeau | </code></pre> | 
| 205 | 39 | Patrice Nadeau | Contenu du fichier : | 
| 206 | 1 | Patrice Nadeau | <pre><code class="bash"> | 
| 207 | SUBSYSTEM!="usb_device", ACTION!="add", GOTO="avrisp_end" | ||
| 208 | # Atmel Corp. JTAG ICE mkII | ||
| 209 | ATTR{idVendor}=="03eb", ATTR{idProduct}=="2103", MODE="660", GROUP="avr" | ||
| 210 | # Atmel Corp. AVRISP mkII | ||
| 211 | ATTR{idVendor}=="03eb", ATTR{idProduct}=="2104", MODE="660", GROUP="avr" | ||
| 212 | # Atmel Corp. Dragon | ||
| 213 | ATTR{idVendor}=="03eb", ATTR{idProduct}=="2107", MODE="660", GROUP="avr" | ||
| 214 | LABEL="avrisp_end" | ||
| 215 | </code></pre> | ||
| 216 | |||
| 217 | Rebrancher le programmeur USB pour relire le fichier */etc/udev/rules.d* | ||
| 218 | |||
| 219 | Créer un groupe *avr* et y ajouter les usagers nécessaires. | ||
| 220 | <pre><code class="bash"> | ||
| 221 | 27 | Patrice Nadeau | sudo groupadd avr | 
| 222 | sudo usermod --groups avr username | ||
| 223 | 1 | Patrice Nadeau | </code></pre> | 
| 224 | |||
| 225 | L’usager doit se reloguer. | ||
| 226 | |||
| 227 | h3. BeagleBone | ||
| 228 | |||
| 229 | 52 | Patrice Nadeau | h2. Simulation | 
| 230 | |||
| 231 | 53 | Patrice Nadeau | Simulation de circuit électronique. | 
| 232 | |||
| 233 | 55 | Patrice Nadeau | h3. GNUCap | 
| 234 | |||
| 235 | <pre><code class="bash"> | ||
| 236 | 56 | Patrice Nadeau | sudo zypper install gnucap gspiceui geda-gschem geda-netlist | 
| 237 | 55 | Patrice Nadeau | </code></pre> | 
| 238 | |||
| 239 | 1 | Patrice Nadeau | h2. CAD | 
| 240 | |||
| 241 | h3. KiCAD | ||
| 242 | 72 | Patrice Nadeau | > Version 4.0.6 | 
| 243 | 1 | Patrice Nadeau | |
| 244 | h4. Installation | ||
| 245 | |||
| 246 | 71 | Patrice Nadeau | <pre><code class="bash"> | 
| 247 | 72 | Patrice Nadeau | sudo zypper install kicad | 
| 248 | 1 | Patrice Nadeau | </code></pre> | 
| 249 | |||
| 250 | h4. Personnalisation | ||
| 251 | |||
| 252 | 13 | Patrice Nadeau | Les fichiers gabarit d'un +nouveau+ projet sont : | 
| 253 | 4 | Patrice Nadeau | * Global (system wide) : */usr/share/kicad/template/kicad.pro*. | 
| 254 | * Utilisateur courant : *~/noname.pro* | ||
| 255 | 5 | Patrice Nadeau | |
| 256 | 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. | 
| 257 | >J’enlève donc les librairies de KiCad et j'ajoute les miennes. | ||
| 258 | >Fichier _~/noname.pro_ (2 lignes à modifier) : | ||
| 259 | >* _LibDir_ : */home/pnadeau/Documents/projects/cad/libraries/kicad/* | ||
| 260 | 1 | Patrice Nadeau | |
| 261 | h2. Autres | ||
| 262 | |||
| 263 | h3. Logic | ||
| 264 | 68 | Patrice Nadeau | > Version 1.2.10 | 
| 265 | 1 | Patrice Nadeau | |
| 266 | Analyseur logique | ||
| 267 | |||
| 268 | Téléchargement à partir de http://www.saleae.com/downloads | ||
| 269 | |||
| 270 | Décompresser le fichier et placer les fichiers dans *~/Logic* | ||
| 271 | |||
| 272 | Installer le pilote | ||
| 273 | <pre><code class="bash"> | ||
| 274 | 31 | Patrice Nadeau | ~/Logic/Drivers/install_driver.sh | 
| 275 | 1 | Patrice Nadeau | </code></pre> | 
| 276 | |||
| 277 | 31 | Patrice Nadeau | Débrancher et rebrancher l'analyseur. | 
