Easy and small Linux ARM platform? - Page 1
Forum section: electronics / general

author: casper.bang
author_rank: Frequent Contributor
timestamp: August 21, 2014, 11:13:13 am
content: Ok so I had a bunch of fun with ATiny and GCC, but now I think I want to try out some basic prototyping with a real OS, preferably ARM + Linux territory. I'm a software developer and my needs are purely academic of nature, to understand and get some hands on experience with low-level systems programming. What are the easiest and smallest platform candidates for doing this, preferably with a very low power usage? Raspberry? BeagleBoard?

author: Cside
author_rank: Regular Contributor
timestamp: August 21, 2014, 11:17:28 am
content: ive used the beaglebone black extensively and its really awesome.we made a few capes for it without problems.with an LCD and usb modem working it does draw a hefty current so consider that if doing embedded work.

author: dannyf
author_rank: Super Contributor
timestamp: August 21, 2014, 11:24:46 am
content: QuoteYes.Or those TV usb-sticks, or arm-based phones. etc. The difficulty is to find documents and to program them.

author: casper.bang
author_rank: Frequent Contributor
timestamp: August 21, 2014, 12:07:26 pm
content: Quote from: dannyf on August 21, 2014, 11:24:46 amYeah I actually have an Android USB-stick for HDMI with a Rockchip, but the toolchain and driver story is a nightmare - Chinese vendors do not understand that using copyleft software also require them to disclose their stuff under the same license!

author: bwat
author_rank: Frequent Contributor
timestamp: August 21, 2014, 03:04:32 pm
content: If you want to learn about low-level systems programming then do some low-level systems programming. Installing a *nix on an ARM board is more of an exercise in integration and tool use. Of course that may be what you're actually wanting to do.

author: casper.bang
author_rank: Frequent Contributor
timestamp: August 21, 2014, 03:18:16 pm
content: Quote from: bwat on August 21, 2014, 03:04:32 pmI hear what you are saying. However, with constraints comes focus. I don't need NUMA, hyperthreaded, out-of-order uber-complex CISC stuff topped up with MMX, SSE, SSE2, AVX, AVX2, FMA... you get the idea!

author: legacy
author_rank: Super Contributor
timestamp: August 21, 2014, 03:18:32 pm
content: QuoteIt may be you can be interested about things likethis(Arietta, made by ACME-System)

author: bwat
author_rank: Frequent Contributor
timestamp: August 21, 2014, 04:00:39 pm
content: Quote from: casper.bang on August 21, 2014, 03:18:16 pmWhat I meant was more along the lines of installing Linux on a platform isn't really thatinteresting(and I rarely understand why a multiuser OS is used for embedded systems) but I would definitely say go for ARM development if you want to do low-level programming. I've had only good experiences with driver development with ARM platforms (smartphone products using Symbian OS). If I were you I would write my own kernel as it would force me to figure out how to bootstrap software on the platform, handle interrupts, and I would have to configure timers and other hardware to get something useful. I usually port my kernel to new platforms to figure out the lie of the land.

author: dannyf
author_rank: Super Contributor
timestamp: August 21, 2014, 05:17:16 pm
content: QuoteMaybe you will have better luck with Google (Chromecast) or Roku - those devices are not expensive, particularly on the used market, and those companies are US-based so maybe they are better positioned to help you.

author: legacy
author_rank: Super Contributor
timestamp: August 21, 2014, 05:18:13 pm
content: AlsothisGNUBLIN tiny board in DIP40 package, it's very cheap and very easy ARM chip able to run linux.

author: andersm
author_rank: Super Contributor
timestamp: August 21, 2014, 05:24:31 pm
content: Atmel'sSAMA5D3 Xplainedis a nice and relatively inexpensive Cortex-A5 based board, but it doesn't have the community of the RPi, BeagleBoards or similar.

author: SirNick
author_rank: Frequent Contributor
timestamp: August 22, 2014, 01:08:53 am
content: For development work, the BBB is a good choice. Here's why I would choose this (well, why Ihavechosen this) over the RPi...(Some of this assumes you might want to grow into your own product. If not, it may not apply.)- It's popular enough that it has a community, and a few distros ready-to-go. A baseline is very nice so you aren't forced to start at zero.- The hardware design is open. You can take the design files, modify them, and produce a product without any concern. TI / BB endorse this path.- The software is less encumbered by binary blobs. IIRC, you still need one for OpenGL (I think), but 2D is doable with OSS. This may or may not concern you.- The CPU is available in single quantities. No need for NDAs. No need to stack SMD packages on each other. You get the parts manifest for free, and can duplicate it or examine the datasheets as required for your purposes.- It's faster. Not by an enormous margin, and certainly not compared to a PC or late mobile phone, but it helps. (Compiling X on Gentoo was an exercise in patience. Recommend cross-compiling what you can.)- In general, it seems to be a more solid device. Ethernet and USB are implemented fairly well. You get on-board flash and SD-based storage to choose from.- Cost, after including the req'd SD card for a Pi, is about the same. OTOH, you will need a mini-HDMI cable if you don't already have one lying around.If you're interested in developing multimedia (read: video) projects, go with the Pi. For audio only, the BBB might be better. The McASP is a beast with serious potential. It is nearly wasted on the BBB, but you have access to the registers and a few of the required pins, so you can at least get started before spinning your own reference board.

