Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[AVR] Eclipse Compiling error with AVR

Status
Not open for further replies.

6TheNightWhisper9

Newbie level 6
Newbie level 6
Joined
Mar 7, 2018
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
90
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


Code C - [expand]
1
2
3
4
5
6
7
8
9
#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
 

Are you compiling only, or are you also trying to download/run/debug this program ? I would bet there are more than one programs attempting to make access to this file at same time, e.g compiler and debugger; just guessing.
 

The "make" utility can't find the source file LedOnOff.c
As the compile rule is written, that file must be located in the directory above the one where LedOnOff.o will be generated.
 

The "make" utility can't find the source file LedOnOff.c
As the compile rule is written, that file must be located in the directory above the one where LedOnOff.o will be generated.

Hi my friend
I put LedOnoff.c in all the folders belong to the project, but i've got the same error
 

Are you compiling only, or are you also trying to download/run/debug this program ? I would bet there are more than one programs attempting to make access to this file at same time, e.g compiler and debugger; just guessing.

Hi My friend
I compiling only a release version without debug ,also enabled avrdude to burn the generated hex file
 

The output from compilation seems too short.
Try invoking make in verbose mode, it should be something like that:

Code:
make V=1
 

The purpose of this statement is not to elliminate the error itself, but rather to change compilation output to verbose mode, which at first sight could give more details on the error reason.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top