Enginursday: Life Improvements with Arduino 1.6

The release of Arduino 1.6 has really improved my Arduino-programming life thanks to custom platform support, command line utilities and line numbers!

Favorited Favorite 2

Just about a month ago, Arduino made it officially official: Arduino 1.6 became the supported, non-beta version of the ubiquitous IDE. After 1.5.x had languished in "beta" for over a year, 1.6 brought with it a huge list of long awaited improvements.

Putting aside my Arduino hipsterism ("Arduino peaked at 0022"), I downloaded the latest release. I'll be honest, aside from breaking all of our 3rd party hardware additions (fair enough, we had over a year to prepare), the upgrade to 1.6 has greatly improved my Arduino-programming life. Here are a few reasons why:

UI/UX improvements - Arduino-programming has become much more streamlined with the release of 1.6. Some of the huge experience improvements include:

  • Compilation is a lot faster, because unmodified core files and libraries aren't re-compiled every time you click Upload. Finally!
  • Much more reliable uploads on ATmega32U4 boards.
  • Some Arduino boards are auto-detected and listed next to the COM port
  • Have way too many libraries installed? That and the rest of the menus are scrollable.
  • Most importantly, line numbers can be turned on to make debugging a little less painful!

Arduino 1.6 UX improvements

For better or worse, the IDE looks about the same, but a lot of minor changes have made my Arduino-ing a much happier experience.

Updated avrdude and avrgcc -- A very under-the-hood improvement, but this one was huge! Arduino 1.0.6, the last official release before 1.6, was using avrdude version 5.11 (released September 2011), Arduino 1.6 brings that up to 6.0.1 (released September 2013). Likewise, 1.0.6 included avr-gcc 4.3.2 while 1.6 updates that to 4.8.1.

The upgrades to avrdude and avr-gcc means the IDE can compile for and upload to all sorts of latest, greatest AVR chips. The ATmega128RFA1 was one of those chips (not even that late or great anymore). With the release of Arduino 1.6, I was happily able to update the tutorial and take out the "How to Update WinAVR" section.

Command line Arduino -- The Arduino executable now serves as both the GUI we're all used to and a command-line utility. If you're beginning to stray the line between Arduino and more makefile-dependant environments, or looking into automating Arduino-realted tasks, this is definitely something worth checking out. Tools like Ino, have made command-line Arduino possible for a long time, but it's really neat to see the support built in.

Command line Arduino

The Arduino command line API is documented over here on GitHub. You can use it to compile and upload sketches, and set all sorts of under-the-hood preferences, like your build path.

This utility isn't without its quirks, the most major of which being you can't seem to pass it relative paths -- you're stuck typing (or tabbing) out your sketch path every time. Plus, it seems to briefly open the GUI every time you give it a job. Nevertheless, this is a great start and much needed improvement to the IDE.

Support for multiple platforms -- Arduino isn't just a purely AVR IDE any more, with the Due and approaching Arduino Zero, ARM support also had to be built in. They implemented this support with a pair of text files and a standardized directory hierarchy. A "boards.txt" file is still required to add additional, custom boards to the IDE, but 1.5.x also introduced "platform.txt", which sets up the compiling, linking, and uploading patterns for any specific architecture. Check out the spec here.

AVR platform.txt defines how sketches are compiled and uploaded

platform.txt allows you to really get into the nitty, gritty details of sketch compilation.

Updating our board definitions took a bit of clerical work, but was relatively painless. Now all of our Arduino board addons can be found in our Arduino Boards GitHub repo.

This feature is really keen to my interests right now -- in my downtime I'm working on an Arduino extension for those hip, new ESP8266 WiFi SoC modules. Even though the ESP8266 has a weird non-AVR, non-ARM core, with a little customization Arduino can still be used to compile and upload code to the cheapo WiFi modules.

Custom boards in Arduino boards menu

Arduino 1.6 allows you to create custom boards that are neither ARM nor AVR.

Should you be using Arduino to develop firmware for such a complex piece of hardware? That's another question...


