Posts with «ide» label

PlatformIO and Visual Studio Take over the World

In a recent post, I talked about using the “Blue Pill” STM32 module with the Arduino IDE. I’m not a big fan of the Arduino IDE, but I will admit it is simple to use which makes it good for simple things.

I’m not a big fan of integrated development environments (IDE), in general. I’ve used plenty of them, especially when they are tightly tied to the tool I’m trying to use at the time. But when I’m not doing anything special, I tend to just write my code in emacs. Thinking about it, I suppose I really don’t mind an IDE if it has tools that actually help me. But if it is just a text editor and launches a few commands, I can do that from emacs or another editor of my choice. The chances that your favorite IDE is going to have as much editing capability and customization as emacs are close to zero. Even if you don’t like emacs, why learn another editor if there isn’t a clear benefit in doing so?

There are ways, of course, to use other tools with the Arduino and other frameworks and I decided to start looking at them. After all, how hard can it be to build Arduino code? If you want to jump straight to the punch line, you can check out the video, below.

Turns Out…

It turns out, the Arduino IDE does a lot more than providing a bare-bones editor and launching a few command line tools. It also manages a very convoluted build process. The build process joins a lot of your files together, adds headers based on what it thinks you are doing, and generally compiles one big file, unless you’ve expressly included .cpp or .c files in your build.

That means just copying your normal Arduino code (I hate to say sketch) doesn’t give you anything you can build with a normal compiler. While there are plenty of makefile-based solutions, there’s also a tool called PlatformIO that purports to be a general-purpose solution for building on lots of embedded platforms, including Arduino.

About PlatformIO

Although PlatformIO claims to be an IDE, it really is a plugin for the open source Atom editor. However, it also has plugins for a lot of other IDEs. Interestingly enough, it even supports emacs. I know not everyone appreciates emacs, so I decided to investigate some of the other options. I’m not talking about VIM, either.

I wound up experimenting with two IDEs: Atom and Microsoft Visual Studio Code. Since PlatformIO has their 2.0 version in preview, I decided to try it. You might be surprised that I’m using Microsoft’s Code tool. Surprisingly, it runs on Linux and supports many things through plugins, including an Arduino module and, of course, PlatformIO. It is even available as source under an MIT license. The two editors actually look a lot alike, as you can see.

PlatformIO supports a staggering number of boards ranging from Arduino to ESP82666 to mBed boards to Raspberry Pi. It also supports different frameworks and IDEs. If you are like me and just like to be at the command line, you can use PlatformIO Core which is command line-driven.

In fact, that’s one of the things you first notice about PlatformIO is that it can’t decide if it is a GUI tool or a command line tool. I suspect some of that is in the IDE choice, too. For example, with Code, you have to run the projection initialization tool in a shell prompt. Granted, you can open a shell inside Code, but it is still a command line. Even on the PlatformIO IDE (actually, Atom), changing the Blue Pill framework from Arduino to mBed requires opening an INI file and changing it. Setting the upload path for an FRDM-KL46 required the same sort of change.

Is it Easy?

Don’t get me wrong. I personally don’t mind editing a file or issuing a command from a prompt. However, it seems like this kind of tool will mostly appeal to someone who does. I like that the command line tools exist. But it does make it seem odd when some changes are done in a GUI and some are done from the command line.

That’s fixable, of course. However, I do have another complaint that I feel bad for voicing because I don’t have a better solution. PlatformIO does too much. In theory, that’s the strength of it. I can write my code and not care how the mBed libraries or written or the Arduino tools munge my source code. I don’t even have to set up a tool chain because PlatformIO downloads everything I need the first time I use it.

When that works it is really great. The problem is when it doesn’t. For example, on the older version of PlatformIO, I had trouble getting the mBed libraries to build for a different target. I dug around and found the issue but it wasn’t easy. Had I built the toolchain and been in control of the process, I would have known better how to troubleshoot.

In the end, too, you will have to troubleshoot. PlatformIO aims at moving targets. Every time the Arduino IDE or the mBed frameworks or anything else changes, there is a good chance it will break something. When it does, you are going to have to work to fix it until the developers fix it for you. If you can do that, it is a cost in time. But I suspect the people who will be most interested in PlatformIO will be least able to fix it when it breaks.

Bottom Line

