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 | }
|