1234567891011121314151617181920212223242526272829303132333435 |
- #!/bin/bash
- sudo apt-get update
- sudo apt-get install -y build-essential bison flex automake libelf-dev libusb-1.0-0-dev libusb-dev libftdi-dev libftdi1 zip unzip
- wget http://download.savannah.gnu.org/releases/avrdude/avrdude-6.1.tar.gz
- tar xvfz avrdude-6.1.tar.gz
- cd avrdude-6.1
- ./configure --enable-linuxgpio
- make -j4
- sudo make install
- if [ -f ~/avrdude_gpio.conf ]
- then
- rm ~/avrdude_gpio.conf
- fi
- cp /usr/local/etc/avrdude.conf ~/avrdude_gpio.conf
- cat <<'EOF'>> ~/avrdude_gpio.conf
- # Linux GPIO configuration for avrdude.
- # Change the lines below to the GPIO pins connected to the AVR.
- programmer
- id = "linuxgpio";
- desc = "Use the Linux sysfs interface to bitbang GPIO lines";
- type = "linuxgpio";
- reset = 4;
- sck = 11;
- mosi = 10;
- miso = 9;
- ;
- EOF
- sudo cp ~/avrdude_gpio.conf /usr/local/etc/avrdude.conf
- echo ""
- sudo avrdude -c linuxgpio -p atmega328p -v
|