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 » initialload.hex error 1?

January 25, 2011
by Elementell
Elementell's Avatar

I feel a bit dumb, I've already had to ask for help once and its the first tutorial, but I can't seem to figure out why my program isn't running. I'm not getting any of the errors the troubleshooting area on the guide explains. Here's a picture of the error I get, hopefully you can shed some light on my ignorance. I've been reading through some other threads and they said it could be an incorrect COM port. I have it set to COM1, but I wasn't able to find the LPT & COM menu in device manager, I've got pictures of those too Command line screencap Command line screencap Command line screencap

January 25, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi Elementell,

I suspect there might be something missing in your Makefile. Looking at the avr-gcc line in your command line error you posted it doesn't have the linked object files to lcd.o and delay.o I would normally expect it to have. Take a look at your Makefile to make sure you didn't accidentally delete the LINKEDOBJECTS line. If you are still having issues go ahead and post your Makefile so we can take a look.

Humberto

January 28, 2011
by Elementell
Elementell's Avatar

Great, I fixed that, now I get another error. error Here is my makeFile, if its any use being all jumbled up.

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 COM1 LINKOBJECTS=../libnerdkits/delay.o ../libnerdkits/lcd.o ../libnerdkits/uart.o

all: led_blink-upload

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

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

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

January 29, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi Elementell,

It looks like the issue here is that you modified the Makefile for the initialload project, but you left it in the initialload folder. Now the the makefile is looking for led_blink.c inside the initialload older and it is not there. You need to put the Makefile for led_blink project inside the led_blink folder. I believe the led_blink folder already has a Makefile inside it, so you should not have to modify anything to get the led_blink project up.

Humberto

January 29, 2011
by Elementell
Elementell's Avatar

Sorry, I figured all makefiles were the same, and they just compiled the code. Anyways, I redownloaded the project codes, and here is the edited makefile: (I have the same problem as before, hex error 1)

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 COM1LINKOBJECTS=../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
January 29, 2011
by Linkster
Linkster's Avatar

Elementel, AVRDUDEFLAGS should end with com1 and LINKOBJECTS should start a new line. Should look like this,

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 com1
LINKOBJECTS=../libnerdkits/delay.o ../libnerdkits/lcd.o ../libnerdkits/uart.o

Just my observation. Maybe it's just the way it pasted.
Gary

January 30, 2011
by Elementell
Elementell's Avatar

I did what linkster said, and I get an initialload-upload error: 1 message. It can't find the COM, which I guess means I had the wrong port. I don't think the driver installed correctly, even though I installed it twice.

January 31, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi Elementell,

Could you post your new Makefile just to make sure that is right too. Did you verify the COM port with using the Device Manager?

You mentioned you dont think the driver installed correctly, is there a reason you think so, are you getting some error on the install?

Humberto

January 31, 2011
by Elementell
Elementell's Avatar

In the picture above it says the drivers aren't installed. I ran the installer a third time, I wasn't given an error like the other two, but after restarting and checking again it says the driver software still isn't installed. Also in the picture it says location:Port # 0001, that's what I used to find the COM since I didn't find the LPT / COM menu in the device manager.

Here is my makefile:

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 COM1
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
January 31, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi Elementell,

I definitely had not noticed those details in your pictures, I was just focusing on the command line errors. It definitely seems like the issue is with the Cable driver. Is this windows 7? You might have better luck using the cable driver in that mike pointed to in this thread.

Humberto

February 05, 2011
by Elementell
Elementell's Avatar

I installed the alternate driver no problem, but it still doesn't detect it at all. I just get this window: Driver failure message

February 05, 2011
by Elementell
Elementell's Avatar

Nevermind, I reinstalled the alternate driver and it worked, but how do I find a port that is below COM5 I have 8 ports on my computer, and they're COM 6-12

Post a Reply

Please log in to post a reply.

Did you know that there are Power MOSFETs for switching big loads on and off? Learn more...