Channels ▼

Al Williams

Dr. Dobb's Bloggers

Galileo: The Slowest Fast Computer Around?

January 28, 2014

A few weeks ago I mentioned I had picked up an Intel Galileo. I spent about $60, and for that price I got a pretty interesting little board. Based around an Intel x86-based system on chip, it sports a 400MHz processor with 512K of onboard memory, an additional 256MB of external RAM, USB host and client ports, Ethernet, an SD card slot, and a mini-PCIe card slot. On top of that, it has all the same I/O pins as an Arduino, using the same "shield" layout and can use the Arduino software.

Sounds amazing, right? An Arduino on steroids for $60. Sort of, but not quite. The problem is that the Galileo actually runs a form of Linux.

If you know me at all, that last sentence should have made you do a double take. When have I ever been against Linux? I'm not. However, trying to marry Linux and Arduino together isn't giving me a good feeling and I'll tell you why.

I tried plugging an LCD daughterboard (I hate saying shield) into the device with an eye to porting an Arduino operating system project over to the new board. The LCD simply didn't work. A little surfing online turned up that it may or may not be a library problem, but that there was some consensus that the Galileo may be too slow to drive the LCD using the Arduino code. Too slow? The thing has a 400MHz processor, right?

It does have a 400MHz processor running Linux. It emulates the Arduino using some method I haven't dug into yet and it is substantially slower than a real Arduino. How much slower?

I wrote a very simple program to just toggle a digital I/O pin quickly. I know there are lots of tricks you use to make a real Arduino go faster, but I didn't really care. I just wanted some point of reference. Here's the code:

void setup() {
int bit=0;
pinMode(2,OUTPUT);
while (1) digitalWrite(2,bit=!bit);
}

void loop() {
    
}

It is hard to imagine a simpler program. The figure below shows a standard Arduino Leonardo running that program (I hate to say sketch).

Now here's the exact same sketch on the Galileo:

Do they look almost the same to you? They might at a glance, but look at the time scale on the oscilloscope. The Leonardo is pulsing the pin at just under 100kHz. The Galileo with the same code is managing 223 Hz. That's not a typo. The Leonardo is not quite 500 times faster than the Galileo.

There is an old saying that less is more. I prefer the saying that just enough is more. Sometimes the Arduino — or a similar small embedded processor — is just what you need. Sometimes you need a Linux computer. It is hard to see where a Linux box with a very slow Arduino onboard gets you.

Maybe I'm just too early to the party. If you told me this is a Linux box with support for Arduino daughterboards — er, shields — then I get that. There are plenty of inexpensive daughterboards for Arduino. Of course, then you need to pony up Linux driver support for those devices, too, and that could be a mess.

If you told me you have a full-featured Arduino that could cooperate with running Linux programs, that might be another thing. I'm told you can do this, but with the fake Arduino onboard running at 1/500th the speed of a standard Arduino, I've lost interest.