author: casper.bang
author_rank: Frequent Contributor
timestamp: August 22, 2014, 04:42:03 am
content: Thanks for the feedback guys. I'm very close to ordering a BBB, apart from a small power-envelope (1-2W is low but not anywhere close to the ATTiny stuff I am used to), it seems to be what I need.

author: David Hess
author_rank: Super Contributor
timestamp: August 22, 2014, 06:35:07 am
content: SirNick covered the reasons I would pick the BBB over the Raspberry Pi. The documentation is better, it is more open, the parts have better availability, and the hardware including the Ethernet interface is better.

author: Laurynas
author_rank: Contributor
timestamp: August 22, 2014, 07:17:52 am
content: Check out olimex stuff, they got quite a few interesting boards and their quality is very good.I have this one:https://www.olimex.com/wiki/A20-OLinuXino-LIME

author: poida_pie
author_rank: Regular Contributor
timestamp: August 22, 2014, 09:12:22 am
content: raspberry pi? no a-d but I am using them for a barcode data acquisition project here at work.Cheap and well supported by OS's.

author: SirNick
author_rank: Frequent Contributor
timestamp: August 22, 2014, 07:13:05 pm
content: Quote from: casper.bang on August 22, 2014, 04:42:03 amFor sure. The ATtiny is nowhere close to the CPU that you'll need to run Linux either. (Not to speak of all the peripherals, like Ethernet and HDMI.) With great power comes great power demand.

author: bwat
author_rank: Frequent Contributor
timestamp: August 22, 2014, 07:23:29 pm
content: Quote from: SirNick on August 22, 2014, 07:13:05 pmReminds me of the following:QuoteThe quote is fromPOSIX.4 Programming for the Real Worldby Bill O. Gallmeister, 1995, O'Reilly. The book is recommended - a very enjoyable read and pretty useful too!

author: dannyf
author_rank: Super Contributor
timestamp: August 22, 2014, 08:28:44 pm
content: QuoteNot unusual. There are a lot of peculiar ways to evaluate software. "Low cost" means different things to different people.

author: igendel
author_rank: Frequent Contributor
timestamp: August 22, 2014, 11:39:26 pm
content: Hi, apologies for budging in, but since BBB was mentioned...I own a BBB which I currently use as a (weak) Ubuntu 12.04 desktop computer, for the children and such. I would like to do some stuff with the GPIO, but the material I found so far about it seems too complex to my noob Linux skills. At this point I'm not asking for much - a simple, slow digital IO will be enough.Is there a way I missed, to access the BBB GPIO comfortably from, say, Python, or generally as a pseudo-file device? Any information will be greatly appreciated!

author: nctnico
author_rank: Super Contributor
timestamp: August 23, 2014, 12:01:15 am
content: Scroll down to around line 450:http://lxr.free-electrons.com/source/Documentation/gpio.txt?v=2.6.27

author: igendel
author_rank: Frequent Contributor
timestamp: August 23, 2014, 01:23:43 am
content: Quote from: nctnico on August 23, 2014, 12:01:15 amHmm. A little verbosebut I'll try to see what I can make of it after I get some sleep. Thanks!

author: JoeO
author_rank: Frequent Contributor
timestamp: August 23, 2014, 02:25:41 am
content: Adafruit has many many tutorials about BBB, RPi and other topics.https://learn.adafruit.com/

author: SirNick
author_rank: Frequent Contributor
timestamp: August 23, 2014, 03:06:52 am
content: Indeed. Here's result #1 from Google: "BeagleBone Black gpio python"http://learn.adafruit.com/setting-up-io-python...beaglebone-black/gpio

author: igendel
author_rank: Frequent Contributor
timestamp: August 23, 2014, 09:06:45 am
content: Quote from: SirNick on August 23, 2014, 03:06:52 amYes, however that's a "black-box" solution, while I prefer to know what is actually happening - I mean, if such a process is absolutely necessary, so be it, but one would think that the developers of the BBB didn't count on Adafruit to provide the GPIO functionality to their average user...

