queezythegreat / arduino-cmake

Arduino CMake Build system
645 stars 216 forks source link

Programmer definition. #43

Open queezythegreat opened 12 years ago

queezythegreat commented 12 years ago

Add dedicated command for adding/changing programmer definitions.

Options:

chffelix commented 10 years ago

Is there any option to set the programmer speed already? I'm trying to use a AVRISP (arduino as ISP) as the programmer and I'm having some trouble, since there is the option to set the port (I'm using /dev/ttyACM0, because I'm using an UNO as programmer) but not an option to set the baud rate to 19200.

chffelix commented 10 years ago

Just complementing my previous post, I ran the "burn" target with VERBOSE=1 and this is what I get:

/opt/arduino/hardware/tools/avrdude -C/opt/arduino/hardware/tools/avrdude.conf -cstk500v1 -P/dev/ttyACM0 -patmega328p -V -Uflash:w:wspm.hex
avrdude: stk500_recv(): programmer is not responding

Note that I needed a -b switch to pass the programmer baud rate to avrdude, but I can't find an option to specify that in arduino-cmake. Any quick solution?

queezythegreat commented 10 years ago

Hi, sorry for the very late response. Was very busy at work for quite some time.

You can use the AFLAGS option. The documentation lists the option, although no examples are given.