New alternative IDE for Arduino

Hey guys,

I'm currently working on a somewhat complex project for Arduino and I got a bit frustrated with the simplicity of the Arduino IDE. So I decided to create my own IDE that also will eventually include my bootloader for flashing via ethernet. (which already exists in the playground).

I opened up a github repository for this, feel free to give it a try and help me develop.
Warning: it's still in an early phase, I won't take any responsibility for any potential harm this program does. Make sure to back up your files. Use at own risk.

Basically it's a QsciScintilla file editor with some project and library management added. It will compile the arduino core and your application as specified in the build profiles.
Please note, that this IDE does not (on purpose) preprocess the source files before compilation like the original IDE.
If you want to use libs, you have to right click "Libs", click "Add Library..." and select the library folder from where you stored it.

This program isn't meant to replace the orginial Arduino IDE but might be nice for more experienced programmers that want to have some more options.

In the future I want to add API files for the autocompletion, the Ethernet bootloader, a bootloader flashing method, upload support for the EthernetFlasher, examples, new project wizzards and other goodies.

Let me know what you think,

Cheers,
Emmeran

This does look nice but I'd hold off doing too much work on it for a while. Firstly there are several other options now, some of which are pretty good. Secondly when the Due is released there is supposed to be a new IDE as well, that may well be a full-featured IDE and if it is and it's officially supported that would have to be the way to go.


Rob

Graynomad:
This does look nice but I'd hold off doing too much work on it for a while. Firstly there are several other options now, some of which are pretty good. Secondly when the Due is released there is supposed to be a new IDE as well, that may well be a full-featured IDE and if it is and it's officially supported that would have to be the way to go.

What other Linux options are there available? I've seen Gnoduino, and had problems getting it to work. As far as a new IDE coming with the Due, I haven't heard that. I hope it's true. Where did you get that info?

That looks great, if you make it work fully I will be happy to help implement some debugging capabilities. My understanding is that the Due will initially work with the std Arduino IDE with a better IDE "due" in the longer term.

If you can put in the ability to store breakpoints against source code lines and to be able to edit breakpoint properties specifiying message and condition text then we are onto a real winner.

I have this working in Visual Studio but it's handled by an API unconnected to Microsoft software, so could be compiled up for linux using Mono or re-written.

Short draft overview here

Edit:

What does this mean? No combining of .ino files?

that this IDE does not (on purpose) preprocess the source files before compilation like the original IDE

The Arduino eclipse plugin works on Linux mac and windows. See eclipse.baeyens.it for more info and installation instructions.

Best regards
Jantje

That means, that the source files are left untouched before being passed to the gnu preprocessor and compiler. So #includes won't be inserted, *.inos won't be combined, function headers won't be auto-created etc.
I rather have it a bit more complicated than unpredictable / problematic. I wouldn't be opposed to add it and make it turned on by default as long as you can turn it off easiy.

Emmeran:

[quote author=Visual Micro link=topic=125225.msg943593#msg943593 date=1349290087]
What does this mean? No combining of .ino files?

that this IDE does not (on purpose) preprocess the source files before compilation like the original IDE

That means, that the source files are left untouched before being passed to the gnu preprocessor and compiler. So #includes won't be inserted, *.inos won't be combined, function headers won't be auto-created etc.
I rather have it a bit more complicated than unpredictable / problematic. I wouldn't be opposed to add it and make it turned on by default as long as you can turn it off easiy.
[/quote]
Exactly the same counts for my arduino eclipse plugin.
Best regards
Jantje

That's nice. For me Eclipse is no option tho, since I really dislike it personally. It also has a huge unnecessary overhead. For me it's like cutting bread with a swiss army knife.

Emmeran:
That's nice. For me Eclipse is no option tho, since I really dislike it personally. It also has a huge unnecessary overhead. For me it's like cutting bread with a swiss army knife.

I can't disagree on comparison with a swiss army knife. Every intensively used IDE has some overhead; just like a swiss army knife always has at least 1 tool you'll never really use.
So the question is do you start from 0 (or very basic) and add stuff to find out in the end you end up with a new fully featured IDE or do you accept the overhead from day one. 8)

For me; I just wanted to point out that there is an alternative for Linux. So people who don't know would not get the impression there is no alternative.
Further on everybody uses what (s)he chooses.

