NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Support Forum » avrdude reading, compiling but not writing to MCU

December 16, 2012
by keith712
keith712's Avatar

i have not been able to program either of my nerdkits since i built a second kit with an atmega328 chip. the closest i've gotten to a successful compile has the following terminal massages:

k712:dip_add_nerdkits k712$ make

avrdude -c avr109 -p m168 -b 115200 -P /dev/cu.usbserial -e

Connecting to programmer: . Found programmer: Id = "FDL v02"; type = S

Software Version = 0.2; No Hardware Version given.

Programmer supports auto addr increment.

Programmer supports buffered memory access with buffersize=128 bytes.

Programmer supports the following devices:

Device code: 0x35

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9406

avrdude: erasing chip

avrdude done. Thank you.

sleep 1.0 avrdude -c avr109 -p m168 -b 115200 -P /dev/cu.usbserial -D -U flash:w:[program name].hex:a

Connecting to programmer: .

Found programmer: Id = "FDL v02"; type = S

Software Version = 0.2; No Hardware Version given.

Programmer supports auto addr increment.

Programmer supports buffered memory access with buffersize=128 bytes.

Programmer supports the following devices:

Device code: 0x35

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9406

avrdude: reading input file "[program"

avrdude: error opening [program: No such file or directory

avrdude: input file [program auto detected as invalid format

avrdude: can't open input file [program: No such file or directory

avrdude: read from file '[program' failed

avrdude done. Thank you.

make: *** [dip_arithmetic-upload] Error 1

A LITTLE HISTORY: i've been moving my project folders and the libnerdkits folders (i have two copies: one for the atmega168 and one for the atmega328p) around trying to keep everything organized. i've also been getting file not found and constants referenced before definition errors during compilation. also i'm programming my kits with a mac osx 10.8.2

thanks for any guidance, keith

December 16, 2012
by Noter
Noter's Avatar

This line in your make file

avrdude -c avr109 -p m168 -b 115200 -P /dev/cu.usbserial -D -U flash:w:[program name].hex:a

is telling avrdude the file name is "[program name].hex". You need to edit the make file to use the correct file name of the .hex file.

December 16, 2012
by keith712
keith712's Avatar

thank you... i'm glad you can't see how red my face is...

December 16, 2012
by keith712
keith712's Avatar

i just wanted to add:

this is an example of trying to do too many things at once and then not having a clue what an error is due too...

i'm getting a new and different error: is it the modified code, is it the modified makefile, is it my new nesting of the folders, is it my new libnerdkits???

be scientific... make one change at a time... then the problem can be traced to the one change without guessing...

thanks again, Noter

December 16, 2012
by Noter
Noter's Avatar

Yep, fewer changes at at time makes it easier to keep track of things. After a while your finger will get tired of switching the run/program/reset sequence and you may want to look into an ISP programmer because with it there is no manual switching so it's much easier to compile/load/test every step of the way.

December 16, 2012
by keith712
keith712's Avatar

your eagle eye fixed all the errors... thanks again... i'm not familiar with ISP programmers... i use IDLE when i write in Python... do you have an ISP for macs you would recommend... k

December 16, 2012
by Noter
Noter's Avatar

An ISP programmer is an alternative to the Nerdkits usb cable and bootloader. Just a different way of getting the hex file onto the chip that doesn't require use of the manual program/run switch or reset. Do it the nerdkit way for a time and when you're ready, search the forum for ISP Programmer, there's a lot of information posted. The library has a couple of articles too.

December 16, 2012
by keith712
keith712's Avatar

thanks again... k

Post a Reply

Please log in to post a reply.

Did you know that you can build an analog amplifier with one transistor and a few resistors? Learn more...