Running Golang On The Intel Edison

Intel Edison on a box

While most embedded development is still done in C and/or assembly, some people are working with more modern languages. The team over at Gobot has successfully managed to get Go running on the Intel Edison.

The Go programming language, which has been around for about five years, compiles to machine code like C. It has a number of modern features including concurrency, garbage collection, and packages.

We’ve looked at the Edison on Hackaday before, and even took a detailed look at the hardware. It features a Quark SoC, Bluetooth, and WiFi, which makes it well suited for connected devices.

Getting Go to work on the Edison hardware wasn’t particularly difficult, since it supports the Pentium instruction set and MMX. However, a library was needed to interface with the Edison’s peripherals. The Gobot team whipped up gobot-intel-iot, which makes it easy to work with GPIO, I2C, and PWM.

After the break, the team demos PWM on the Edison using Go.

20 thoughts on “Running Golang On The Intel Edison

  1. I should go learn go. ..ahaha.

    Seriously though, cool to see some actual use of the edison. I suppose it’s still fairly limited in availability, but I’m surprised we haven’t seen too much done so far with it.

    1. Go is just a hipster language. Every generation of youngsters reinvents the past with new syntax. They think they are hot shit with a bunch of buzzwords and technical terminology while failing to realize there is seldom anything new under the sun, and when there is it isn’t “easy” and it isn’t “cool” and there is never a free lunch.

      If you want real speed, learn the arcane language known only as “C”. But first learn how your target processor works in great detail, including working knowledge of its assembly.

      If you want fancy advanced powers, learn Haskell or the like. Beware of Lisps, the community is so fragmented that even the most popular dialects do not have much traction. Learn a few, but beware.

      If you want to be lazy and appear to have speed and power without the costs of learning Haskell or C, use whatever you already know because no middle-of-the-road imperative but garbage collected language with a handlful of pseudo-functional features and pretentions of magic parallelism will deliver.

      Hold on to your fedora and horn-rim glasses, here comes the rhetoric…

      1. Ted,
        You really didn’t make homework before posting.
        This language was made by Ken Thomson (yes, this one who wrote C) and Rob Pike. Google these two before you call them hipsters. Language is heavily use inside google and some major companies. They just don’t make halo because they are not hipsters..

          1. Ken and Dennis actually compete between each other – that is how “C” was born. They was friends and colleagues in Bell LAB’s. Some years later Steve Jobs stolen UNIX university version known like “FreeBSD” and made billions by adding GUI and Multimedia to the most stable OS in the world. In attempt to hide UNIX and C core – Apple recently come up with “design” improvement for “C” called “swift”. They never pay any tribute to Dennis Ritchie, Ken Thomson or Bell (AT&T) – and this is what is disgusting about Apple and Steve Jobs.

      2. C is great, but the simple fact is that there is a far, far greater demand for programming than there is a supply of programmers who can make C work in a clean, fast, and economical manner. The answer you need to ask yourself isn’t whether you should use C vs. Go, but rather whether you should use C++ or Java vs. Go. For this second question, I have a feeling that you are like me, and you will pick Go.

      3. This isn’t some young new generation of people. The people who made Go helped make C. And Go doesn’t stray far from C, it just makes it closer to Plan 9 C(that includes the concurrency stuff) and adds garbage collection

      4. How cute, you think C is fast….
        If you want real speed, learn the arcane language known only as “Assembly”.

        There is a reason the best programmers will drop down to Assembly for critical tasks that need to be fast. It’s why Steve Gibson wrote SpinWrite in Assembly.

  2. It is the same price as a mini Intel based thin-client computer.
    It is designed to cannibalize the Arduino community user base, and revert them to the antiquated Intel product line.
    It would have been more significant prior to the 2011 launch of the popular $35 ARM based 1GHz+ boards.

    6+ million users is large enough for Intel to consider a competing product.
    The trouble is, they are already competing against themselves…. and 3 years too late…

    Hey Intel, ask your shills to use software to upgrade the CPU like the i7… lol…
    You would be out of business already if AMD was 20% less garbage.

    1. Intel tried to kill x86 twice, first with Itanium 1 and then Itanium 2. Microsoft tried to move to PowerPC, also. In any case, the big x86-64 units are very modern CPUs which merely have a translation unit on the front end — and this unit is negligible in comparison to the rest of the CPU size. For the Atom and Quark, though, I agree with you — ARM is the way to go at this level.

      1. I agree ARM cores are more suited than Intel cores in this segment and generally offer more bang for buck (have a look at the $39 PCDuino Nano with a dual core 1GHZ A7 core, 1GB RAM, 4GB flash, SATA, USB, Ethernet and Arduino form factor). But I have to give Intel credit for breaking into this segment and making x86 cores accessible to hobbyists.

        One area where ARM really sucks is graphics drivers under Linux. Intel is leaps and bounds ahead on ARM here. ( i do realize that this doesn’t apply to the Edison per se but it is still a valid point). Also Intel has better mainline Linux kernel support than ARM, but that is changing.

  3. I have started learning and using Go and I must say it is quite impressive. Its compiled, garbage collected and has concurrency built in. It does OOP but without classes and can be easily cross-compiled by design.

    Golang is easy to learn and borrows concepts from C, Python and even Javascript. It is terse….perhaps not the most expressive language, but it is most effective when viewed as a tool.

    It’s ideal audience I imagine would be system programmers that program in C and Python developers looking to get a bit of an edge in overall performance.

    No it does not run faster than C. But running a server in Go is like two lines. A basic C server using BSD sockets would be at least 20-30 lines. This brings me to another point, it has a pretty impressive standard library.

    I think that Go is a great language and it has a very bright future!

  4. The Intel Edison is a dual core processor. I must admit that it’s a pretty awesomeoffering from Intel. It also makes a cool platform for evaluating Go’s concurrency.

    But Go’s concurrency would really shine on 4/8 core platforms such as the ODROID boards or the upcoming AllWinner A80. Go supports native and even cross compilation on both ARM and x86 cores.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.