Best regards
Jantje

Understandable to make something different to the Arduino IDE for real experts but why not make expert mode an option and default to compatibility with all the existing Arduino open source projects?

By not supporting multiple .ino files in the normal way this becomes less of an Arduino plugin and more of an AVR plugin? Useful but quite different to how Arduino works.

There are some really brilliant and huge Arduino projects out there. ArduPilot, MultiWii being two. Both rely heavily on modular pde/ino files and libraries and will not compile with your IDE. If this is a decision that both of you have made for Eclipse and Linux then I respect that but it will reduce usability for the community.

As concerns someone reporting your IDE not to work. IGNORE that statement, it's early days for your project and every plugin has it's problems at times. Less so as more users work with it.

Best of luck

@Visual Micro
The pde/ino incompatibility is not as bad as you describe it. With my plugin there are 2 differences on behalf of ino files
Multiple ino files don't get packed in one ino file.
Ino files do not have the Arduino preprocessor adding the function descriptors.

The fact that Multiple ino files don't get packed in one ino file is a none issue in my eyes. Arduino needs to pack them to get the include folders for GCC. My plugin saves this information at import time.

I do not claim compatibility from Arduino to the plugin. I do claim that you can easily have compatibility from the plugin to Arduino.

[quote author=Visual Micro link=topic=125225.msg945586#msg945586 date=1349437027]
Understandable to make something different to the Arduino IDE for real experts but why not make expert mode an option and default to compatibility with all the existing Arduino open source projects? [/quote]
Because my plugin is made for people with a decent level of C/C++ knowledge only. My faq states:

What is the benefit of the Arduino IDE to the eclipse plugin
The Arduino IDE does a great job in introducing people to Arduino. This is so for hardware people writing their first C++ code and for software developers doing their first electronics experience. So if you are new to Arduino stop reading and learn to use the Arduino IDE....

In other words: "I have written this tool for myself (I'm an expert); I share it with the world but I can not support it like the Arduino is supported. As such some added C++ complexity is not a problem as C/C++ developers can deal with it."
This is very nicely demonstrated in this faq

What is this private library in the settings page
In the settings page a private library folder is requested. This setting should point to a location where you down loaded Arduino libraries.
If you haven't downloaded Arduino libraries yet do as follows

  1. Consider using the Arduino IDE. (strongly advised)
  2. Point it to a location where you can download Arduino libraries. (Strongly disadviced)

[quote author=Visual Micro link=topic=125225.msg945586#msg945586 date=1349437027]
By not supporting multiple .ino files in the normal way this becomes less of an Arduino plugin and more of an AVR plugin? Useful but quite different to how Arduino works.[/quote]
You do have a point in the sense that it is an AVR plugin. But why do you call it "quite different". I hardly see any difference than :

  • Function declarations- Using Include files- The usage of extern
    All of those are peanuts for experienced developers.

About winAVR my faq states the following:

I use WinAVR...
Great, excellent choice, a neat tool. This plugin uses WinAVR. The code from WinAVR has been forked and included in this plugin. .....

The Arduino layer I put on top of it is to have defaults for Arduino. So just like Arduino IDE is a layer on AVRDude and GCC My plugin is a layer on WinAVR. And as Arduino IDE proves: A good layer is worth a fortune.

[quote author=Visual Micro link=topic=125225.msg945586#msg945586 date=1349437027]
There are some really brilliant and huge Arduino projects out there. ArduPilot, MultiWii being two. Both rely heavily on modular pde/ino files and libraries and will not compile with your IDE. If this is a decision that both of you have made for Eclipse and Linux then I respect that but it will reduce usability for the community.[/quote]
I just checked ArduPilot, MultiWii as far as I can see none of them provide libraries. And yes they have all their files of the type pde; so yes there will be some work to get it working in my plugin. Though nothing more than 1 hour for someone who knows what (s)he is doing (in other words a experienced C/C++ programmer) and then it will work in both Arduino IDE and the plugin. But to be honest; Once you go eclipse (from Arduino) you never go back.
If they would rely on libraries (which do not support pde/ino) the libraries should work out of the box.
I don't understand why you think libraries will cause incompatibilities. Can you elaborate?

Best regards
Jantje

Multiple ino files don't get packed in one ino file.
Ino files do not have the Arduino preprocessor adding the function descriptors.

The fact that Multiple ino files don't get packed in one ino file is a none issue in my eyes. Arduino needs to pack them to get the include folders for GCC. My plugin saves this information at import time.

  1. What about a variable defined in ino1, will it be available in ino2 from both compile and intellisense perspectives?
  2. Joining the ino files into a single temp cpp makes all functions able to call each other without need for .h public declarations?

Am I missing a point?

I share it with the world but I can not support it like the Arduino is supported

I don't understand this, sorry if I am missing something but if it works the same as the Arduino IDE you have less support. Because if it works in Arduino then it will work with your plugin. Any problems would also be Arduino problems allowing the Arduino community to do the support

my plugin is made for people with a decent level of C/C++ knowledge only

Yes I agree you make this point clearly in your faqs

just checked ArduPilot, MultiWii as far as I can see none of them provide libraries

MultiWii uses multiple pde/ino and no libs but ArduPilot uses tons of them, so does ReefAngel.

The Arduino layer I put on top of it is to have defaults for Arduino. So just like Arduino IDE is a layer on AVRDude and GCC My plugin is a layer on WinAVR. And as Arduino IDE proves: A good layer is worth a fortune.

Yes very useful but different to Arduino

Yes there will be some work to get it working in my plugin. Though nothing more than 1 hour for someone who knows what (s)he is doing

I don't think it is practical when working with an ever changing open source project to make all these changes, especially if the changes are to be checked back into Git or ano source control provider

If they would rely on libraries (which do not support pde/ino) the libraries should work out of the box

Yes good, as long as we take the time to find all the .h file names to include in the source code.

Once you go eclipse (from Arduino) you never go back

For the experts that you target I am not surprised but this is also true for both novice and expert users of other plugins such as VS and XCode

I don't understand why you think libraries will cause incompatibilities. Can you elaborate?

As long as you support both Arduino IDE and User libs it should be fine. My point wasn't very well made, I was referring to the global decision to not combine pde/ino, not to auto insert .h lib #includes for larger projects and libraries and not to include utility folders.

Your faq mentions inserting a single .h for libraries but would that work with libraries that use more than one .h? Don't we need to include all the .h files from each library folders as #includes? and support utility folder for i2c?

Visual Micro
Nearly all your remarks point to the same thing: "The plugin does not target beginners".

[quote author=Visual Micro link=topic=125225.msg945772#msg945772 date=1349449448]

  1. What about a variable defined in ino1, will it be available in ino2 from both compile and intellisense perspectives?
  2. Joining the ino files into a single temp cpp makes all functions able to call each other without need for .h public declarations?

Am I missing a point?[/quote]
You are missing a very serious point indeed.
You are right that both behaviors are not supported in my plugin. However both usages are generally seen as really bad ideas. I don't even consider spending time to implement this functionality. Any programmer who uses this feature knowingly -without a valid excuse- is a lousy programmer in my eyes. If the programmer was working for me; (s)he'd be fired on the spot. This has everything to do with basic housekeeping.

We have been here before in previous discussions. My plugin is a tool. Any tool has a learning curve. My plugin is based on Eclipse, CDT and WinAVR. When going through the learning curve; new users do not see the difference between these 3 so I get a lot of Eclipse, CDT and WinAVR questions. The same counts for your visual studio plugin. You probably get team foundation questions, or questions from people downloading the visual studio express version and then complaining they can not install the plugin.
We as tool providers cannot expect the Arduino community to answer these questions. As a tool provider (and as we discussed this before) you should know this; so I'm wondering why you do not understand.

As I stated before this is a bug which got introduced in a recent version. It is not a decision. I fixed it and it will be in the next release.
Why do you keep nagging about it? I'm wondering why you keep on pinpointing "shortcomings" in other tools, it makes me really suspicious about your intentions.

Jantje

he same counts for your visual studio plugin. You probably get team foundation questions, or questions from people downloading the visual studio express version and then complaining they can not install the plugin.
We as tool providers cannot expect the Arduino community to answer these questions. As a tool provider (and as we discussed this before) you should know this; so I'm wondering why you do not understand.

I was simply referring to the Arduino support, Visual Studio support is very easy most of the time but we have a forum for that

I fixed it and it will be in the next release.
Why do you keep nagging about it? I'm wondering why you keep on pinpointing "shortcomings" in other tools, it makes me really suspicious about your intentions

Great to hear it is fixed. Well done

Not to be rude, but please could you discuss the Eclipse stuff in your own thread? I'm trying to get some feedback on my IDE here.

As for combination: you can have multiple ino/pde/cpp/c files and include libraries easily. I'm using MultiWii myself for my Quads.
One possibility that I think would be fitting is to use the Arduino preprocessing on ino/pde files and not to do it on cpp files.

In my opinion, having the preprocessor is not a bad thing pre se, but it's also not helpful if you can't see what it's doing.
So why not make a automatic header file, that's updated whenever you save a file in the project, which contains all the definitions.

This way users can see what's going on and learn from it.

I said above

when the Due is released there is supposed to be a new IDE as well, that may well be a full-featured IDE

That appears not to be the case according to recent information so go for it.


Rob

Yes I definitely agree with Graynomad. Furthermore this is a clean solution and, like Arduino, free to develop for a sole purpose.

Ideas & Questions, ignore where not applicable...

Having the libraries displayed in the UI is really great for some users but a bit confusing for others especially on monster projects such as apm. How about a toggle option to show or hide the library nodes in the tree? I do this in visual studio and have had reports from users, often library developers that love it and also from newer users that think it's the scary version. It would be nice as an option?

I guess you are creating your own project file? If so is it xml? and would you be interested in discussing some standards that might help all ide/plugin authors work more closely together?

To allow users to more easily add manual serial debug messages it would be good to get agreement on a #define that our plugins and IDEs can use during certain compilations. The idea being that developers such as yourself add a simple toggle button to the tool bar (or some other ui control) to switch between compilations that include/exclude the users debug commands such as Serial.print(). If the "Debug Mode" toggle button is pushed then it #defines DEBUG by adding -DDEBUG to the gcc compile. Some projects already #define DEBUG so my question is should this be a different name such as ARDUINO_DEBUG, or both, or an option. If you think this is a good idea it would be great to hear your thoughts.

Finally, seeing that the Rasberry PI uses Linux and is being targeted at new users I am wondering if your IDE might end up providing an easy stepping stone from the PI world into the Arduino world. It will be interesting to watch how this pans out. Best of luck :slight_smile:

Hey,

thanks for the feedback. Right now I'm in the final phase of my diploma thesis at my university, so the project will move slowly, but everyone can submit patches / pull requests, if they wanna help me develop.

Sure that's np, but what should the default value be? Maybe a selection on the first start of the program, where you can choose between beginners, advanced or expert mode.

Yeah, so far I have simple ini format files. Xml is a possibility as well, tho i'm not sure if that's necessary. I want the project files to have a lot more information later, especially for libraries.

That's also something I would add to the project file: different Debug levels and what defines have to be used for it, or maybe to simplify it, which include file should be used. Didn't put too much thought into that one yet.

As for the Rasberry PI: I have had one in my hands already, but I haven't used it. No idea what they need / use etc.
My main focus would probably be to get the Ethernet stuff going, so I can flash my W5100 boards without using USB.

If the Arduino Due doesn't come with a new IDE, maybe this IDE could become an option for the community as official IDE as well. I'm not fixed on any part yet and I welcome any open source additions to the project via git.

Makes sense. I'll have a good look at it when I get a mo. Best of luck with your studies.

Interesting what you say about the raspberry. What can you do with it? Lots of graphics and not very much :slight_smile: this is why I think the Arduino will be step up.

Actually the Raspberry PI belongs to my colleague and he doesn't really know what to do with it either, he just bought one out of curiosity. I guess it's good if you wanna do network stuff and control a display.
I would probably prefer an Arduino for anything else, since it's easier to see what actually happens on the device. Then again, having 32k ROM and 2k RAM currently is getting a bit difficult.
I'm building an autonomous device and my sketch is already at 30.5k, even though I'm trying to code as efficient as possible. But I guess there's a lot that can be scraped off still if I take a knife to the libraries. (Especially the Ethernet library which has a lot of code that can be removed for my purposes)