The Arduino IDE isn't without it's problems, but its simplicity is hard to compete with. There's something comforting about writing a single "sketch," and assuming all of the other libraries are just going to work. Hopefully Arduino is able to continue improving the IDE, without breaking support for the exhaustive list of third-party libraries and hardware. They seem to be doing a great job lately (potentially competing Arduino IDE's aside).


Comments 15 comments

  • FlowerAskew / about 9 years ago / 3

    I'm pretty sure you could enable line numbers in the "preferences" menu before.

  • Beto Arango / about 9 years ago / 2

    I believe the update screws up the tiny avr process.. I had my attinys working.. updated to the new one... now they dont work.. Back to the previous one and it is back on... KNowing my newbieness...it is probably just me but still the error is

    Arduino: 1.6.1 (Windows 7), Board: "ATtiny85 (internal 8 MHz clock)"

    Selected board depends on 'arduino' core (not installed).

    This report would have more information with "Show verbose output during compilation" enabled in File > Preferences.

    so I guess for now Ill stick with the previous version...

    • jimblom / about 9 years ago / 2

      You may just need to update your hardware addons folder. Looks like there's an updated version available on High-Low Tech.

  • signal7 / about 9 years ago / 1

    Just an fyi - On Microsoft Windows platforms, an application that is both a command line app and a GUI app is an impossibility. The software development tools require that you define your application as one or the other. If you decide it's a GUI app, the application init code will open up a window on the desktop before any of your own code is executed. If you decide it's a command line app, trying to put up a dialog becomes extra difficult.

    The best anyone can hope for is that you'll be able to hide that window quickly enough so no one really notices or complains about it.

  • Member #652724 / about 9 years ago / 1

    how to make line numbers turn on ? thanks in advance :)

  • sprior / about 9 years ago / 1

    It appears that they allow you to create subdirectories under home Arduino documents directory which parallel the ones in the install directory (such as libraries and hardware), but they don't do that for the examples directory. So to install the SparkFun Inventors Kit examples I couldn't just create an examples directory in my Arduino folder. I solved this by creating a new directory under the libraries folder and then an examples directory under that with the SIK code. This allows the SIK code to be added to the IDE menus without needing to put it in the install directory. Would have been nice though if the Arduino IDE treated the examples directory the same as the hardware and libraries directories and allow a user to have their own folder.

  • WarpedHumor / about 9 years ago / 1

    Thanks for the info - now I can dump my non-standard parallel install. When are you guys going to do a ESP8266 - for the price it's hard to beat.

  • rei_vilo / about 9 years ago / 1

    I've been using the Arduino framework with Xcode for almost two years now, thanks to the embedXcode plug-in I've developed. It is entirely based on command line tools. It was time to feature this approach in the official Arduino IDE.

  • Sciencez / about 9 years ago / 1

    Jimbo,

    Version 1.6 was released quite some time ago. It had problems with identifying and maintaining the USB port connection - especially during multiple connects and disconnects (typical during testing). This required manual configuration and often a reboot to reconnect (a real drag!!!). There has VERY recently been an upgrade released, (i.e. version 1.6.1 - NON-BETA release) that fixes this problem and several other small issues.

    Version 1.6.1 is by far a better product to use. I strongly recommend installing version 1.6.1 and avoid version 1.6.

    • jimblom / about 9 years ago / 1

      Oh yeah! I should have put a note in that 1.6.1 was released. I'm loving it. The SoftwareSerial library is hugely improved -- I can send data reliably at 115200! AND, my biggest annoyance with 1.6 was solved -- the window properly maximizes when I drag the title bar to the top of my screen.

  • Colecago / about 9 years ago / 1

    I wish I had the option to use the IDE to upload hex files to an Arduino. Sometimes I want to code in regular C in AVR studio but want to take advantage of the Arduino bootloader and a non command line AVRDude interface.

    • MikeGrusin / about 9 years ago / 2

      You said "non command line" but if you ever need to upload hex to an AVR with the Uno bootloader on it, you can use something like:

      avrdude -F -V -c arduino -p atmega328p -P COM5 -b 115200 -U flash:w:blink.hex
      

      It's pretty easy to stick this into a makefile, batch file, shell script, or menu item if your IDE is flexible enough.

Related Posts

Recent Posts

Why L-Band?

Tags


All Tags