Wiki » Historique » Version 10
Patrice Nadeau, 2014-07-24 11:08
| 1 | 2 | Patrice Nadeau | %{font-size:18pt}Utilisation d'un BeagleBone Black% |
|---|---|---|---|
| 2 | |||
| 3 | |||
| 4 | 1 | Patrice Nadeau | |
| 5 | --- |
||
| 6 | |||
| 7 | {{toc}} |
||
| 8 | |||
| 9 | h1. Matériel requis |
||
| 10 | |||
| 11 | * BeagleBone Black (Digikey #"BB-BBLK-000-REVC-ND":http://www.digikey.ca/product-detail/en/BB-BBLK-000/BB-BBLK-000-REVC-ND/4842211) |
||
| 12 | |||
| 13 | h1. Accessoires requis |
||
| 14 | |||
| 15 | * Bloc d’alimentation 5V, 1A, 2.1mm, centre positif (DigiKey #"T139-P5P-ND":http://www.digikey.ca/product-search/en?vendor=0&keywords=T1139-P5P-ND) |
||
| 16 | * Concentrateur USB |
||
| 17 | 3 | Patrice Nadeau | |
| 18 | h1. Logiciel requis |
||
| 19 | |||
| 20 | h2. Développement à partir d'un autre poste |
||
| 21 | |||
| 22 | Comme pour les AVR d'ATMEL, l’écriture du code source et sa compilation peut être faite sur un autre poste. |
||
| 23 | |||
| 24 | Compilateur (gcc) |
||
| 25 | * http://software.opensuse.org/package/cross-arm-linux-gnueabi-binutils |
||
| 26 | * http://software.opensuse.org/package/cross-arm-linux-gnueabi-gcc |
||
| 27 | |||
| 28 | Librairies |
||
| 29 | 9 | Patrice Nadeau | * http://software.opensuse.org/package/cross-arm-linux-gnueabi-kernel-headers |
| 30 | 3 | Patrice Nadeau | * http://software.opensuse.org/package/cross-arm-linux-gnueabi-glibc |
| 31 | * http://software.opensuse.org/package/cross-arm-linux-gnueabi-libffi |
||
| 32 | |||
| 33 | 4 | Patrice Nadeau | Le compilateur est installé dans */opt/cross/bin/* |
| 34 | * arm-linix-gnueabi-gcc |
||
| 35 | * ... |
||
| 36 | 5 | Patrice Nadeau | |
| 37 | 6 | Patrice Nadeau | Créer le lien vers l’exécutable : |
| 38 | 5 | Patrice Nadeau | <pre><code class="bash"> |
| 39 | ln -s /opt/cross/bin /usr/local/arm |
||
| 40 | </code></pre> |
||
| 41 | |||
| 42 | 10 | Patrice Nadeau | Crer le fichier */etc/profile.d/arm.sh* |
| 43 | 1 | Patrice Nadeau | <pre><code class="bash"> |
| 44 | 7 | Patrice Nadeau | #!/bin/bash |
| 45 | # Export path for ARM tollchain |
||
| 46 | 5 | Patrice Nadeau | export PATH=/usr/local/arm:${PATH} |
| 47 | 1 | Patrice Nadeau | export MANPATH=/opt/cross/share/man:${MANPATH} |
| 48 | 7 | Patrice Nadeau | </code></pre> |
| 49 | |||
| 50 | En tant qu'utilisateur, les changements seront effectifs au prochain login. |
||
| 51 | Sinon, dans la session _courante_ |
||
| 52 | <pre><code class="bash"> |
||
| 53 | 1 | Patrice Nadeau | source /etc/profile.d/arm.sh |
| 54 | 10 | Patrice Nadeau | </code></pre> |
| 55 | |||
| 56 | Créer un fichier *test.c* |
||
| 57 | <pre><code class="c"> |
||
| 58 | #include <stdio.h> |
||
| 59 | void (main)(void) |
||
| 60 | { |
||
| 61 | printf("Allo la terre !\n"); |
||
| 62 | int x; |
||
| 63 | } |
||
| 64 | </code></pre> |
||
| 65 | |||
| 66 | Compiler avec |
||
| 67 | <pre><code class="bash"> |
||
| 68 | arm-linux-gnueabi-gcc test.c -o test |
||
| 69 | 5 | Patrice Nadeau | </code></pre> |