Download - teslabs
Transcript
Index 1. Introduction.................................................................................................. ...........................3 2. AVR GNU Toolchain......................................................................................... ......................4 2.1. Introduction........................................................................................... ............................4 2.1.1. GCC (GNU Compiler Collection)............................................................................. 4 2.1.2. Binutils................................................................................................................ .......4 2.1.3. avr-libc....................................................................................................... ................5 2.2. Installation of AVR GNU Toolchain.............................................................. ...................5 2.2.1. Windows............................................................................................... .....................5 2.2.2. Linux / MacOS................................................................................. .........................5 3. Programming tools.................................................................................................. ................8 3.1. Installing avrdude............................................................................................ ..................8 3.2. Choosing a programmer................................................................................... .................8 3.2.1. JTAGICEmkII......................................................................................................... ...8 3.2.2. Parallel port ISP programmer......................................................................... ...........9 3.3. Working with avrdude.................................................................................... .................10 4. Automation using a Makefile........................................................................ .......................11 4.1. A simple but flexible Makefile.............................................................................. ..........11 4.2. Understanding and using the Makefile...........................................................................12 5. Choosing an IDE: Eclipse......................................................................................... ............14 5.1. Installation of Eclipse.......................................................................................... ............14 5.1.1. The Eclipse core.............................................................................. ........................14 5.1.2. The Zylin plugin..................................................................................... .................14 5.2. First steps with Eclipse: Setting up a project..................................................................14 6. Debugging with JTAGICEmkII and Eclipse.................................................................... ..20 6.1. Installation of GDB and Avarice.................................................................... .................20 6.1.1. GDB.......................................................................................................... ...............20 6.1.2. Avarice..................................................................................................... ................20 6.2. Getting Eclipse ready to debug................................................................. ......................21 6.3. Starting to Debug......................................................................................................... ....22 6.3.1. Adding debug information to an ELF file...............................................................22 6.3.2. Working with Avarice................................................................................. .............23 6.3.3. Debugging with Eclipse................................................................. .........................23 7. Bibliography...................................................................................................................... .....27 2