Nastavitev eclippse okolja v projektu:

1. default port:
nastavimo v avrdude
gedit /etc/avrdude.conf
default_parallel   = "/dev/parport1";

sudo gedit /usr/share/arduino/hardware/arduino/programmers.txt

parallel.name=Parallel Programmer
parallel.protocol=pony-stk200
parallel.force=true

gedit ~/.arduino/preferences.txt
programmer=parallel
upload.using=parallel
#parallel.protocol=pony-stk200

Programiranje:

Serijski programator:

avrdude avrdude -p atmega8 -P /dev/ttyS0 -c ponyser -e -U flash:w:$(PROJECT).hex

Paralelni:
avrdude -p atmega8 -P /dev/parport1 -c stk200 -U flash:r:flash.bin:r
sudo avrdude -p atmega8 -P /dev/parport1 -c pony-stk200 -U flash:r:flash.bin:r

Če nimaš urejeno v okolju upload navedeš tmp fajl

avrdude -pm8 -cpony-stk200 -u -Uflash:w:/tmp/build535585411977045319.tmp/i2csniff.cpp.hex:a -Ulfuse:w:0xff:m -Uhfuse:w:0xc9:m

Test povezave, no write to device (-n):

pavelr@debeluscek:~/projeki/ParallelPortTest$ avrdude -p atmega8 -n -P/dev/parport2 -cpony-stk200
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9307
avrdude: safemode: Fuses OK
avrdude done.  Thank you.

Ko nardiš projekt nastavi v properties/c/c++ build /settings/Additional tools GENERATE HEX file for flash

Da se po prevajanju naloži hex na napravo, moraš izbrati RELEASE configuration, sicer naredi samo elf

 

Usefull Libraryes

I2C, LCD, UART http://homepage.hispeed.ch/peterfleury/avr-software.html#libs