Go Down

Topic: Arduino Eclipse Plugin <Update> (Read 71809 times) previous topic - next topic

RogerParkinson

Thanks, Jantje, I have it working now and it was simpler than I expected.
I edited the ATTiny info into boards.txt
The ATTiny info I was using has semicolons (;) in the description of the board and that caused a problem
so I had to edit out the semicolons. I also had my ATTiny source files (eg Arduino.h etc) in a directory that
is not under <arduino>/hardware/arduino/cores so I created a link from cores to the correct dir,
there are other ways to make that work but that was my approach.
With that in place the plugin generates the library project correctly for the ATTiny, and a simple program gives me a clean compile.
Roger

RogerParkinson

I have an update on my progress with getting an Attiny building and flashing from the Bayenes plugin.
This is all working now, but I found I needed to separate my usual Arduino directory where I use the IDE, from the one I use with the plugin.
So this is just a file copy. The reason is that I needed to put a link named 'tiny' into <arduino>/hardware/arduino/cores pointing to
<arduino>/hardware/tiny/cores/tiny. With this in place the Arduino IDE no longer works.
It also means my edits of the boards.txt don't need to go into the IDE dir.
This is what I added to boards.txt
Code: [Select]
attiny85at1.name=ATtiny85 @ 1 MHz  (internal oscillator BOD disabled)

# The following do NOT work...
# attiny85at1.upload.using=avrispv2
# attiny85at1.upload.using=Pololu USB AVR Programmer

# The following DO work (pick one)...
attiny85at1.upload.using=arduino:arduinoisp
# attiny85at1.upload.protocol=avrispv2
# attiny85at1.upload.using=pololu
attiny85at1.upload.protocol=stk500v1
attiny85at1.upload.speed=9600

attiny85at1.upload.maximum_size=8192

# Default clock (slowly rising power; long delay to clock; 8 MHz internal; divide clock by 8)
# Int. RC Osc. 8 MHz; Start-up time PWRDWN/RESET: 6 CK/14 CK + 64 ms; [CKSEL=0010 SUT=10]; default value
# Divide clock by 8 internally; [CKDIV8=0]
# Brown-out detection disabled; [BODLEVEL=111]
# Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]

attiny85at1.bootloader.low_fuses=0x62
attiny85at1.bootloader.high_fuses=0xD7
attiny85at1.bootloader.extended_fuses=0xFF
attiny85at1.bootloader.path=empty
attiny85at1.bootloader.file=empty85at1.hex

attiny85at1.build.mcu=attiny85
attiny85at1.build.f_cpu=1000000L
attiny85at1.build.core=tiny

Note that there is no semicolon in the "internal oscillator BOD disabled" (though there is in the distributed version) because the plugin doesn't like it.
Also the "attiny85at1.build.core=tiny" uses the link I already mentioned.
Avrdude works fine flashing the Attiny, using a Teensy 2.0 as the ISP.

I also want to do the same thing with a Teensy. I am stil working on that.

aquadat0r

Hi Jantje,

Thank you for this plugin. I have updated to Juno on Mac OSX and I am suffering form a build error.

Errors occurred during the build.
Errors running builder 'CDT Builder' on project 'Copter'.
Internal error building project Copter configuration Release
java.lang.NullPointerException
Internal error building project Copter configuration Release
java.lang.NullPointerException

Can you please assist?

John

Jantje

Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Ken_C

Jantje,

One of the few nice features in the Arduino IDE is the handling of new boards. We drop a 'hardware' tree in the users Arduino directory and those boards are automaticly showing up in the boards available in the IDE. But it seems the only way to see new boards for the plugin is to edit the IDE master boards.txt. But also seem to have to merge other parts into the Arduino IDE space so the referenced parts are also in the right paths. It would be nice if the plugin could see the tree in the local space and do the merge of the parts too.

Or is that one of those things that Eclipse doesn't do well?? I was looking over many of the posts here and didn't spot mention of that 'system' and 'user' board merge feature difference.

My use of the plugin is for the OpenLCB/NMRAnet project. A number of people who are part of that also use Eclipse for the Java side in the jmri.org project and figuring out how we can share a common environment is what I'm playing with right now. One being Java and the other being C/C++ these are totally different workspaces, but Eclipse would be great to use for both projects.

Hoping to hear your thoughts on this,
-Ken C
Member of JMRI Dev Team
Member of OpenLCB Dev Team

Jantje

Ken
Is there some doc that explains the feature that you describe?
Best regards
Jantje
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Jantje

Johan
Please don't crosspost. You posted this message on 3 different locations with 3 times different levels of details.

Best regards
Jantje
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

aquadat0r

Hi Jantje,

My apologies.

Please find attached my debug from the console during build time.

**** Build of configuration Release for project Testing ****

