GremlinsBane GremlinsBane - 4 years ago 174
C Question

Trying to blink an LED with C

Possibly a stupid question. But I've been digging through this code (and stack overflow for answers) for a couple days now, and all I've determined is that I have an error with line 68, or a line that effects it.


me@mycpu:~/Documents/ps/cstuff$ make -f makefileEDIT

makefileEDIT:68: *** missing separator. Stop.

I'm using gcc in Ubuntu. Programmer gadget is an AVRISP II, working with an Atmel AtTiny 84

Top of the code that didn't fit in the selection:

# Name: Makefile
# A simple program for the ATtiny84 that blinks an LED.

DEVICE = attiny84
CLOCK = 8000000
PROGRAMMER = -c avrisp2
OBJECTS = main.o

Picture Of Code

And, yes, I totally copied this code from a tutorial site and changed the name of the programmer to match what I have. And I've been reading general info online about this stuff (and I've learned a bit about it so far), but no go.

Answer Source

Your tabs are all screwed up. The first line of each makefile recipe (such as "load: all", "clean:", "cpp:" or "main.hex: main.elf") needs to NOT be indented, however any commands that they run, such as "rm -f main.hex" needs to be indented ONCE with a tab character specifically.

Try this file, make sure your text editor doesn't convert the tabs to spaces.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download