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.

Microcontroller Programming » Problem loading a program to microcontroller

May 11, 2011
by drummingbum
drummingbum's Avatar

I am trying to load a new program and I can't seem to do it. It worked just fine when I got the kit about a month and a half ago. I haven't used it for about 2 weeks and now I am trying to get it working again. Here is the error from the terminal.

avrdude -c avr109 -p m168 -b 115200 -P COM5 -U flash:w:initialload.he

Connecting to programmer: . Found programmer: Id = "9 ""; type = Software Version = . ; Hardware Version = . avrdude: error: buffered memory access not supported. Maybe it isn't a butterfly/AVR109 but a AVR910 device? make: *** [initialload-upload] Error 1

I checked the ports and changed it in the make file and I'm following the directions of how to load the program onto the chip. Is there anything from this error that you can make sense of? Thanks.

May 11, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi drummingbum,

Most likely this is due to a loose or missplaced wire, or a dying battery. First thing I would do is try a new battery and double check all your wires to make sure none have popped out in the last two weeks. If you include a good close up picture of your setup we might be able to help you spot what is going on.

Humberto

May 11, 2011
by drummingbum
drummingbum's Avatar

I tried to get a picture but my phone is being difficult. Anyways I check all of the connections and tried a new battery but I'm still getting the same thing.

GCCFLAGS=-g -Os -Wall -mmcu=atmega168 
LINKFLAGS=-Wl,-u,vfprintf -lprintf_flt -Wl,-u,vfscanf -lscanf_flt -lm
AVRDUDEFLAGS=-c avr109 -p m168 -b 115200 -P COM5
LINKOBJECTS=../libnerdkits/delay.o ../libnerdkits/lcd.o ../libnerdkits/uart.o

all:    initialload-upload

initialload.hex:    initialload.c
    make -C ../libnerdkits
    avr-gcc ${GCCFLAGS} ${LINKFLAGS} -o initialload.o initialload.c ${LINKOBJECTS}
    avr-objcopy -j .text -O ihex initialload.o initialload.hex

initialload.ass:    initialload.hex
    avr-objdump -S -d initialload.o > initialload.ass

initialload-upload: initialload.hex
    avrdude ${AVRDUDEFLAGS} -U flash:w:initialload.hex:a

Here is my make file. I haven't changed anything in it except for the port and re-downloaded it from the site to make sure it wasn't a problem with this.

May 11, 2011
by Ralphxyz
Ralphxyz's Avatar

drummingbum, like Humberto said it is usually a loose wire or weak battery.

You can search the forums for "butterfly" to see all of the discussions.

If you have a new battery the easiest thing to do is to strip the breadboard and start over.

You can do it wire by wire but I find just starting over from scratch is the best method.

Ralph

May 11, 2011
by drummingbum
drummingbum's Avatar

I reassembled the kit and I am still getting the same error. I'm not really sure what I should do at this point. It worked perfectly before and was able to flash many programs to it. I have a new battery so that's not the problem.

Post a Reply

Please log in to post a reply.

Did you know that NerdKits has a TV commercial, seen on MythBusters and the Science Channel? Learn more...