0

I am going to put linux on a microcontroller, attach an LED to the microcontroller, a battery and hope that the LED blinks. But before I do that I need to put Linux on a microcontroller. And to put linux on a microcontroller I need to know what kind of microcontroller linux can be loaded on.

So my question is this:

What kind of microcontroller can linux be put on (ex. mmu? ARM Cortex A0? max number of timers? max core size?)?

Coder404
  • 834
  • 3
  • 12
  • 21
  • 1
    What are you trying to do? http://meta.stackexchange.com/q/66377/154425 – tyblu Jun 29 '12 at 20:50
  • 2
    Linux kernels are custom-built for specific platforms and applications. Perhaps you could tell us your application in order to get better answers. – tyblu Jun 29 '12 at 20:59
  • 2
    Luckily, if your end goal is to blink an LED, you don't need Linux at all! – dext0rb Jun 29 '12 at 21:12
  • @dext0rb my end goal is to have 3 buttons, a camera module, and some earpieces on a circuit attached to a mircocontroller that has linux running. When one of the buttons is pressed it will preform an action in the operating system (Linux). – Coder404 Jun 29 '12 at 22:11
  • @tyblu I need to run Linux (preferably the version from kernel.org) on a microcontroller – Coder404 Jun 29 '12 at 22:14
  • The answers here are relevant: http://electronics.stackexchange.com/questions/19234/linux-on-arm-cortex-m3-series – Jon L Jun 29 '12 at 22:39
  • 1
    You might be interested in the [Raspberry Pi](http://www.raspberrypi.org/) -- an ARM GNU/Linux box for as little as $25. It's not available yet (which is why I'm not making this an answer) but outfits like Newark are taking [preorders for the Model B](http://www.newark.com/jsp/displayProduct.jsp?sku=83T1943) (which has an Ethernet port, Model A does not) for $35. – tcrosley Jun 29 '12 at 22:51
  • @tcrosley I have heard of it. I was hoping to do this from scratch – Coder404 Jun 29 '12 at 22:53
  • @Coder404 As far as I know, no ARM processors are available in a DIP package, so you will have to design and layout a PCB just to get started. Unless you get an SOC (system on a chip) like that used on the Raspberry PI, you will have to add external flash and RAM. Then depending on the package, it may be either difficult or nearly impossible (BGA) to solder the surface mount package yourself. A lot of work compared to buying a small development board. – tcrosley Jun 29 '12 at 23:13
  • @tcrosley thats the plan – Coder404 Jun 29 '12 at 23:18
  • Buy a Raspberry Pi :-)! – Russell McMahon Jun 29 '12 at 23:20
  • @Coder404 I know you want to do it from scratch, but I highly suggest you base your design on an existing open-source hardware platform, taking and choosing what you want and leaving out what you don't need. The Raspberry PI is unfortunately not open-source hardware, but for example the [BeagleBone](http://beagleboard.org/bone/) (shown in Rocket Surgeon's answer) is. – tcrosley Jun 30 '12 at 02:12
  • Standard Linux needs a processor with an MMU (memory management unit) to work. That's typically a higher class IC that is difficult to work with. I'd suggest looking at the requirements for uClinux... a flavor of Linux designed to operate without an MMU. The requirements are likely to be way easier to manage. Many routers/gateways/etc use this. – darron Jun 30 '12 at 18:42
  • I believe what you are wanting to do is absolutely achievable, but if you haven't designed PCBs with microcontrollers on them before I'd strongly suggest starting smaller first. I'd start with an MSP430 (look at Launchpad, make a custom one), move to a DSP or low level ARM (cost of development environment is likely to dictate the choices here), then the larger ARMs w/Linux or uClinux. A very fun alternative if you want the challenge is to go to FPGAs after the MSP430 level. The development environments for FPGAs are free (at least for mid-level and below... which are still highly capable). – darron Jun 30 '12 at 18:54

2 Answers2

6

There are so many varieties of microcontrollers and Linux installations (angstrom, debian, uCLinux, ...) that the first place to start is with your microcontroller demands...

3 buttons, a camera module, and some earpieces

Buttons and LEDs are GPIO pins and should be easy to accomodate on any processor.

Choose an IC with built in camera and audio support (Atmel 9261 and the TI DaVinci series come to mind but there a lots that have this).

How will you send the earpieces data? SPDIF? I2S? I8S? Analog out?

Look into the battery requirements. How much power will your circuit draw? What voltages are required? What microcontroller low power modes do you need? How long will your device run? Do you need a rechargeable battery? What is the working life of the device? What is the standby life of the device? Will you also be able to line power the device?

Once you have made your processor choice, the selection of a Linux kernel will likely be limited to the processor selected.

spearson
  • 1,533
  • 8
  • 13
4

Linux needs an existing platform as a target to be on support list. For example look at linux distribution builder for Angstrom variety of Linux at http://narcissus.angstrom-distribution.org/ . It has a dropdown list of platforms. Pick one out of like 50-70.

So it is not enough to know the type of processor. To build a distribution one needs to have a platform name known exactly.

Platform typically looks like this enter image description here

  • "To build a distribution one needs to have a platform name known exactly." - no. It makes it easier to use a distribution already made for your platform, but there is no reason why you can't make a Linux for your own platform (we use Linux on our own custom boards at work). There are a number of ways to do this, but if all the OP wants is to blink a LED, there are much much easier ways than custom-creating a Linux installation for a new board. – sonicwave Jun 30 '12 at 08:11
  • Agree. But I read the question as more basic. What is between Linux and bare metal CPU ? New or existing platform. –  Jun 30 '12 at 11:15
  • @RocketSurgeon new platform not existing. – Coder404 Jul 30 '12 at 20:02