Modifications

FabISP

5 137 octets ajoutés, 2 mai 2014 à 10:26
avec l'AVRISP V2
<code lang:bash>AVRDUDE = avrdude -c avrisp2 -P usb -p $(DEVICE)</code>
ensuite on lance la compilation :
 
<code lang:bash>make hex</code>
 
le résultat de la compilation :
 
<code lang:bash>avr-gcc -Wall -Os -DF_CPU=20000000 -Iusbdrv -I. -DDEBUG_LEVEL=0 -mmcu=attiny44 -c usbdrv/usbdrv.c -o usbdrv/usbdrv.o
avr-gcc -Wall -Os -DF_CPU=20000000 -Iusbdrv -I. -DDEBUG_LEVEL=0 -mmcu=attiny44 -x assembler-with-cpp -c usbdrv/usbdrvasm.S -o usbdrv/usbdrvasm.o
avr-gcc -Wall -Os -DF_CPU=20000000 -Iusbdrv -I. -DDEBUG_LEVEL=0 -mmcu=attiny44 -c usbdrv/oddebug.c -o usbdrv/oddebug.o
avr-gcc -Wall -Os -DF_CPU=20000000 -Iusbdrv -I. -DDEBUG_LEVEL=0 -mmcu=attiny44 -c main.c -o main.o
avr-gcc -Wall -Os -DF_CPU=20000000 -Iusbdrv -I. -DDEBUG_LEVEL=0 -mmcu=attiny44 -o main.elf usbdrv/usbdrv.o usbdrv/usbdrvasm.o usbdrv/oddebug.o main.o
rm -f main.hex main.eep.hex
avr-objcopy -j .text -j .data -O ihex main.elf main.hex
avr-size main.hex
text data bss dec hex filename
0 2020 0 2020 7e4 main.hex
</code>
 
Puis on regle les fusibles :
 
 
<code lang:bash>make fuse</code>
 
résultat :
 
<code lang:bash>avrdude -c avrisp2 -P usb -p attiny44 -U hfuse:w:0xDF:m -U lfuse:w:0xFF:m
 
avrdude: AVR device initialized and ready to accept instructions
 
Reading | ################################################## | 100% 0.11s
 
avrdude: Device signature = 0x1e9207
avrdude: reading input file "0xDF"
avrdude: writing hfuse (1 bytes):
 
Writing | ################################################## | 100% 0.04s
 
avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xDF:
avrdude: load data hfuse data from input file 0xDF:
avrdude: input file 0xDF contains 1 bytes
avrdude: reading on-chip hfuse data:
 
Reading | ################################################## | 100% 0.04s
 
avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xFF"
avrdude: writing lfuse (1 bytes):
 
Writing | ################################################## | 100% 0.11s
 
avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xFF:
avrdude: load data lfuse data from input file 0xFF:
avrdude: input file 0xFF contains 1 bytes
avrdude: reading on-chip lfuse data:
 
Reading | ################################################## | 100% 0.04s
 
avrdude: verifying ...
avrdude: 1 bytes of lfuse verified
 
avrdude: safemode: Fuses OK
 
avrdude done. Thank you.
</code>
 
enfin, on upload le programme :
 
<code lang:bash>make program</code>
 
résultat :
 
<code lang:bash>avrdude -c avrisp2 -P usb -p attiny44 -U flash:w:main.hex:i
 
avrdude: AVR device initialized and ready to accept instructions
 
Reading | ################################################## | 100% 0.11s
 
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 "main.hex"
avrdude: writing flash (2020 bytes):
 
Writing | ################################################## | 100% 73.70s
 
avrdude: 2020 bytes of flash written
avrdude: verifying flash memory against main.hex:
avrdude: load data flash data from input file main.hex:
avrdude: input file main.hex contains 2020 bytes
avrdude: reading on-chip flash data:
 
Reading | ################################################## | 100% 71.44s
 
avrdude: verifying ...
avrdude: 2020 bytes of flash verified
 
avrdude: safemode: Fuses OK
 
avrdude done. Thank you.
 
avrdude -c avrisp2 -P usb -p attiny44 -U hfuse:w:0xDF:m -U lfuse:w:0xFF:m
 
avrdude: AVR device initialized and ready to accept instructions
 
Reading | ################################################## | 100% 0.11s
 
avrdude: Device signature = 0x1e9207
avrdude: reading input file "0xDF"
avrdude: writing hfuse (1 bytes):
 
Writing | ################################################## | 100% 0.04s
 
avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xDF:
avrdude: load data hfuse data from input file 0xDF:
avrdude: input file 0xDF contains 1 bytes
avrdude: reading on-chip hfuse data:
 
Reading | ################################################## | 100% 0.04s
 
avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xFF"
avrdude: writing lfuse (1 bytes):
 
Writing | ################################################## | 100% 0.04s
 
avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xFF:
avrdude: load data lfuse data from input file 0xFF:
avrdude: input file 0xFF contains 1 bytes
avrdude: reading on-chip lfuse data:
 
Reading | ################################################## | 100% 0.04s
 
avrdude: verifying ...
avrdude: 1 bytes of lfuse verified
 
avrdude: safemode: Fuses OK
 
avrdude done. Thank you.
</code>
 
 
 
Le programmateur est maintenant prêt à fonctionner : il ne reste plus qu'à dessouder les juppers 1 et 2.
 
Pour férifier qu'il réagit bien, je tape
 
<code lang:bash>lsusb</code>
 
Lorsque j'ai branché le programmateur, il apparait dans la liste sosu cette forme :
 
<code lang:bash>Bus 003 Device 013: ID 1781:0c9f Multiple Vendors USBtiny</code>
 
ça y est, j'ai un FabISP qui fonctionne !
[[Catégorie:FabAcademy]]
[[Catégorie:Electronique]]
0
6 691
modifications