rgoel / optiboot

Automatically exported from code.google.com/p/optiboot
0 stars 0 forks source link

make *_isp fails due to trailing spaces in FUSE settings #17

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The comments after the fuse settings in the Makefile cause a trailing space to 
appear in the avrdude command. This causes an error in how the input file (0xDD 
say) is interpreted - should be immediate, but defaults to looking for a file.

lilypad_isp: HFUSE = DD # 2.7V brownout

HFUSE gets "DD<space>" resulting in the following avrdude command:

avrdude -c usbtiny -p atmega168 -P usb -B1  -e -u -U lock:w:0x3f:m -U 
efuse:w:0x04 :m -U hfuse:w:0xDD :m -U lfuse:w:0xE2 :m

and the error:

avrdude: verifying ...
avrdude: 1 bytes of lock verified
avrdude: reading input file "0x04"
avrdude: error opening 0x04: No such file or directory
avrdude: input file 0x04 auto detected as invalid format
avrdude: can't open input file 0x04: No such file or directory
avrdude: write to file '0x04' failed

Fix is to put the comments on the preceding line and ensure that there are no 
trailing spaces after the fuse setting:

    # set high fuse - 2.7V brownout
lilypad_isp: HFUSE = DD

See also http://www.makelinux.net/make3/make3-CHP-3.html

Using GNU Make 3.81 on OS-X 10.6

Original issue reported on code.google.com by peteh...@gmail.com on 1 Oct 2010 at 2:16

GoogleCodeExporter commented 8 years ago
Fixed in source repo

Original comment by cathed...@gmail.com on 12 Oct 2010 at 8:23