make all
Building file: /Applications/Arduino.app/Contents/Resources/Java/libraries/NanodeUIP/uip/unix/clock-arch.c
Invoking: AVR Compiler
avr-gcc -I"/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino" -I"/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/variants/standard" -I"/Users/johansmit/Documents/workspace/Testing" -I"/Applications/Arduino.app/Contents/Resources/Java/libraries/NanodeUIP" -D__IN_ECLIPSE__=1 -DARDUINO= -DUSB_PID= -DUSB_VID= -Wall -Os -g -mmcu=atmega328p -DF_CPU=16000000UL -MMD -MP -MF"NanodeUIP/uip/unix/clock-arch.d" -MT"NanodeUIP/uip/unix/clock-arch.d"  -c -o "NanodeUIP/uip/unix/clock-arch.o" "/Applications/Arduino.app/Contents/Resources/Java/libraries/NanodeUIP/uip/unix/clock-arch.c"
/Applications/Arduino.app/Contents/Resources/Java/libraries/NanodeUIP/uip/unix/clock-arch.c:42:22: warning: sys/time.h: No such file or directory
/Applications/Arduino.app/Contents/Resources/Java/libraries/NanodeUIP/uip/unix/clock-arch.c: In function 'clock_time':
/Applications/Arduino.app/Contents/Resources/Java/libraries/NanodeUIP/uip/unix/clock-arch.c:48: error: storage size of 'tv' isn't known
/Applications/Arduino.app/Contents/Resources/Java/libraries/NanodeUIP/uip/unix/clock-arch.c:49: error: storage size of 'tz' isn't known
/Applications/Arduino.app/Contents/Resources/Java/libraries/NanodeUIP/uip/unix/clock-arch.c:51: warning: implicit declaration of function 'gettimeofday'
/Applications/Arduino.app/Contents/Resources/Java/libraries/NanodeUIP/uip/unix/clock-arch.c:49: warning: unused variable 'tz'
/Applications/Arduino.app/Contents/Resources/Java/libraries/NanodeUIP/uip/unix/clock-arch.c:48: warning: unused variable 'tv'
make: *** [NanodeUIP/uip/unix/clock-arch.o] Error 1

**** Build Finished ****

Regards,
John

Jantje

John

As I see it the time.h file should define some stuff. Due to the absence this generates errors later on.
If this compiles fine in the Arduino IDE there must be a different command line between the arduino IDE and eclipse.
I would advice to look at the Arduino IDE verbose build output and see the compile instruction used to compile clock-arch.c. There must be a difference in the command line. If you want me to have a closer look please post the Arduino IDE command to compile clock-arch.c.
What I can see from the eclipse output is:

Quote
-DARDUINO=

The Arduino version is unknown. This points to a problem in your configuration. Please check the windows->preferences->arduino->arduino settings. This may explain your problem.

Quote
/Applications/Arduino.app/Contents/Resources/Java/libraries/NanodeUIP/uip/unix/clock-arch.c:

I don't know this environment but you are on a mac and you are using unix code. This may be perfectly alright but it is not a standard arduino ide installation. Currently the eclipse plugin only supports the standard Arduino IDE. If you installed extensions they may not work "out of the box".

Best regards
Jantje
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

aquadat0r

#174
Aug 20, 2012, 07:29 pm Last Edit: Aug 20, 2012, 08:59 pm by aquadat0r Reason: 1
Hi Jantje,

Thank you. I do agree that it must be something to do with the command line. Please have a look at the attached Arduino IDE debug output. I do not see any compilation for clock-arch.c.

All these files come standard with the NanodeUIP library, and I do not think that I have anything out of the ordinary in my installation. I have fixed the -DARDUINO=1.01 tag as well, with no success.

It seems that the ArduinoIDE is omitting compiling the unix stuff, I just don't know why.

Perhaps you can try to build this library with your setup just by including NandodeUIP? https://github.com/sde1000/NanodeUIP

Jantje

John
The Eclipse plugin does not care about makefiles. It makes it's own makefilesfor each and every folder in the project.
To exclude a folder from the build: right click the folder->Resouce configurations->exclude from build and make sure release (there should ony be release) is selected.
Best regards
Jantje
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

aquadat0r


John
The Eclipse plugin does not care about makefiles. It makes it's own makefilesfor each and every folder in the project.
To exclude a folder from the build: right click the folder->Resouce configurations->exclude from build and make sure release (there should ony be release) is selected.
Best regards
Jantje


Hi Jantje,

Thank you, I excluded one or two folders and my code is now building successfully. I'm also able to upload with my serial port set as /dev/tty.PL2303-00002014 with no problems.

Next, I'm trying to get the serial monitor to work, however the port selection dropdown is empty. I tried to add this to the eclipse config but it did not work so I removed it again.

Any ideas?

Thank you

Jantje


Any ideas?

I updated the FAQ.
I also closed the issue you created on Github

Jantje
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

orangeLearner

I am using Eclipse C++ Juno as well and I successfully uploaded a blink sketch to my Arduino Nano 328. I can change the blink interval. However, it was a long and arduous setup process. I followed this tutorial but after the build process was finished, I believe it succeeded but it gives

Errors occurred during the build.
Errors running builder 'CDT Builder' on project 'Basic_blink_eclipse'.
Internal error building project Basic_blink_eclipse configuration Release
java.lang.NullPointerException
Internal error building project Basic_blink_eclipse configuration Release
java.lang.NullPointerException

When I want to upload, I hit the Upload to AVR button, then it complains that the serial port is in use when it really is not. I press OK then it uploads fine. Overall it works but having to click four buttons to upload code is a bit annoying.

Jantje

orangeLearner
I'm sorry to hear you had such a hard time to install the plugin. Not sure what has cost you so much effort as most people succeed in installing the plugin in less than half an hour. Mac 64 bit with Juno is the most challenging environment though.
About the 2 remaining issues.
The error during build.
As you are running eclipse Juno you should upgrade to the latest version of the plugin. That should fix the issue. Note that you will need to create new projects as the existing ones contain "a bug" which is not cleaned.
To clear "the bug" manually see the comment of bgolenko at https://github.com/jantje/arduino-eclipse-plugin/issues/12

The upload problem.
This is a pure mac related problem where Peter send me a good solution.
I've added the solution to my FAQ which you can find at http://eclipse.baeyens.it/Arduino%20eclipse%20plugin%20FAQ.htm#MAC_Lock

Best regards
Jantje
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Go Up