Sorry, I forgot that you first have to copy the makefile into the same directory as the source code with
cp linux/Makefile .
Then, run make from the source directory and it should work.
-Paul
Sorry, I forgot that you first have to copy the makefile into the same directory as the source code with
cp linux/Makefile .
Then, run make from the source directory and it should work.
-Paul
WORKS! now, how dose your makefile looks like when you added the lcd functions? I saw the output of your make command and saw the lcd.o there…
Arbel
To make it compile lcd.c along with BlinkLED.c, you need to change the section beginning with “%.obj” to
BlinkLED.obj : BlinkLED.o lcd.o
$(CC) $(CFLAGS) BlinkLED.o lcd.o -o $@
I forgot to mention when I said this last time: you need to be sure to use a TAB instead of a bunch of spaces before the second line, or you will get an error message.
Can you also just try running the commands that I listed by typing them directly at the command prompt? I think it will help you understand what is going on if you run those commands directly instead of relying on the makefile - at each step, you can check what new files were created, what errors appeared, etc. Then, when you really know what the commands do, you will be able to understand the makefile better.
-Paul
HAHA!!!
thank you!!!
it’s working!
I added buzzer and lcd! thank you for the patient!
Arbel
So, to make things work, you will need to do few things:
CC=/usr/bin/avr-gcc
MEGA=168
CFLAGS=-g -Os -Wall -mcall-prologues -mmcu=atmega$(MEGA)
OBJ2HEX=/usr/bin/avr-objcopy
PROG=/usr/bin/avrdude
TARGET=gridder
program : $(TARGET).hex
$(PROG) -c avrispmkII -p m$(MEGA) -P usb -e
$(PROG) -c avrispmkII -p m$(MEGA) -P usb -U flash:w:$(TARGET).hex
%.obj : %.o
$(CC) $(CFLAGS) $< -o $@
$(TARGET).obj : $(TARGET).o pwm.o servo.o lcd.o buzzer.o
$(CC) $(CFLAGS) $(TARGET).o pwm.o servo.o lcd.o buzzer.o -o $@
%.hex : %.obj
$(OBJ2HEX) -R .eeprom -O ihex $< $@
clean :
rm -f *.hex *.obj *.o
Wine 1.0 was just released today, maybe worth another shot with AVR Studio?
I’ll try sometime this week, but first I should probably update my Ubuntu dual-boot machine, I think it’s still running Feisty.
-Adam
avrdude is working perfect! now avrStudio seems not so friendly…