In time the board could become a competitor to things like the Raspberry Pi or the Beaglebone (both of which I've used and like). Even so, it has a slightly different niche. The Pi and the Beagle are both a little I/O anemic but offer niceties like video output and sound (the jack on the Galileo that looks like audio is actually for a serial port). So a media center project is still going for a Pi. A project that needs a mini-PCIe card and no real display might look at a Galileo.

Will you use a Galileo? What's your dream mashup for an embedded Linux board? Leave a comment and share your thoughts.

Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.
 

Comments:

ubm_techweb_disqus_sso_-b51f7a869a1175412e56da18be4810cb
2014-02-09T04:16:30

Yes, actually I posted on Feb 4 about fast i/o mode (see http://www.drdobbs.com/embedde.... I mentioned in this post I knew there were faster ways to go. But the point is if I get some 3rd party library meant for Arduino it isn't going to use fast mode. Nor are many prospective users going to dig into a library to "fix" it. That was my point. I appreciate everyone who has pointed this out, but I still stand by my original assessment: If you want a Linux board this is a good thing. If you want it to take Arduino plugins that you will have to write and/or modify software for, great. If you are looking for a plug and play "super Arduino" this isn't really fitting the bill today.


Permalink
ubm_techweb_disqus_sso_-1014e36a3d984d4a6a338fa0b3723c32
2014-02-07T00:49:44

Al,

It seems you may be running in default GPIO mode. See the following post which talks about OUTPUT_FAST mode which will give you 477 kHz - 2.93 MHz
digitalWrite() is 477kHz, fastGpioDigitalWriteDestructive() is 2.93 MHz

https://communities.intel.com/...

(P.S. sorry about the Disqus ID, I'm not a DR nor do I play one on the net, I don't know how to configure that at the moment)


Permalink
ubm_techweb_disqus_sso_-3aea9e4cb5c35523f85bc45154c926a5
2014-02-06T23:16:21

The Galileo board looks to me as a quickly put-together response to successful AVR and ARM boards like Arduino and Beagleboard. On those boards, peripherals like GPIO hang off a simple internal system bus. Intel's interchip bus is PCI (yes, it originated as such, and was connectorized only later), and it's so complicated that they probably couldn't do a quick and inexpensive PCI-based GPIO, so they punted to the horribly slow i2c implementation. They actually quote the 200Hz in their product literature somewhere.


Permalink
ubm_techweb_disqus_sso_-a0fd9f7501b1448d51e2ce831947afac
2014-02-06T19:12:07

I ordered one to play around with, I generally like to compare and find niche areas where I may use one or another. That being said there is a very interesting board many may be interested in check out - It's a bit on the bulky side but incorporates two chips ARM iMX6 Freescale to run either linux or android and the same ARM as the Arduino Due - if you put android on it's like having your Android phone connected to an Arduino Mega ADK all in one:

http://www.udoo.org/ - I was a kickstarter supporter and have some upcoming projects that I plan to use this board for.


Permalink
ubm_techweb_disqus_sso_-9d6c4fda09498d3f0a6efd20ffce0243
2014-02-04T22:21:18

When I saw that the Galileo came out I read up a bit on it and I didn't see why I would be interested.
Now I know the arduino runs emulated I can understand that Arduino wants the board for market positioning but it is not my cup of tea.

My advice: If you want Arduino and linux get yourself a yun. That is arduino (leonardo) + linux (openwrt based) +wifi. Ideal for a small mobile robot that needs the response speed of a arduino and a linux side. You can for instance use the linux for a web interface to your robot.
Ok leonardo is not compatible with all shields and the yun has some (V1) wierdness but the arduino does act like a arduino.

Best regards
Jantje


Permalink
ubm_techweb_disqus_sso_-b51f7a869a1175412e56da18be4810cb
2014-02-01T00:27:52

Well, I think we are saying the same thing in a different way. You can get better performance out of Linux, but--of course--you will incur overhead compared to a small single-tasked processor. My point is that if I were the maker of this board, I don't think I'd position it as a super Arduino, but as a Linux board with some unique hardware plug in options.


Permalink
ubm_techweb_disqus_sso_-4c554988e44d7a8b602e84befb972b98
2014-01-31T00:36:57

Dear sir. Please remember that an elephant is a mouse with an operating system. With Linux you have to request the OS to handle all I/O. Besides, the x86 architecture has too many registers to save and restore in a context switch while in protected mode, as in Linux. For a fast servo, you need code over bare metal. For controlling several furnaces, linux is good enough. IMHO.


Permalink
ubm_techweb_disqus_sso_-b51f7a869a1175412e56da18be4810cb
2014-01-30T16:34:23

Well, I don't think it is ridiculous. I've written before about
optimizing digital I/O on the platform but I just wanted a simple
comparison. I don't question the Galileo will have a lot more horsepower
on compute tasks. But that's atypical--in my experience--of why I want
to use an Arduino.

If you take it as a Linux board, then sure. You can
compete against the Raspberry Pi and the BeagleBone/BeagleBoard. It has
some compelling features (like mini-PCI) although it lacks others (like
video output). Depending on your application, you may prefer one to
another. But I would expect such a fast machine to have better emulation
of the Arduino if it is going to attempt to do so. The port expander on
a serial bus is going to be slow for I/O. And if I don't need I/O, what
do I care about Arduino compatibility?

So, sure, a floating
point benchmark or any other compute bound test is going to skew to the
Intel board (and would be a more fair comparison to a Raspberry Pi). But that misses my point. If someone would produce a board like this with a true Arduino "coprocessor" that would be something else. That's not what this is. And since it is positioned as a "super Arduino" by its maker, I think it was a fair test.


Permalink
ubm_techweb_disqus_sso_-aedca5b883e47f3f84111c2883913dc4
2014-01-30T13:16:46

Hello Al,

A ridicules comparison!

DigitalWrite() is intended to be used for creating simple and
compatible IO write programs.
Use for example a floating point type of benchmark to compare the performance between Intel Quark and Atmel CPU.

Frank


Permalink
ubm_techweb_disqus_sso_-7258194aaa6239ac944ea8fcab5318ea
2014-01-29T22:35:14

Al, your observations are correct the Galileo board is emulating an Arduino shield over a SPI/I2C interface as summarized in my blog http://bentuino.com/what-shiel.... It is an interesting approach. However Intel would probably have been better off to use an Atmel CPU instead of the Cypress GPIO expander.


Permalink


Video