author: SirNick
author_rank: Frequent Contributor
timestamp: August 26, 2014, 07:15:01 pm
content: The processor has registers that can be written to and read from. Doing this requires low-level access to the CPU, which, in a Linux environment usually means you need a kernel driver (which should be already present in your chosen distribution), and then you need an interface library for your language of choice.For Python on RaspPi, this is "RPi.GPIO", as seen here:http://www.raspberrypi.org/learning/quick-reaction-game/I didn't read much of the Adafruit tutorial when I found the link (because I prefer languages that allow arbitrary white space) and it appears the link is dead now, so I can only assume there wasn't anything Adafruit-specific in the previous tutorial. Sometimes they write their own libraries when there's no other or better option, but generally they're not big on reinventing wheels. Regardless, the Raspberry Pi Foundation's tutorial ought to be as official as it gets.

author: nctnico
author_rank: Super Contributor
timestamp: August 26, 2014, 08:31:42 pm
content: Quote from: SirNick on August 26, 2014, 07:15:01 pmActually you don't have to that. With the mmap function (C) you can access the physical memory space (and thus registers) from an application.

author: SirNick
author_rank: Frequent Contributor
timestamp: August 26, 2014, 10:41:53 pm
content: Hm, I thought those regions were already mapped to files in like /sys or something..? Are they concurrently accessible? (Haven't done much with mmap at this stage in my dealings with C.)

author: nctnico
author_rank: Super Contributor
timestamp: August 27, 2014, 12:34:21 am
content: AFAIK you can write the entire memory using mmap() without any limitations. I have used it before to read some registers in a SoC but my memory is not serving me well at this moment.

author: RoadRunner
author_rank: Frequent Contributor
timestamp: August 27, 2014, 06:31:56 am
content: i was at same position as you are currently few months back.and what i learnt , you need1. community support , it should be huge.2. open hardware3. already running distributions.4. lots of expansion headers.so i suggest you to go raspberrypi b+ or beaglebone black.

author: westfw
author_rank: Super Contributor
timestamp: August 27, 2014, 08:41:43 am
content: QuoteArguably, once you have linux, you no longer do "low-level systems programming"; you mostly do "linux systems administration." (And I've been amused to watch beginning arduino users who asked basic programming questions move to Raspberry Pi and start asking basic linux admin questions.)I guess there are things that are comparatively low-level: writing network daemons or middleware that speaks to sockets and /dev/etc instead of being off in the GUI stratosphere, but it's a lot different than programming an arduino. (Given an I2C device driver provided to you, you'd still have some effort required to be able to interface a 9DoF sensor array to your high-level SW.)There COULD be a community of people writing device-driver level firmware for the small linux boards, which is more what I'd consider to be really low level. But I'm not aware of anything.

author: nctnico
author_rank: Super Contributor
timestamp: August 27, 2014, 11:41:16 am
content: Unless it is your goal it is quite tedious work to write devices drivers and put a working Linux distribution together. I went through this process several times. So if you can get a board which already has a good kernel available and a complete Linux environment it is a big plus because you can start doing interesting work.

author: mrflibble
author_rank: Super Contributor
timestamp: August 27, 2014, 04:43:40 pm
content: Quote from: nctnico on August 27, 2014, 11:41:16 amYup. In eons past I used to write kernel drivers for projects, but that is indeed quite time consuming. With the introduction of modules development became easier but still took up a nice chunk of time. Implementing it in user space is so much easier. And since there's user space hooks for quite a lot of things these days, user space it is.

author: SirNick
author_rank: Frequent Contributor
timestamp: August 27, 2014, 09:13:26 pm
content: Quote from: westfw on August 27, 2014, 08:41:43 amWell, it's not exactly a buzzing community, but it does exist. Examples:I've lurked in a few threads where people discussed hacking device drivers for (e.g.) the BBB to get some peripheral working. A lot of the peripherals on the CPU require other stuff (e.g., audio, HDMI, etc.) so you have to be willing to hack at the kernel driver level. Ditto with specialty projects like the community Squeezbox player, or OpenElec. Even the RasPi forums have a few people moving the X Windows drivers along and whatnot.Certainly not the bulk of that space though!

author: salfter
author_rank: Contributor
timestamp: September 02, 2014, 05:17:45 am
content: Quote from: westfw on August 27, 2014, 08:41:43 amNot all driver development is necessarily tied to embedded systems. I recently designed and built this1-Wire/I2C breakout board for the Raspberry Pi, for instance. To switch a solid-state relay on and off, I included a DS2406 1-Wire addressable switch on-board. When it came time to write the software for my intended application (a temperature controller for my brewing fridge), I found that there was no driver for the DS2406 in the kernel 1-Wire stack. (It's supported by owfs, but owfs doesn't support bit-banged 1-Wire on the Raspberry Pi...it's intended to be used with USB 1-Wire interfaces and such.) I started with another 1-Wire driver (think it was for the DS2413) and modified it to work with the DS2406. I submitted it for inclusion in the kernel, and it's slated to appear in Linux 3.17. It'll work not just on the Raspberry Pi, but on every system that can use the kernel 1-Wire stack (which is nearly everything that can run Linux).