Go Down

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

BitSeeker

Yes, there is some confusion on my part here.

Eclipse came as standard with the option right there on the welcome page. When I selected to create a C/C++ project I have the option to create an Arduino C++ sketch. This is before any plugins are installed. I am therefore given the impression that I can work with Arduino sketches right 'out of the box'.

When I created a new project I was immediately offered the option to download a better editor and Sloeber came up as a plugin suggestion so I installed that as well. So is Sloeber neccessary, or can Arduino sketches be created without it?

Checking further, I see that Eclipse C++ IDE for Arduino 3.0 is listed as a plugin. I presume that must have come as standard or I might have selected Arduino during the install process. The author is apparently Eclipse CDT, EPL. No mention of any kind of Dog. On further examining the 'more info' link I discovered another video link which took me to a video by Neon. This was actually helpful (no distressing images of a cat being threatened with a large knife!) and showed me how to create a new Arduino project and set up a board. I finally managed to set up a Hello World project on my Uno board.

So its seems that maybe the Sloeber plugin is not required. However, to be fair, I would like to give both plugins a try. However, from the two options in the Eclipse marketplace, which one do I choose to install:

1. The Arduino Eclipse IDE named Sloeber (Product) V4, by jantje and others, EPL  (13.0k)
2. The Arduino Eclipse plugin named Sloeber V4, by jantje and others, EPL  (44.7k)

If someone could confirm the correct plugin, then I will install it and then try the instructions in the link above.

Juraj

1. The Arduino Eclipse IDE named Sloeber (Product) V4, by jantje and others, EPL  (13.0k)
2. The Arduino Eclipse plugin named Sloeber V4, by jantje and others, EPL  (44.7k)

If someone could confirm the correct plugin, then I will install it and then try the instructions in the link above.

1. is IDE bundled with plugin

hichhiker

If someone could confirm the correct plugin, then I will install it and then try the instructions in the link above.

For what its worth - I never had good luck using the plugin version of Sloeber. In theory it is same thing, but in practice it was a mess. But the "product bundle" version - i.e. single download that contained both Eclipse and all basic plugins you need - worked wonderfully. I highly recommend using that and not worrying about manually configuring it until you are super comfortable with both Eclipse and Sloeber plugin.

-HH

P.S. Get product here: http://eclipse.baeyens.it/stable.php

Thotanos

While not directly having to do with the program, I still have a question regarding the download website:
When I try to download the stable bundle from http://eclipse.baeyens.it/stable.php, my average download speed is about 4.7kB per seconds, so it would need about 7 hours or so. All of this while other downloads are working just fine.
Is this a problem on the server side or one mine?
Is there any other place where I can get the stable bundle?

Jantje

After a DDOS attack I was forced to remove all the download files from my server.
So now all the files are downloaded from github
https://github.com/Sloeber/arduino-eclipse-plugin/releases
If it is slow for you; should speak to github.
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 -

jschw

Anyone here who got Sloeber correctly working under macOS Catalina 10.15?

Alf_Muc

Hi everybody,

I got it running - almost.
It's a huge Project, initially rised in Arduino (IDE) and now transfered to Windows-Sloeber.

Issues I have:
- the sloeber.ino.cpp is recreated automaticly
   -> this may be ok for small Projects but for my huge Project the automatic creation is faulty
       Some functions are not listed
       Some faulty entries

Does anybody know how to switch off the automatic creation of the sloeber.ino.cpp ???


In Arduino IDE I get the size of used dynamic Memory.

--> Globale Variablen verwenden 1534 Bytes (74%) des dynamischen Speichers, 514 Bytes für lokale Variablen verbleiben. Das Maximum sind 2048 Bytes.

How can I get this from Eclipse / Sloeber after compilation?


Jantje

>Does anybody know how to switch off the automatic creation of the sloeber.ino.cpp

rename you .ino files to .cpp files

>In Arduino IDE I get the size of used dynamic Memory.

Arduino does post processing of the build output which is not done in sloeber.
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

>rename you .ino files to .cpp files

The way I would tackle this
Rename sloeber.ino.cpp to <my project name>.h
In  <my project name>.h delete the section where the .ino files are included and the comment it is auto generated
add #include <my project name>.h to you .ino files
rename you.ino files to .cpp files
Check in your stuff in version control and check  <my project name>.h is there (sloeber.ino.cpp is tagged as a generated file; I am not sure what your version control plugin will do)

Depending on how compliant your code is with C/C++ best practises you are done or need to  do some more work.
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 -

hichhiker

Like many people already said, ino format is for beginners who do not really understand cpp and want to get going fast(its basically .cpp and .h combined into one file), or for tiny projects. If you have a significant size project, just switch to using proper cpp files with headers and avoid .ino altogether.

Juraj

