Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Make: ***[main.o] error 1
Make: ***[main.o] error 1 [message #1805395] Sat, 13 April 2019 10:46 Go to next message
Abdullah Bahi is currently offline Abdullah BahiFriend
Messages: 1
Registered: April 2019
Junior Member
Hi everyone,

I've just set up eclipse neon 3 to use it for programming AVR microcontroller ATMEGA32, i've Installed winAVR and the AVR plugins, I have also configured AVR dude for uploading the code to my target hardware, everything seems to be okay except that I keep getting this annoying error whenever i attempt to compile any code, for example I've been trying to compile this simple code but the same error pops out.

ERROR MESSAGE:
12:39:06 **** Incremental Build of configuration Release for project flasher ****
make all
Building file: ../main.c
Invoking: AVR Compiler
avr-gcc -Wall -Os -fpack-struct -fshort-enums -ffunction-sections -fdata-sections -std=gnu99 -funsigned-char -funsigned-bitfields -mmcu=atmega32 -DF_CPU=8000000UL -MMD -MP -MF"main.d" -MT"main.o" -c -o "main.o" "../main.c"
make: *** [main.o] Error 1

12:39:06 Build Finished (took 395ms)

THE CODE:
#include <avr/io.h>
#include <util/delay.h>

int main(void)
{
int i=0;

DDRD &=~(1<<PD2);
DDRD |=(1<<PD5);

while(1)
{

if(PIND&(1<<2))
{
PORTD |=(1<<5);
}
else
{
PORTD &=~(1<<5);
}

}

return 0;
}

NOTE: i've Tried compiling the same code on a friend's computer with the same version of eclipse and the same compiler and it was compiled successfully.
Re: Make: ***[main.o] error 1 [message #1805531 is a reply to message #1805395] Tue, 16 April 2019 19:58 Go to previous message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Make error 1 means a command in a recipe returned a nonzero staus.
Usually means it failed.
In your case, that would likely be avr-gcc.
But could be a command with output suppressed.
Don't know why avr-gcc didn't show an error message if it is the culprit.
Try executing it outside of Eclipse in a command terminal.
Previous Topic:Run/Debug not working please help asap
Next Topic:IAR Embedded Workbench for Eclipse
Goto Forum:
  


Current Time: Thu Apr 25 11:24:22 GMT 2024

Powered by FUDForum. Page generated in 0.03069 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top