It's official, I hate the Arduino IDE. There's just so much wrong with it that I hardly know where to begin...
First and foremost: the build pipeline. Who came up with this anyway? I know Arduino is aimed at beginners, but that's no excuse to make a mess of things. What happens when you hit the 'Verify' button (compile) is the following:
If you're like me and like to have your source tree reflect the namespaces you use then you're out of luck. I for one like to have to use #include <rc PPMOut.h=""> for my rc::PPMOut class, but that's not going to work for multiple reasons.
First of all, using that include won't tell the pipeline you're using the rc library, it doesn't look beyond the library's root folder for files, so the library won't be added to the include path and you'll be presented with a nice compiler error. This can be fixed by including a file that is placed in the root of the library folder, like rc.h. So you'll have to add another (useless) include to your source, yuck.
Now you've solved the include problem and fixed the compiler error, but get linker errors for unresolved references! Great, the pipeline doesn't see the CPP file unless it's in the root of the library, so it doesn't compile it.
And finally, none of this is configurable in any way through the IDE, can't set compiler flags, change warning levels, optimization levels or anything. A lot of these frustrations wouldn't exist if there was some form of project file with compiler settings, include paths, etc. None of it would have to be very complicated.
And don't get me started on the actual editing of code using the Arduino IDE, I've selected the "use external editor" option a long time ago; a few minutes after installing the IDE to be precise.
So, next challenge: rigging up a build pipeline in visual studio...
Daniel,
you do know about Visual Micro yet don't you?
I've been using it for a couple of weeks now, and i have to say it's doing what it should.
It's nice te be working in VS instead of the Arduino IDE.
http://www.visualmicro.com/
Thanks for the link, that's cool! I'm currently using Notepad++ as an editor and the Arduino IDE for building, my poor 10 year old laptop is too slow to run any real IDE. Also, I'd like to keep ArduinoRCLib fully compatible with the Arduino IDE and build system. Even though it's starting to become a royal pain.
Something to add to my original rant: I noticed that Arduino libraries cannot depend on other libraries. The build system does not detect these dependencies and will not add the dependencies to the include path unless the sketch itself uses all the needed libs. In other words, if I want to use the SPI library or Wire library in ArduinoRCLib, any sketch using ArduinoRCLib will have to include SPI.h or Wire.h, otherwise ArduinoRCLib will not compile...
The same is still true when using Visual Micro...
It adds the files you create (.h) automatically to the pde/ino.
That's why i didn't notice it at first.
Still it's not a real problem for me, i'm trying to steer away from using any advanced libs, the first menu attempt used vectors (which required the standardcplusplus lib) but i've done away with that and i'm now using simple arrays which uses a LOT less memory.
Microprocessor coding is new to me :)
Hehe, just stay away from anything that uses dynamic memory allocation or you'll run out of the 2KB RAM before you know it. I've recently started using stdio functions (printf, puts) on the Arduino, but you'll want to put as much static data in PROGMEM as you can. By default, all variables (even static const and string literals) are placed in RAM, which sucks when you're using FILE macros for debugging messages...
I'm used to these devices, I learned programming on a 4MHz Z80 in assembler and programmed Nintendo GBA and DS for a few years professionally :)