Go Down

Topic: Windows/Linux/Mac Eclipse plugin to compile and upload arduino sketches (Read 495530 times) previous topic - next topic

dajt

Awesome project! I've been looking for something like this for ages. Using the CDT to get all the C++ analysis and navigation is fantastic and way better than the other replacements for the official IDE.

I used the pre-packaged version rather than the plugin to an existing eclipse.

I wanted to make a change to the serial monitor - have the option of printing a timestamp before each message like the official IDE can do.

I've forked, cloned, and built according to the instructions in the readme.md file under the heading "Developing (Improving) the Plugin".

I'm stuck after that.

1. I don't understand the instruction "After the build, find the Sloeber SDK product in the io.sloeber.product.sdk target directory. Unzip it somewhere in your home directory (mind you we cannot handle very long path names on windows)"

I found io.sloeber.product.sdk-4.3.3-SNAPSHOT.zip in C:\Users\dajt\Documents\GitHub\arduino-eclipse-plugin\io.sloeber.product.sdk\target -  is that the zip referred to? I unzipped it in C:\Users\dajt\io.sloeber.product.sdk but can't see what this achieves. Am I supposed to bring it into Eclipse somehow?

2. I imported the git repo into eclipse according to the instructions after the above, and installed some JS development nature it wanted. But there are masses of "cannot be resolved" errors in the source code. I assumed the git repo I was meant to import was the one I forked and cloned, but my project list doesn't look like the one in the instructions. I have a bunch of io.sloeber... projects.

io.sloeber.application, io.sloeber.core, io.sloeber.tests, io.sloeber.ui projects all have errors.

Where have I gone wrong?



Jantje

dajt
Thanks for the nice words and thanks for trying to help out.


Basically the SDK project is the development environment single install for Sloeber.
Once you started the SDK you need to import the sloeber code.
A couple of months ago I used this method to get a development environment on Linux and that worked fine.
From the looks of it you did good. Its hard to say where it went wrong without exact error messages.
Best place to discuss is @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 -

Juraj

I debug it as a plugin and I think the build of SDK is not used for it.
@dajt, did you import subprojects?

speedfixer

Lubuntu (Ubuntu  flavor) - 18.04
pc

Arduino 1.8.12 works fine.

---------------

Sloeber on network drive

'Installed' package 4.4.3 64bit from website.

Eclipse starts fine.
Chose file/cpp. Template showed up ok.

Basically, I just put the lines of the 'blink' example in. Result:


Code: [Select]
mnt/linux/installs/Sloeber//arduinoPlugin/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino5/bin/avr-gcc-ar: Cannot find plugin 'liblto_plugin.so'
makefile:73: recipe for target '/rdkl/ardproj/tbb/Release/arduino.ar' failed


I see the makefile line where the fail happened.

Lots of web searching.
I have seen that this problem (Cannot find plugin 'liblto_plugin.so') is most often a mismatched xxx-ar version, bad path, or multiple toolset installations. I don't think these are my problems, but have no way to verify any of that. It is a 'not found' message, not a 'mismatch" or 'wrong version' message.

How to set/verify the path?
How can I even dump a very verbose run to see where ar is trying to find this lib?

I did copy the Sloeber supplied liblto_plugin.so.0.0.0 to the project directory and Sloeber .../bin directory. No difference.

Any suggestions will be appreciated.
While it hasn't worked for me yet, I see and appreciate the effort. I have confidence this is what I want to use (I used Eclpise in the past) and trust others' good words about Sloeber. I need the flexibility for multiple non-Arduino libraries NOT attached to a single program/project.

Is there an env var I can set? Create a link? Hit it with a stick?

BTW, is there another donation method that can be used? Could that be mentioned on your website?


david
If you don't try - you lose - A U T O M A T I C A L L Y

Jantje

David

I'm not sure what you are experiencing. I run tests on linux and about  boards work fine on linux.
This includes all Arduino provided boards.
You can look at the all environment variables (including the path) in project properties->C/C++ build->environment.
if you set the path at a terminal you should be able to launch the make from the release folder.
Basically the magic goes as follows
Arduino provides framework. Board providers provide framework data. Sloeber converts framework data to CDT data. CDT/Sloeber convert CDT data to makefile. CDT launches make. make does build. CDT parses make output.
Your problem seems to originate in make does build. Which means there is a problem with the build or CDT didn't provide the correct environment for make (because Sloeber ...)
If you don't get this to work (or found the issue) please report on github. It is lots easier to discuss.
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 -

speedfixer

Thank you. I will try to fake up the path/env and try the terminal. (First I will try on another system.)

david
If you don't try - you lose - A U T O M A T I C A L L Y

jim_s

OMG, Wow!  I didn't realize that Sloeber was maybe coming back to life?!?  That would be the best news in a long time!!!

I was much distressed recently when I tried to fire up my old copy of Sloeber (v4.2) on my Mac, and discovered that the AVR toolchain was no longer working due to it being a 32-bit program.

I was ecstatic to discover v4.3.3, but had initially run into a problem (this is an update to this post, where I was describing those problems), but after further RTFM'ing at (http://eclipse.baeyens.it/stable.php?OS=MacOS#), and following those instructions exactly, Sloeber 4.3.3 is running like a champ on my Mac - this is absolutely AWESOME!!

