Fix lỗi make: *** [main.o] Error 1

Dear All
I'v used Eclipse to create a simple AVr application for ATMEGA8A, but after compiling the code i got an errors which is generated with any avr application coded by the Eclipse,so pls help to solve these errors my code is

#include <avr/io.h>
int main()
{
   DDRC |= 1<<PC0;
   while(1)
   {
	 PORTC0 ^= 1<<PC0;
   }
}
and the errors are

make: *** [LedOnOff.o] Error 1
recipe for target 'LedOnOff.o' failed

and the details for the auto generated make file ,which contain the errors belong to subdir.mk file

################################################################################
# Automatically-generated file. Do not edit!
################################################################################

# Add inputs and outputs from these tool invocations to the build variables
C_SRCS += \
../LedOnOff.c

OBJS += \
./LedOnOff.o

C_DEPS += \
./LedOnOff.d

# Each subdirectory must supply rules for building sources it contributes
%.o: ../%.c
@echo 'Building file: $<' "the error is here"
@echo 'Invoking: AVR Compiler'
avr-gcc -Wall -Os -fpack-struct -fshort-enums -ffunction-sections -fdata-sections -std=gnu99 -funsigned-char -funsigned-bitfields -mmcu=atmega8a -DF_CPU=16000000UL -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -c -o "$@" "$<"
@echo 'Finished building: $<'
@echo ' ' 

and the toolchain configuration as below

AVR-GCC C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin

GNU Make C:\Program Files (x86)\Atmel\Studio\7.0\shellutils

AVR Header Files C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include

AVRDude C:\Program Files (x86)\Arduino\hardware\tools\avr\bin

many thanks:

Source: www.avrfreaks.net

Nhận xét

Mới hơn Cũ hơn