0

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.

Output:

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.
#
# electronut.in

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.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129

1 Answers1

0

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. https://gist.github.com/mrpossoms/abe67ca52978241e7397062b0d05ea73

kirk roerig
  • 371
  • 1
  • 12
  • Great advise, Thanks! I had to add two TABS, one on line 47, one on line 50, as you described. Now it says "Error 127". I'm gonna look into it. `ace@mel:~/Documents/ps/cstuff$ make -f makefileHELPe2 avr-gcc -Wall -Os -DF_CPU=8000000 -mmcu=attiny84 -c main.c -o main.o make: avr-gcc: Command not found makefileHELPe2:24: recipe for target 'main.o' failed make: *** [main.o] Error 127` – GremlinsBane Feb 03 '17 at 15:46
  • Simply missing some necessary packages, I installed them and it worked! Was Missing: gcc-avr, binutils-avr, gdb-avr and avr-libc! – GremlinsBane Feb 03 '17 at 16:05
  • @GremlinsBane Glad to hear it! :) – kirk roerig Feb 03 '17 at 16:12