Thanks to Jantje and whomever else was involved in getting this going for the latest version of Mac OS!  Please let us know if we can help with anything, in any way, to keep this great tool alive and well - it far surpasses anything else I've tried (PlatformIO, Visual Studio Code, Arduino Pro IDE. Chapeau! to the Eclipse folks for working on the new Arduino Pro IDE, but I wonder why they didn't use Sloeber as the base for that??...)

Happy Day!!!!

Jantje

@jim_S
Thanks for the nice words.
it have been some rough years for me. Seems I survived (against all odds ;-) )
Yes, the mac security constraints don't make opensource life easier. Most annoying part for me was that I don't own a mac (and I don't want one).
It took some time to understand constraints and workaround them.
And yes, the instructions are really important.

>. Chapeau! to the Eclipse folks for working on the new Arduino Pro IDE, but I wonder why they didn't use Sloeber as the base for that??...)

Is the arduino pro IDE based on eclipse?

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 -

Juraj

Is the arduino pro IDE based on eclipse?

no. it uses some technologies by Eclipse, but not the classic Eclipse IDE or the SWT framework

Jantje

Thanks
eclipse che I would guess. I never understood what the benefits are for a professional IDE on the web.
Lots of people have a different view.
Future will tell
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 -

jim_s

The Arduino Pro IDE is based on Eclipse Theia, so while it runs as Javascript (Typescript), HTML and CSS within an included Chromium browser (via the Electron framework), it runs as a desktop app vs a cloud app.

Theia seems to be much more in the vein of VS Code than the full-on classic Eclipse IDE, though the Arduino Pro IDE seems to go to some lengths to hide much of the underlying environment. (Which I get - I'm sure this makes it more appealing and approachable to a wider audience.)  As a long-time Eclipse user, though, I like being able to see and work with the internals at times.

It is noteworthy that the Arduino Pro IDE relies on the Arduino CLI, which outwardly seems like a great idea.  I don't know if Sloeber might benefit from utilizing CLI vs the gnu toolchain, but I suspect that's definitely the right answer for the Arduino Pro IDE, for sure.

@Jantje - sorry to hear you went through some rough times, but glad to see you getting back in touch with and involved in your community-oriented roots.  As noted previously, Sloeber is (IMHO) the absolute best/strongest environment for even moderately-complex projects, given that it takes advantage of the the full set of features of the classic Eclipse environment. (If you ever startup Patreon again, and/or need help testing, etc, please let us all know!)

Juraj

It is noteworthy that the Arduino Pro IDE relies on the Arduino CLI, which outwardly seems like a great idea.  I don't know if Sloeber might benefit from utilizing CLI vs the gnu toolchain, but I suspect that's definitely the right answer for the Arduino Pro IDE, for sure.
Eclipse IDE plugin which would use Arduino CLI would be very different from Sloeber. It would not use the Eclipse CDT.

Jantje

Eclipse IDE plugin which would use Arduino CLI would be very different from Sloeber. It would not use the Eclipse CDT.
I fully agree here. Sloeber and Arduino CLI are both implementations of the Arduino framework and are supposed to build the sketch using the same tools and the same compile commands.

But because Sloeber translates the arduino framework commands to CDT; you get all the CDT stuff for free. Which means you can see the code  of the arduino core, the libraries and the compiler provided code.
Don't forget define context colouring ;-)
And also lots of eclipse stuff like version control integration ....

I always said that the way to start Arduino is with Arduino IDE. And I fully realize that most arduino users will never need a tool with a feature set like Sloeber. But for people with a software development background who like eclipse....Sloeber is excellent. All others have a steep learning curve ahead.

But the fact the CDT team now officially states that the way to do Arduino work with CDT is Sloeber is a great feeling/recognition.

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 -

jim_s

But because Sloeber translates the arduino framework commands to CDT; you get all the CDT stuff for free. Which means you can see the code  of the arduino core, the libraries and the compiler provided code.
Don't forget define context colouring ;-)
Agreed - all of the code-diving, refactoring, etc that that the CDT provides is exactly what puts Sloebar orders of magnitude ahead of any of the other tools I've tried to use. (Both before Sloeber, and when Sloeber had entered its dark period of hibernation - I'm SO HAPPY it's back!! :-)

But the fact the CDT team now officially states that the way to do Arduino work with CDT is Sloeber is a great feeling/recognition.
That is amazingly cool, and completely well-earned and deserved!  Did they make any type of statement or article on this, or just what you've had conversations with them about? (I'd love to read anything they put out, if so - I am SUCH a big fan of Sloeber!!!)

Jantje

>Did they make any type of statement or article on this, or just what you've had conversations with them about?

No article but a plugin created by the former CDT teamlead has some modification by the new teamlead on marketplace : https://marketplace.eclipse.org/content/eclipse-c-ide-arduino-no-longer-maintained-see-details

I'm currently doing changes in CDT to unlock some capabilities for CDT and Sloeber.
CDT 10 (release september this year) will have some incompatibilities and the new Sloeber (version 5) will need it. So we expect some issues.

Testers are welcome :-)
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