So, veränderter Code:
Code:
#include <avr/io.h>

void wait(int x);

int main(void)
{
      
    while(1)
    {
    PORTC = ~PORTC;
    wait(10000);
    }

}
void wait(int x)
{
   while(x)x--;
}
Output:
rm -rf knightrider.o knightrider.hex dep/ knightrider.hex knightrider.eep
Build succeeded with 0 Warnings...
avr-gcc -mmcu=atmega32 -Wall -gdwarf-2 -O0 -Wp,-M,-MP,-MT,knightrider.o,-MF,dep/knightrider.o.d -c ../knightrider.c
avr-gcc -mmcu=atmega32 knightrider.o -o knightrider.elf
avr-objcopy -O ihex -R .eeprom knightrider.elf knightrider.hex
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 -O ihex knightrider.elf knightrider.eep
Build succeeded with 0 Warnings...