I hope this is the right place for this.
I am new to the Ardiuino (although I have a background in software
development). I just purchased an Arduino Uno with an ATMEGA328P-PU. I can
connect it to my computer and load the Blink sketch from the Arduino IDE and
it runs automatically. I would really rather use Eclipse though. So I
installed the necessary plugins based no this page
(Arduino Playground - Eclipse) and have corroborated my
configurations with any other tutorials I can find.
The problem is that when I compile and upload my program to the Arduino, it
doesn't do anything despite avrdude indicating that it finished successfully.
I have also added verbose logging to the Arduino IDE and it looks like the
commands it calls are very similar to what eclipse is doing. See test program
and outputs below. If there is any other information I can provide, please let
me know. Thanks in advance.
The test program file looks like this:
#include <WProgram.h>
#include <arduino.h>
int main(void)
{
init();
pinMode(13, OUTPUT);
digitalWrite(13, HIGH); // set the LED on
for (;;) {
digitalWrite(13, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(13, LOW); // set the LED off
delay(1000); // wait for a second
}
return 0;
}
code tags added by moderator
(Basically a copy paste from the example sketch with an added main). When I
build it I see this:
**** Build of configuration Release for project Blink ****
make all
Building target: Blink.elf
Invoking: AVR C++ Linker
avr-g++ -s -Os -Wl,--gc-sections -o"Blink.elf" ./main.o -lArduinoCore -lm -
Wl,-Map,Blink.map,--cref -L../../ArduinoCore/Release/ -mmcu=atmega328p
Finished building target: Blink.elf
Create Flash image (ihex format)
avr-objcopy -R .eeprom -O ihex Blink.elf "Blink.hex"
Finished building: Blink.hex
Invoking: Print Size
avr-size --format=avr --mcu=atmega328p Blink.elf
AVR Memory Usage
Device: atmega328p
Program: 1456 bytes (4.4% Full)
(.text + .data + .bootloader)
Data: 9 bytes (0.4% Full)
(.data + .bss + .noinit)
Finished building: sizedummy
Which is what I understand it is supposed to look like.
Upload looks like
this:--------------------------------------------------------------------------------------------
Launching /usr/bin/avrdude -pm328p -carduino -P/dev/ttyACM0 -b115200 -D -
Uflash:w:Blink.hex:a
Output:
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e950f
avrdude: reading input file "Blink.hex"
avrdude: input file Blink.hex auto detected as Intel Hex
avrdude: writing flash (1456 bytes):
Writing | ################################################## | 100% 0.27s
avrdude: 1456 bytes of flash written
avrdude: verifying flash memory against Blink.hex:
avrdude: load data flash data from input file Blink.hex:
avrdude: input file Blink.hex auto detected as Intel Hex
avrdude: input file Blink.hex contains 1456 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.21s
avrdude: verifying ...
avrdude: 1456 bytes of flash verified
avrdude done. Thank you.
avrdude finished
Why is it that it doesn't run anything start running? (I see the LEDs flash to
indicate a serial connection but then nothing)