Like many people already said, ino format is for beginners who do not really understand cpp and want to get going fast(its basically .cpp and .h combined into one file), or for tiny projects. If you have a significant size project, just switch to using proper cpp files with headers and avoid .ino altogether.

I like the forward declarations generation and I know how to avoid  in ino what the sloeber.ino.cpp generator (or Arduino builder) can't handle.

my main Arduino project has 22 ino files. I decided to go the multiple ino code separation way with almost no encapsulation of partial functionality. I could encapsulate functionality into classes with declarations in h files, but it would be only more work

hichhiker

I like the forward declarations generation and I know how to avoid  in ino what the sloeber.ino.cpp generator (or Arduino builder) can't handle.

my main Arduino project has 22 ino files. I decided to go the multiple ino code separation way with almost no encapsulation of partial functionality. I could encapsulate functionality into classes with declarations in h files, but it would be only more work
I suppose that is fair. If you are super comfortable with specific quirks of ino sketch preprocessor, it can work, and in the end it is not that far from proper CPP, but I found once I scaled up (I had a project that needed a lot of optimization just to fit on a 2560) I was spending way too much time worried about what my code would actually look after preprocessor re-writes it as CPP and running into all sorts of sketch weirdness and inflexibilities. For me going straight to CPP format allowed for much better control and organization with folders and what not, and allowed me to select what was part of a build and what was not, not to mention much more universal, easier to find resources to help me code that are not specific to Arduino and leaving the door open to compiling using non-Arduino wrapped compilers and making my code more portable to other platforms. But that said, at the time I was working on a very large project, probably larger than belonged on an Arduino, and to this day, I would use ino sketches for small, "blinky-light" type projects.

-HH

Jantje

#1122
Jan 23, 2020, 03:13 pm Last Edit: Jan 24, 2020, 07:59 pm by pert Reason: Quote deleted reply
MODERATOR EDIT: The previous reply was deleted by the user, which rendered the response less useful, so I am providing the text of the reply in the quote box below:
Quote
I start using Sloeber some weeks ago so I don't have much idea of everything. I'm running Sloeber in Windows and after having some problems linking extern and my libraries, have now the following problem.

I tried some of the examples of de SdFat-Beta library from greiman in Arduino IDE and works. I want to use the same library in Sloeber and after compiling I got some errors like not declared variables in this scope, uninitialized reference member in... or expected '}' at end of input.

Since I didn´t modify this library at all and it worked before, I suppose that I'm missing something about the configuration or something.

Do any of you have have an idea how can I solve this problem?
END MODERATOR EDIT


>Do any of you have have an idea how can I solve this problem?

What you are asking is: "How do I do problem analyses".
This is a very broad question. but here are some handles for the "code doesn't build in Sloeber but it does in Arduino IDE problem".
1)Clean your project and then build it.

2)Focus on the very first error in the build output (the console). This is probably the easiest thing to fix as following errors may be a result of the first error.

3)Build the problem again and see whether you get the same first error.

4)Try to understand what is going on. This is hard! Change the code a bit and build ..... (experiment)

5)If you don't get it compare the build command of this specific file between arduino IDE and Sloeber.
If these are different check the sloeber known issues https://github.com/Sloeber/arduino-eclipse-plugin/issues?utf8=%E2%9C%93&q=label%3A%22status%3A+known+limitation%22+
If there is no known issue explaining the difference create a issue explaining the behaviour.

6)If there is no difference in the command and you still don't get it check the library and board provider support channels searching for sloeber and eclipse.

7)If you are still not getting it create a issue on what you think is the most appropriate support channel and be explicit and verbose.
Tell the big story and zoom in on the details of what the problem is and what you tried.
Hope for someone capable and willing to help.
In the mean time restart with 1. You should have learned a lot and you might have overlooked something.

8 ) If someone tries to help: be grateful and open to the solution proposed. The proposal may sound bunkers but don't forget "You don't have a clue and a complete stranger has invested time and energy to help you. The least you can do is check the proposal out."


9) Respond to the responder. Don't be a taker. You have received help, show you appreciate it.
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

Quote from: keepL
I start using Sloeber some weeks ago so I don't have much idea of everything. I'm running Sloeber in Windows and after having some problems linking extern and my libraries, have now the following problem.

I tried some of the examples of de SdFat-Beta library from greiman in Arduino IDE and works. I want to use the same library in Sloeber and after compiling I got some errors like not declared variables in this scope, uninitialized reference member in... or expected '}' at end of input.

Since I didn´t modify this library at all and it worked before, I suppose that I'm missing something about the configuration or something.

Do any of you have have an idea how can I solve this problem?
@keepL, I tested it and the examples of the SdFat-Beta compile without errors in Sloeber

keepL

Thank you for your answer and to take the time to test it.
I found what i was doing wrong and ran perfectly.

Go Up