Programmation embarquée : Différence entre versions
(→premiers pas) |
(→premiers pas) |
||
Ligne 66 : | Ligne 66 : | ||
avrdude done. Thank you. | avrdude done. Thank you. | ||
+ | $ make -f hello.ftdi.44.echo.c.make program-avrisp2 | ||
+ | avr-objcopy -O ihex hello.ftdi.44.echo.out hello.ftdi.44.echo.c.hex;\ | ||
+ | avr-size --mcu=attiny44 --format=avr hello.ftdi.44.echo.out | ||
+ | AVR Memory Usage | ||
+ | ---------------- | ||
+ | Device: attiny44 | ||
+ | |||
+ | Program: 776 bytes (18.9% Full) | ||
+ | (.text + .data + .bootloader) | ||
+ | |||
+ | Data: 64 bytes (25.0% Full) | ||
+ | (.data + .bss + .noinit) | ||
+ | |||
+ | |||
+ | avrdude -p t44 -P usb -c avrisp2 -U flash:w:hello.ftdi.44.echo.c.hex | ||
+ | |||
+ | avrdude: AVR device initialized and ready to accept instructions | ||
+ | |||
+ | Reading | ################################################## | 100% 0.00s | ||
+ | |||
+ | avrdude: Device signature = 0x1e9207 | ||
+ | avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed | ||
+ | To disable this feature, specify the -D option. | ||
+ | avrdude: erasing chip | ||
+ | avrdude: reading input file "hello.ftdi.44.echo.c.hex" | ||
+ | avrdude: input file hello.ftdi.44.echo.c.hex auto detected as Intel Hex | ||
+ | avrdude: writing flash (776 bytes): | ||
+ | |||
+ | Writing | ################################################## | 100% 0.27s | ||
+ | |||
+ | avrdude: 776 bytes of flash written | ||
+ | avrdude: verifying flash memory against hello.ftdi.44.echo.c.hex: | ||
+ | avrdude: load data flash data from input file hello.ftdi.44.echo.c.hex: | ||
+ | avrdude: input file hello.ftdi.44.echo.c.hex auto detected as Intel Hex | ||
+ | avrdude: input file hello.ftdi.44.echo.c.hex contains 776 bytes | ||
+ | avrdude: reading on-chip flash data: | ||
+ | |||
+ | Reading | ################################################## | 100% 0.23s | ||
+ | |||
+ | avrdude: verifying ... | ||
+ | avrdude: 776 bytes of flash verified | ||
+ | |||
+ | avrdude: safemode: Fuses OK | ||
+ | |||
+ | avrdude done. Thank you. | ||
Version du 20 mars 2014 à 13:39
résumé
le TP de la semaine de la fabacademy consiste à se familiariser avec la programmation de microcontroleurs et processeurs.
je vais commencer par programmer les deux circuits que j'ai réalisé : le FabISP et le helloWorld
premiers pas
La première étape est de finir mon travail en retard sur le fabISP : comme j'attendais l'arrivée des composants, je n'ai pas eu le temps de programmer le circuit à temps. De plus je ne comprenais pas bien la logique d'alimentation du circuit : je croyais que le programmateur alimentait la puce cible alors qu'il fallait qu'elle le soit séparément...
make -f hello.ftdi.44.echo.c.make
avr-objcopy -O ihex hello.ftdi.44.echo.out hello.ftdi.44.echo.c.hex;\
avr-size --mcu=attiny44 --format=avr hello.ftdi.44.echo.out
AVR Memory Usage
Device: attiny44
Program: 776 bytes (18.9% Full) (.text + .data + .bootloader)
Data: 64 bytes (25.0% Full) (.data + .bss + .noinit)
cedric@cedric-Inspiron-5520 ~/fabacademy/electronicDesign/programming $ make -f hello.ftdi.44.echo.c.make program-avrisp2-fuses
avr-objcopy -O ihex hello.ftdi.44.echo.out hello.ftdi.44.echo.c.hex;\
avr-size --mcu=attiny44 --format=avr hello.ftdi.44.echo.out
AVR Memory Usage
Device: attiny44
Program: 776 bytes (18.9% Full) (.text + .data + .bootloader)
Data: 64 bytes (25.0% Full) (.data + .bss + .noinit)
avrdude -p t44 -P usb -c avrisp2 -U lfuse:w:0x5E:m
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9207 avrdude: reading input file "0x5E" avrdude: writing lfuse (1 bytes):
Writing | ################################################## | 100% 0.01s
avrdude: 1 bytes of lfuse written avrdude: verifying lfuse memory against 0x5E: avrdude: load data lfuse data from input file 0x5E: avrdude: input file 0x5E contains 1 bytes avrdude: reading on-chip lfuse data:
Reading | ################################################## | 100% 0.00s
avrdude: verifying ... avrdude: 1 bytes of lfuse verified
avrdude: safemode: Fuses OK
avrdude done. Thank you.
$ make -f hello.ftdi.44.echo.c.make program-avrisp2 avr-objcopy -O ihex hello.ftdi.44.echo.out hello.ftdi.44.echo.c.hex;\ avr-size --mcu=attiny44 --format=avr hello.ftdi.44.echo.out AVR Memory Usage
Device: attiny44
Program: 776 bytes (18.9% Full) (.text + .data + .bootloader)
Data: 64 bytes (25.0% Full) (.data + .bss + .noinit)
avrdude -p t44 -P usb -c avrisp2 -U flash:w:hello.ftdi.44.echo.c.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9207 avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip avrdude: reading input file "hello.ftdi.44.echo.c.hex" avrdude: input file hello.ftdi.44.echo.c.hex auto detected as Intel Hex avrdude: writing flash (776 bytes):
Writing | ################################################## | 100% 0.27s
avrdude: 776 bytes of flash written avrdude: verifying flash memory against hello.ftdi.44.echo.c.hex: avrdude: load data flash data from input file hello.ftdi.44.echo.c.hex: avrdude: input file hello.ftdi.44.echo.c.hex auto detected as Intel Hex avrdude: input file hello.ftdi.44.echo.c.hex contains 776 bytes avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.23s
avrdude: verifying ... avrdude: 776 bytes of flash verified
avrdude: safemode: Fuses OK
avrdude done. Thank you.