On 9 September 2013 22:17, Janne Johansson <[email protected]> wrote: > I used the following changes to the BSDmakefile to make leonardo happy: > prompt> diff -u ../../blink/BSDmakefile BSDmakefile > --- ../../blink/BSDmakefile Sat Mar 16 16:48:29 2013 > +++ BSDmakefile Thu Jan 10 19:31:35 2013 > @@ -42,24 +42,24 @@ > #AVRDUDE_PROGRAMMER = stk500 > > ## or for newer boards like the UNO > -UPLOAD_RATE = 115200 > -PORT = /dev/cuaU1 > -AVRDUDE_PROGRAMMER = arduino > +UPLOAD_RATE = 57600 > +PORT = /dev/cuaU0 > +AVRDUDE_PROGRAMMER = avr109 > > ## or this, if you have a usbtiny ISP > #PORT = usb > #AVRDUDE_PROGRAMMER = usbtiny > > -MCU = atmega328p > +MCU = atmega32u4 > F_CPU = 16000000 > > #If your sketch uses any libraries, list them here, eg. > #LIBRARIES=EEPROM LiquidCrystal Wire > -LIBRARIES= > +LIBRARIES=SoftwareSerial > > # Arduino variant, one of: "eightanaloginputs", "leonardo", "mega", > # "micro" or "standard". > -VARIANT = standard > +VARIANT = leonardo > > > ############################################################################ > # Below here nothing should be changed... > @@ -70,6 +70,7 @@ > SRC = wiring.c wiring_analog.c wiring_digital.c \ > wiring_pulse.c wiring_shift.c WInterrupts.c > CXXSRC = HardwareSerial.cpp WMath.cpp Print.cpp WString.cpp \ > + USBCore.cpp HID.cpp CDC.cpp \ > ${LIBRARIES:S|$|.cpp|g} > FORMAT = ihex > > @@ -85,7 +86,7 @@ > OPT = s > > # Place -D or -U options here > -CDEFS = -DF_CPU=$(F_CPU) > +CDEFS = -DF_CPU=$(F_CPU) -DUSB_VID=0x2341 -DUSB_PID=0x00349 > CXXDEFS = -DF_CPU=$(F_CPU) > > # Place -I options here
Cheers Janne, I'll try that tomorrow and let you know how it goes. -- Ville