If you want to experiment with a different way of building programs — and more importantly, a single way to create and build — you should give PlatformIO a spin. When it works, it works well. Here are a few links to get you started:

Bottom line, when it works, it works great. When it doesn’t it is painful. Should you use it? It is handy, there’s no doubt about that. The integration with Code is pretty minimal. The Atom integration — while not perfect — is much more seamless. However, if you learn to use the command line tools, it almost doesn’t matter. Use whatever editor you like, and I do like that. If you do use it, just hope it doesn’t break and maybe have a backup plan if it does.


Filed under: Arduino Hacks, ARM, Hackaday Columns, reviews, Skills

New IDE for all Arduino boards!

Following the announcement at this year’s World Maker Faire, we’re excited to reveal the release of Arduino IDE 1.8.0—the new official desktop editor for all Arduino boards, both .org and .cc alike.

This should come as great news to the entire Arduino community, representing a key milestone in our journey moving forward.

You will now be able to use the desktop IDE 1.8.0 when working with any Arduino board from .org or .cc family. The latest and greatest unified Arduino Software can be downloaded here.

Arduino IDE 1.8.0 works out of the box with AVR boards, like the Uno, Mega, Yun, and Micro, among the most popular. Additionally, it supports the Leonardo Ethernet, Yun Mini, Industrial 101, and Uno WiFi.

The updated SAMD core will provide support for the M0, M0 PRO, and Tian, completing the product line that includes the Zero, MKR1000, and the newly-launched Primo and MKRZero.

More tech notes: You can run the IDE on Linux directly in command line, no longer requiring the X11 display. Also on the Arduino Builder paths with strange UTF8 chars are now correctly handled.

Release after release, the community continues to play an integral role in our development. Be sure to check the entire revision log for a complete list of changes and credits. As always, don’t forget to report any issues you may find, either on the Arduino Forum or by writing to support@arduino.cc and support@arduino.org. Your help is very much appreciated. And while in the holiday giving spirit, please consider supporting the Arduino Software by contributing to its progress!

A special thanks to all developers and management team for their efforts in making this big step forward. Happy Holidays!

Web Editor updates: Import your sketchbook and more

 

Some useful updates on the Arduino Web Editor!

Are you sticking to the desktop Arduino IDE because all your work is saved locally? That’s no longer a problem! Our brand new import tool enables you to upload your entire sketchbook with just a few clicks on the Arduino Web Editor. It is particularly handy because it lets you move all your sketches and libraries to the cloud in a single flow.

Once your sketches and libraries are online, they will be available on any device and backed up. For details on how to migrate all your code online, check out this tutorial.

Sadly, Codebender is shutting down. You can use the import feature also to easily migrate to the Web Editor. (More details here.)

If you have a big sketchbook, you may want to clean up or categorize things once in awhile. With our bulk action tool, you can delete, move, or download multiple sketches at the same time. Go to the Sketchbook panel, hover on the sketch icon, and select all the files you want to act on. Doubts on how this will work? Learn more in this guide.

What’s coming next?

We are currently working on a super streamlined way to edit your libraries within the Web Editor, and looking for the best way to implement the Chromebook plugin. Stay tuned!

IDE 1.6.12 released with Sierra support and more

A new version of the Arduino IDE (1.6.12) supporting OSX Sierra is available for download! All OSX users updating to Sierra are invited to also update the IDE to avoid crashes when uploading sketches.

This update includes an experimental integration with Arduino Cloud API already used by Arduino Create. The Arduino Cloud is simple tool to connect your Arduinos to the Internet and to each other. From now on, when you insert for the first time an Arduino/Genuino or AtHeart board which needs an additional core, you will be prompted to automagically install its bundled software.

You’ll notice that the example menu has been reorganized, making it much more consistent and easier to navigate.

We’ve released version 1.0.7 of Curie core as well, which is a transitional release guiding us towards 2.0.0 with BLE central role and a lot of other goodies. You can read all the details on the forum.

Download the new Arduino IDE 1.6.10!

Great news, Makers! We’re excited to announce the immediate availability of the Arduino IDE 1.6.10, AVR core 1.6.12 and SAM core 1.6.9.

The most notable feature of this release is the introduction of an up-to-date bundled toolchain for AVR containing the latest goodies from Atmel, GCC and AVRDUDE devs.

