What is the best version of Linux for micro controller development ?
blittled
Posts: 681
I know this is a loaded question and hopefully won't start a heated debate but with the advent of the non-PC friendly Windows 8 I want to migrate to Linux. I have a Windows 7 laptop which I want to dual boot into Linux. Originally I was going to use VMBox in Windows 7 but I would rather have Linux as a real OS without any limitations VMBox has. I am looking at either OpenSUSE or Debian unless the Linux users here suggest something better.
Comments
Amanda - Currently running F18
If you're underwhelmed by the pain felt when driving a nail through your foot, then there's always LFS:
http://www.linuxfromscratch.org
I started with Ubuntu and had no complaints (the GUI is klunky IMHO), tried Fedora16 and am currently using it and 18. Haven't really tried any others, I'm relatively new to Linux.
A lot of it is look, feel, how involved you want to be, etc.
Try a few (most can run live systems off a memory stick) then pick one that fits you best.
But really, I think any version of Linux will work about the same of uC work.
Ubuntu has a great community for troubleshooting the problems that occasionally arise, so there isn't much reason for me to jump to Mint.
Knoppix is now on a DVD as it is huge. I find that it is excellent if that is what you require, but way too much for most users... tons of technical stuff, very geeky.
These days, you can just burn a LiveCD or LiveDVD and try many different distributions without installing. I use some for other work. Linux Lite is very interesting for operation from a CD. Much as I dislike the name, Puppy Linux is an excellent repair tool on a CD boot. There are many more. Everything is at Distrowatch.
F
I imagine that on the Pi you are going to be using Raspian which is a build of Debian optimized for the floating point architecture of the Pi's ARM processor. It's very convenient to have the desktop OS the same as your target. You get to know the nitty little details of where things are and how things are configured and tricks with the package manager etc etc etc. Makes life much easier if what you learn for one directly applies to the other.
So I would say get Debian unstable (or "wheezy" as it is called just now). Don't let the designation "unstable" put you off. I have never had problems with it.
I like to use KDE rather than Debians crappy looking Gnome stuff.
$ apt-get install aptitude tasksel
$ aptitude --without-recommends install standard desktop kde-desktop
Plasma desktop is really nice:
$ apt-get install kde-plasma-desktop
Edit:
I'd be inclined to run that Windows in a virtual machine rather than dual boot. All that rebooting is a pain in the neck.
thanks Loopy for the link
So if you are using AVRs or ARMs or Intel or the Propeller, the answers could all be a bit different.
You really have to look into the details of what you want to cross-compile.
For instance, I am using a Cubieboard that is an ARM9 device and similar to a Raspberry Pi. While it does install Ubuntu Linux, the drivers are not well adapted to the particular chip. There is better code out there in a customized Debian package. And the Android package is far more stable than anything released in Linux, even though Android is 'on top of Linux'. Android is not sharing its proprietary solutions. The Cubieboard required a 64bit Intel platform with a 64bit OS. I used 64bit Ubuntu installed on an outboard USB harddisk so as to not disturb the normal configuration of my Intel Quad 64bit.
So for development work, you can have an outboard harddisk provide whatever you want, without disturbing the daily use of your desktop's configuration.
For example. If you are wanting to write C/C++ for the Propeller using propggcc and perhaps SimpleIDE you can do that on a 32 or 64 bit dev machine, you can even do it on an ARM machine or anywhere else propgcc builds.
My suggestion that one might like Debian on the PC when working with the Raspi is only based on the convenience of having a common system at both ends and not having to get familiar with different package managers, configurations etc.
When that's said, Debian unstable _is_ occasionally broken by an upgrade.. much more so in years past though. Usually that'll fix itself after some days if or when it happens. A way to stay ahead of the possibility of a broken upgrade is to 'apt-get install apt-listbugs', which will check the bug database and give you the choice to not upgrade. With another tool you can put dubious packages 'on hold', so that they're not affected by later upgrades (until you decide to 'unhold' them). I use the 'wajig' tool for this (a tool which envelopes all the other package management tools into one: apt-get, dpkg, others, what they do can all be done from 'wajig', and it adds useful commands like 'hold' and 'unhold', and 'new', 'new-upgrades' which show what new packages are available, and what new versions are available)
-Tor
Well, for the Cubieboard I have to use sunxi-tools binaries and the ones compiled on 32bit just wont' install. I suspect that there are lines of 'pragma' in the original C code that make it all 64bit dependent.
With other than AMD or Intel platforms, it is NOT enough to have the original code in C to compile the binaries, you have to have a chip manufacturer that is willing to provide the best optimized solution for Linux.
For ARM9, that seems to be Linux-sunxi.
Cross-compiling to the Propeller is rather simple in C. The Propeller will NOT load a full Linux OS. You need a lot of things that the Propeller just cannot support. With the ARM9, you are actually getting a full Linux file systems, XWindows interface, and HDMI video. Come on, you know it is a System On a Chip... which the Propeller is NOT.
Yes. Sorry everyone. I get confused by all the Debian release names.
Basically I live on "testing" which what the Raspberry Pi's Raspian is. This is currently called "wheezy".
The "unstable" I refered to is even more cutting edge and only for the brave. That's called "sid".
It's all explained here: http://www.debian.org/releases/index.en.html
Ubuntu, by the way is Canonicals hacked up version of "testing" with their own bugs and instabilities added:)
I decided to stick to bare bones, no gui interface and I didn't install any other packages at first. After installing mercurial and cloning the propgcc I had to install gcc package and make package. The first 2-3 builds failed but each time I uncovered another package I was lacking. Finally got my helloworld to build!! The next hurdle was getting usb serial working. I forgot to add the /opt/parallax/bin to my PATH. After that - works like a charm!
Fun.
Did you notice the machine actually running faster than it ever did in XP? My XP/Ubuntu 12.04 dual boot is just a lot speedier in Linux. And I am running 512Mbyte of RAM that is shared with a very old video configuration on the motherboard.
If you do have problems with old boxes, try Linux Lite... it is made for getting old junkers running again.... with a complete GUI.
I just installed Brad's bstc and bstl and successfully tested with a Quickstart board. Although I haven't figured out how to emulate PST from the command line yet.
This is the one reason I keep my I7 8GB laptop running Win7 - I can't handle the guilt of unleashing all that pent up productivity on myself. I fear it would be wasted in fueling further distraction. I like to think of Windows as a natural throttle on my thought processes!
Here's a summary of the software and environment that I use:
I'm looking to port from Protel 99SE to a Linux package or Wine friendly one but it's such a good CAD package still and I have thousands of library components defined.
The other surprising thing about Linux is that practically every time I can just plug some device into it and it just works instantly, no Windoze fanfare and trumpet blowing which usually ends up in a "failed to install" which I find rather surprising because manufacturers supply drivers for Windows, not Linux. That also reminds me that Windows continues to create a new com port for every FTDI USB chip it finds whereas Linux will stick to USB0, UBS1 etc whereas in Windows you are trying to find where that com port is. If I only have one USB serial device connected in Linux then I know that it's USB0 and it's also easy to symlink it too.
jk - But I do have a laptop here running it; maybe I'll give that a go soon.
Oh and did we forget, propgcc, SimpleIDE and friends.
Any other must haves people, err, must have?
http://code.google.com/p/propforth/wiki/LinuxPropforth
It says propforth but it works with any spin.
When I was running an XP virtual machine, I noticed that windows under Linux ran BETTER and seemed overall faster than a native windows install. I think this is due to Linux prevents Windows from choking itself to death, since it only gets part of the resources at any time. But maybe I'm so annoyed with windows so much these days that anything looks better.
My next task is to get my RPi to load spin on my quickstart, but so far this looks a little involved, with several (possibly contradictory) ways to go. I'm not even sure if it has worked yet. But if it does, and indicates moving to debian, I would consider this option.
I have successfully programmed Propellers from the Raspberry Pi using propgcc and SimpleIDE. You should not have to move to Debian on your dev machine to do this.
What I did was compile propgcc and SimpleIDE on the Raspi itself. Takes about 15 hours or so:) It's also a bit tricky. Here are some instructions:
http://forums.parallax.com/showthread.php/141428-propgcc-builds-on-Raspberry-Pi-!!
and follow this link to a ready made package for Raspian including propgcc, spin support and loader. You can also use the serial port on the Raspi GPIO for programming your Prop.
http://forums.parallax.com/showthread.php/141469-SimpleIDE-for-Raspberry-Pi-Raspian
I need to make a new package for more a more recent release of propgcc, SimpleIDE.
I gave up on the dual boot since my Dell laptop won't let me make a System Repair disk which I could restore the MBR in case I wanted to remove Linux. Installing with Windows caused it to crash too. I opted to put Linux Mint on a 100GB External Drive and set my bios to boot from USB Storage Device if present.