Forum: Mikrocontroller und Digitale Elektronik No rule to make target `main.elf', needed by `elf'


von Patrick R. (pat711)


Angehängte Dateien:

Lesenswert?

Abend zusammen,

wenn ich mein c - Programm zu compilieren versuche kommt in der ausgabe 
folgendes:

> "make.exe" all

-------- begin --------
avr-gcc (WinAVR 20090313) 4.3.2
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is 
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
PURPOSE.

make.exe: *** No rule to make target `main.elf', needed by `elf'.  Stop.

> Process Exit Code: 2
> Time Taken: 00:00

und ich komm einfach nicht drauf wo mein fehler liegt. Kann mir vll 
jemand helfen?
1
#include <avr/io.h>
2
#include <avr/eeprom.h>
3
#include <avr/interrupt.h>
4
#include <inttypes.h> // wird in aktuellen Versionen der avr-lib mit xx.h eingebunden
5
 
6
// EEMEM wird bei aktuellen Versionen der avr-lib in eeprom.h definiert
7
// hier: definiere falls noch nicht bekannt ("alte" avr-libc)
8
#ifndef EEMEM
9
// alle Textstellen EEMEM im Quellcode durch __attribute__ ... ersetzen
10
#define EEMEM  __attribute__ ((section (".eeprom")))
11
#endif
12
 
13
uint8_t myByte1 = 0;
14
uint8_t myByte2 = 0;
15
uint8_t eeFooByte;
16
17
int main (void)
18
{
19
  DDRD = 0xFF;
20
  myByte1 = eeprom_read_byte(&eeFooByte);
21
  myByte2 = eeprom_read_byte(&eeFooByte);
22
  if  (myByte1 == 1 && myByte2 == 1)
23
  {
24
    PORTD = 0xFF;
25
    myByte1 = 0;
26
    myByte2 = 0;
27
    eeprom_write_byte(&eeFooByte, myByte1);
28
    eeprom_write_byte(&eeFooByte, myByte2);
29
  }
30
  else
31
  {
32
    PORTD = 0x08;
33
    myByte1 = 1;
34
    myByte2 = 1;
35
    eeprom_write_byte(&eeFooByte, myByte1);
36
    eeprom_write_byte(&eeFooByte, myByte2);
37
  }
38
}

von hp-freund (Gast)


Lesenswert?

Hallo Patrick,

ich habe zwar avr-gcc 4.4.0 mit Linux, aber nach 2 Korrekturen im 
Makefile läuft es bei mir:

1. Zeile 83 -> wird die lcd-routines.c benutzt/ist sie vorhanden? Wenn 
nicht aus der Zeile entfernen!

2. Zeile 414 ELFSIZE = $(SIZE) $(TARGET).elf ohne weitere Parameter dann 
funktionierts...

...
hp-freund

von Patrick R. (pat711)


Lesenswert?

cool Linux ^^ würd ich au gern verwenden aber da läuft so wenig ... :(

ok vielen dank ^^


MfG Pat

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.