Thanks to LTO (Link Time Optimization), making your sketches smaller and faster is now only a push of the “Compile” button away.

The AVRDUDE update brings out-of-the-box support for a wide range of microcontrollers and debuggers, making it is as simple as possible to deploy. (For example, problems with Gatekeeper on Mac and dependencies on Linux are a thing of the past.)

Likewise, the builder has received the love it deserves and some of its shortcomings are gone forever. You’ll never have to worry again about encountering weird errors if you need to use C++ advanced libraries like .

All these improvements have been shared with Arduino Create, our cloud-based IDE. Check it out if you’ve never tried it, or test out these enhancements if you’re already an active user!

Of course, we also fixed some corner cases for user experience, so now we have a better error reporting when the upload fails and a [nicer] way to include libraries containing lots of header files.

What’s more, we have gone ahead and developed a new firmware and certificate updater for MKR1000 / WiFi101 Shield users–it’s bundled with the IDE and available as a plugin for older installations.

Our community effort continue to grow well with tons of bugfixing, proposals, and libraries added to the Library Manager. As you can imagine, this makes us extremely happy–thank you all for the contributions!

As usual, be sure to check the entire changelog for a complete list of changes and credits. Don’t forget to report any issue you may find, either on GitHub or on the Arduino Forum–your help is very much appreciated.

Go ahead and download IDE 1.6.10! Happy hacking!

Arduino Blog 27 Jul 09:35

Share your sketches on the Arduino Web Editor

Announced back at Maker Faire Bay Area, the Arduino Web Editor is a new online tool that enables users to write code and upload sketches to any Arduino or Genuino board directly from the browser. 

Over the last couple of months, we have been gathering feedback from beta testers on the Editor’s overall experience, its features, and what they’d like to see in the future. If you haven’t signed up yet, you can gain access to the Web Editor right away and try it out firsthand!

Wondering what makes the new platform more useful and feature-rich than its previous version? The most interesting upgrade is surely the ability to share what you make. Every sketch you create has a unique URL, similarly to Google Docs. If you give the URL to someone, they will be able to see your code, add it to their Sketchbook in the Cloud or download it. If you write a tutorial on Project Hub and add the link in the Software section, your code will be embedded and will always be up-to-date.

We envision the Arduino Sketch as the unit that includes everything you need to bring an idea to life. When someone shares a sketch with you, you’ll now have access both to the code, the layout for the electronics, and the full tutorial (when available). This will allow you to have all the necessary information to build on top of the original project, making it your own.

Arduino Web Editor is designed to take the headache out of the development process: your Sketchbook is in the Cloud, available from any device and backed up. Simply save a .ZIP file of your local one and import it in a click.Meaning, you don’t need to install any additional cores for Arduino and Genuino boards, just install a simple agent, plug your board in and we’ll set it up for you.

We made the Serial Monitor pretty robust, and of course, you can finally enjoy a dark theme for your IDE.

We are currently working on the Library Manager (as you have on the Desktop IDE), and a ‘secret tab’ where you will be able to store all your sensitive data and share them safely. At the moment, all the sketches you create on the Arduino Web Editor are public–anyone with the link can access them. We are also developing a private sketch feature–more on that soon.

Interested in learning more? Sign up today and participate in shaping the next generation of Arduino tools!

Discover the latest Arduino build for ARM Linux

As many of you already noticed, we recently released a new “Linux ARM” version of the Arduino IDE available for download on our website together with the usual “Linux 32bit” and “Linux 64bit.”

This release enables you to run the Arduino Software (IDE) on many of the mini PC boards based on ARM6+ processors currently on the market, including Raspberry Pi, C.H.I.P., BeagleBone, UDOO… just to name a few.


The Linux ARM release has been strongly supported by our community and we would like to thank all the people that helped to make this happen: GitHub handles @CRImier, @NicoHood, @PaulStoffregen, @ShorTie8, and to everyone that patiently tested and reported problems.

If you are interested (and brave!), you can read the full story and explore the complete list of collaborators below:

https://github.com/arduino/Arduino/pull/3549
https://github.com/arduino/arduino-builder/issues/105
https://github.com/arduino/Arduino/pull/4457
https://github.com/arduino/Arduino/pull/4517

Disclaimer: The release is “experimental,” meaning that it mostly works but some boards do not work or may not produce the desired result… enjoy imperfection and give us feedback on Github!

