Hacker News new | ask | show | jobs
by wyager 4342 days ago
I absolutely refuse to use the Arduino environment, because it appears to be using some completely insane and/or broken build options. I had all sorts of problems with e.g. not being notified of missing header files, misleading error messages, IDE errors during compile (as opposed to compiler or linker errors), etc.

Now I just use plain old avr-gcc or gcc-arm-none-eabi and my favorite text editor, and my embedded development experience with Arduino-compatible products has never been better (despite not using anything from the Arduino project).

3 comments

The other day I was working on a serial command interpreter for the Teensy 3 that will eventually have some Bus Pirate type features. It's just a hobby project, I'm usually writing ObjC or Python for work in Xcode or something else, but I enjoy working with these little boards and writing low level code. The Teensy support software is an add-on for the official build of the Arduino IDE, so I was using it.

After about 5 hours of work and making a lot of progress I was happy with, my Mac crashed and rebooted, which is extremely rare (except when working with something connected via the USB CDCACM driver... sigh).

I then discovered that all the changes from the past 5 hours were gone, the project files were in the exact state they had been when I woke up that day.

Despite compiling and uploading new code to the Teensy 100+ times, the IDE saved nothing new to disk in the process (which on a side note, is weird. Where is the external toolchain getting the changed files from?). I never explicitly hit the save button, so it all disappeared. I spend a good percentage of my life in Xcode, I know it doesn't behave that way. I can't say I remember Netbeans, or Eclipse, or any other IDE that I've used, ever losing work because I only clicked build rather than a separate step for saving to disk.

Apparently that behavior has caused a lot of people to lose a lot of work over the last few years judging from a quick google search.

The Arduino IDE puts all compile-time stuff in /tmp/, which gets erased on reboot.

And yeah, Teensy is great, but their USB code is a bit... out of spec sometimes. Also, the Teensy 3 in the Arduino IDE is (was?) kind of a nightmare. They have a gigantic C++ object that emulates all the registers on an AVR, and translates operations on those "registers" into operations on ARM MMIO.

I completely agree. And for the times that I have to work with Arduino libraries, etc, I use the ino command line toolkit. [0]

[0] http://inotool.org

Thanks for pointing out inotool.org – i didn't know it existed, and it looks pretty cool.

One big wish I have is to find a way to write automated tests for my Arduino libraries. Or even for pure C/C++ classes used by my libraries, but I havent' yet invested into setting up Eclipse to build/run tests with an Arduino type project. Curious to know if anyone has a solution to automated testing of Arduino and pure C/C++ libs that are used by their Arduino code?

Regarding the other remark below – nobody is doing it wrong as long as they are doing it. The post is a personal opinion, and should be taken as such. If Qt Creator works better for you, great! Write a blog post about it ;)

ino has been great to me. I think that the Arduino toolkit should have been designed with that functionality to begin with.
You are obviously doing it wrong. Some person with a .io domain who didn't test either editor-and-toolchain or QtCreator says so.