IDE 1.6.9 just released with Yún Shield support and more!


Today, we’re releasing a shiny new version of the Arduino IDE, with the usual plethora of features and bug fixes.

The new Yún Shield allows you to upload a sketch over the air on any supported board so, as you can guess, our official cores were updated to support this feature. 

Simply select the YunShield entry from the Network port menu, the base board from the Board menu, press upload and voilà!

You can update the cores via Board Manager to get the latest version (1.6.11 for AVR, 1.6.8 for SAM and 1.6.6 for SAMD) but don’t miss the chance to update the IDE itself.

This release fixes a bunch of long-standing issues:

  • the update popup is no longer always on top, error reporting on multitab sketches now works correctly, and compiling/uploading flows have been revisited
  • the problem with FTDI serial ports on Windows introduced with IDE 1.6.8 has been fixed as well
  • the AVR core now recognizes if a new bootloader is present and uses a safe RAM location to trigger programming (this is particularly important for large sketches, like the ones produced by our friends at Arduboy)
  • the builder has been patched, and is now faster and easier to hack

Release after release the community effort continues to get stronger and that makes us extremely happy! As usual, be sure to check the whole changelog for a complete list of changes and credits.

Don’t forget to report any issue you may find, either on GitHub or on the Arduino forum: your help is very much appreciated — even if you’re not a tech specialist. And please consider supporting the Arduino Software by contributing to its development!

Download IDE 1.6.9 now and happy coding! (You can also read all about the new Yún Shield here.)

Arduino Blog 10 May 11:49

Atomic Arduino (and Other) Development

Even the most die-hard Arduino fan boys have to admit that the Arduino development environment isn’t the world’s greatest text editor (they’d probably argue that its simplicity is its strength, but let’s ignore that for now). If you are used to using a real code editor, you’ll probably switch to doing your Arduino coding in that and then use the external editor integration in the IDE.

That works pretty well, but there are other options. One we noticed, PlatformIO, extends GitHub’s Atom editor. That makes it cross-platform, powerful, and with plenty of custom plug ins. It also supports a range of platforms including Arduino, many ARM platforms, MSP430, and even desktop computers running Linux or Windows.

The author claims the plug in will generate code for over 200 embedded boards. It handles all the common development tasks and even includes a terminal window. There are command line tools if you want to build scripts or make files and bypass the GUI.

You can install Platform.io on Windows, Linux, or Mac. It uses Python, so porting it elsewhere might be easy, too. The feature list is broad: code completion, linting, multiple projects, and library management. It can even import projects from the Arduino IDE. There are plenty of plug ins to add features (like Emacs keybindings, although that took a little troubleshooting).

There is also something attractive about having a single IDE that targets different platforms if you switch back and forth a lot. In all fairness, the Arduino IDE isn’t as bad as it used to be, and they both have significantly improved versions in the works (Arduino Create and Arduino Studio). We’ve seen plenty of other IDE hacks for Arudino in the past.

Thanks for the tip [Martin]


Filed under: Arduino Hacks
Hack a Day 23 Apr 18:00

Welcome Arduino Project Hub and Arduino IoT!

We are finally ready to release create.arduino.cc, the Arduino platform that will provide the community with a more modern and flexible tool to write code, a more integrated way of accessing content and learning while doing.

While we are still busy refining the web-based Editor (IDE) based on the feedback of the current beta-testing program, we are really excited to launch Arduino Project Hub, our tutorial platform powered by hackster.ioWe cannot wait to see all the projects made with Arduino and Genuino boards that you will submit! Comment on the tutorials you are curious about, and ‘Respect’ the ones you like the most. We will feature the best projects on the Arduino Blog!

Within create.arduino.cc you will be also able to access a new website focused on Internet of Things. Arduino IoT collects inspiring tutorials, and provides guidance for anyone who wants to get started tinkering with the Internet of Things. Most importantly it presents the “Arduino IoT Manifesto”, an important statement that will guide the development of our IoT products and tools in the coming years, and that we hope will be adopted by a larger network of people and industries. We propose these three principles for the future of this burgeoning industry: Open, Sustainable and Fair!

As usual if you encounter any issue, or you have an idea you want to share, please let us know on the Arduino Forum, we’d love to hear your feedback!