3

So, I know Linux kernel is quite "heavy" when considering lower scale embedded systems, but currently but we're a 2 man team trying to see how to create our own embedded system. I'm the one in charge of all software (the other guy is a HW guy), and thus I would like to re-use existing libraries and frameworks as much as possible, and I would like to bounce off some ideas with gurus around here.

I am fairly comfortable in Linux, but the booting and initialization process is new to me, and I need to dive in to that soon enough. Any book recommendations are welcome as well! I haven't designed any embedded systems before.. Only own some ARM dev boards (beagleboard and raspberry pi).

Current I have prototype of the software running on beagleboard already, and now we're thinking how to minimize the cost, and to create something our own..

It's a system connected to the internet, and I need to run a tiny web server with some scripting support. Performance wise I don't think it needs to be too powerful.

I would like to minimize all bootloader etc work, since I'm a one man SW team, and just concentrate on the application itself. Of course I understand that I need to configure our kernel for this, but this is indeed why I thought selecting some SoC would be good, since they usually have some linux and bootloaders ready..

First I thought that Cirrus EP9301 would be perfect, since it seems to be a good package, and not very expensive.. But it seems that it's already in end-of-life, and also support for this is very bad (people on the cirrus forums constantly complain about it).

Are there some good choices for this kind of project, which would enable us "easily" to get linux kernel up and running, with still maintaining some kind of decent BOM (hopefully 20USD or so) ?

artless noise
  • 21,212
  • 6
  • 68
  • 105
julumme
  • 2,326
  • 2
  • 25
  • 38
  • I'm not a network person, but I would start the other way around. Check what kind of free software there is. Ethernet driver + TCP/IP protocol stack. Then check if there is a "high-runner", somewhat modern CPU supporting that driver. Then decide whether or not you even need an OS. – Lundin Aug 22 '12 at 11:05
  • Ludin, thanks for your comment. I think this was exactly my thinking (though not other way around as you suggest), try to find a SoC, that would already have some linux configured for it and working, then I know that I just need to adapt the kernel to our configuration, and I could have a reference one as well... Thinking the other way around is quite challenging for me, as this is all new to me still... – julumme Aug 22 '12 at 13:23

3 Answers3

4

Your hardware guy should already know this, but go with an existing reference design. Take the raspberry pi, the beagleboard/bone, open-rd, or any number of other existing systems and clone the part you need. As a result the linux porting will be a matter of removing what you are not using from the reference design instead of adding new stuff and hoping it works. If you go with flat pack parts you can do the work in your garage, if you go with bgas you need the equipment for that or pay someone to do it. (can you tell yet that I hate bgas?).

Is linux a requirement, if not that opens the door to a lot more devices using freertos or chibios or a number of other solutions. the stm32f4 discovery board for example is $20, uses what can barely be called a microcontroller for all the features it has (cortex-m4). Supposedly possible to run uclinux on a cortex-m, but definitely possible to run any number of rtoses and have an ip stack, etc. stellaris (ti.com) has a number of eval boards, one/some with ethernet already (use as a reference design). You can also take the wiznet approach (or a spi ethernet) and use any microcontroller (puts you into the avr/msp430 level and price range). Bang for buck the cortex-m's are good, arm based so comfortable to work with, etc.

Using linux if you are already not an experienced at porting to an embedded platform, and dont want to learn that on this go around, I would definitely go with a clone of an existing design, leverage as much as you can from a project with folks that are experienced at porting linux to a platform. If need be take an existing board (beagle/raspi/openrd) and go through the motions of porting to the platform with the cheat sheet of having access to an existing port, see if you cant get uboot ported and linux booting, etc. (dont really need uboot at all, that is possibly an unnecessary complication, just get dram up and pass the atags, etc to linux and just branch to it, pretty easy to launch linux from bare metal).

old_timer
  • 69,149
  • 8
  • 89
  • 168
  • 1
    I'd agree with all of this. As an intermediate step, it might be worth finding a manufacturer of system-on-module boards with the CPU you want to use and building a mating board of your own to mate it with - this way you can get up and running very quickly - with working boot loaders and kernel and later on go for cost reduction with your own CPU modules. Bootloaders are useful in all kinds of scenarios - not least in facilitating software upgrade. Check out [http://barebox.org/](Barebox) as a more hackable alternative to u-boot. – marko Aug 22 '12 at 15:21
  • I was thinking of mentioning those as well as a solution, but the problem is those modules are already too expensive for the desired price. Certainly as an intermediate step those modules open the door to many more already working systems to borrow from. – old_timer Aug 22 '12 at 18:53
  • embeddedarm.com is another place for boards that already run linux, esp if you are looking for cirrus chips I think they use some cirrus and some cavium. – old_timer Aug 22 '12 at 18:54
  • Thank you dwelch for your suggestions. Yes, for me it feels more less of a burden (perhaps just in the back of my mind) to work with linux, as it's already familiar for me. Also, since my application uses webserver with some scripting, and I need a place to store some data, it feels easier with some tools already "at hand". Beagle is good reference indeed, but the SoC there is pretty expensive.. Do you know what I should take in account if considering moving from TI3525 to a lower spec TI3352 ? I mean as a SW guy.. I will ask my HW guy to look at the differences as well. – julumme Aug 23 '12 at 13:19
  • @julumme A factor you need to consider is whether you can actually buy the silicon *at all*. Most members of the OMAP family are targeted at mobile devices with large volumes - typically millions of units. TI's [Sitara](http://www.ti.com/lsds/ti/dsp/platform/sitara/whats_new.page?DCMP=AM33x_Announcement&HQS=am335x) range is OMAP tech packaged for industrial uses - often with more convenient IO, and is probably a much more appropriate choice for you. You can easily get these parts through distribution whereas the OMAP range are only available direct from TI - and only to major OEMS. – marko Aug 23 '12 at 13:44
  • You need to look at the documents for the to and from parts, and look at the linux drivers for existing ports. Perhaps there is already a TI3352 linux port/drivers. Perhaps one uses a serial port that is not on the other, etc. Even if you use the same part, if your board is lower priced and less complicated I assume you are going to have to either rip stuff out of linux or at least not enable the drivers for things that are not there and will get in the way. I dont know the parts you are talking about intimately, I would have to do the same research to give a more complete answer. – old_timer Aug 23 '12 at 13:47
  • Marko, yes, I also read that Raspberry PI got a really good deal for their soc.. one that probably most people cant. The Sitara range indeed seems like a good option.. I see that for example Digikey sells those.. StackOverflow doesnt seem to have "send email to this user" option, I would like to ask few more questions regarding hw integration, but they are no longer really related to the original question.. MArko, would you mind if I contact you directly? I can be reached as juhalumme in googles mail service – julumme Aug 26 '12 at 04:14
  • dwelch, I have accepted your original answer, thank you for that. May I request same for you as Marko? I would like to ask couple more questions regarding hw integration from people who obviously have been doing this for a while.. But they are bit further from this topic, but I think they would be good to know when choosing SOC a and moving forward – julumme Aug 26 '12 at 04:16
1

You could probably do worse than taking the Broadcom BCM2835 - used on the Raspberry Pi - as your starting point - especially if you want to avoid kernel and boot-loader work and a source of reference schematics. If this proves too expensive, check out other devices in the Broadcom range.

A few bits of advice

  • You probably want some flash rather than a MMC card interface for production use. eMMC is an option. NAND flash is a nightmare due to rapid component obsolescence and the need to get own and dirty with the MTD drivers.
  • USB Ethernet will be easier to integrate than a controller hanging off a general purpose bus, but won't perform as well. SmSC seems to be popular source for either
marko
  • 9,029
  • 4
  • 30
  • 46
  • Marko, I thought about the same, but I'm guessing BCM2835 must be expensive, since it has GFX accelerators and all.. Also I couldn't find any mentions about that in Broadcom site (?) Do you know where one could possibly get it ? (to evaluate BOM cost) I liked Cirrus site, since they had all the docuementation, and kernel sources available on their site.. but Broadcom doens't seem to be so open.. :/ Yes, you are also right about storage for kernel, learning about that is on my todo list ;) I haven't even thought about the Ethernet yet.. thanks for your tip! – julumme Aug 22 '12 at 13:12
  • it is two bgas stacked from what I understand so I assume you need a good assembly house or very large volume to deal with bga problems. Granted these are relatively tiny parts, not much heat so maybe not the problems with the boards and parts I normally deal with – old_timer Aug 22 '12 at 13:55
  • @dwelch agreed - POP memories are more expensive and require more specialist assembly - thus reducing you the options for manufacturing. This is to some extent why I suggested working down the Broadcom range to find something less complex. The TI Sitara range of SoCs is also worth checking out. – marko Aug 22 '12 at 15:15
  • I think indeed bgas is out of our garage range currently ;) Marko, the Sitara range from TI looks pretty interesting, the soc prices are bit on the high side, but indeed at least there is a reference board.. especially the 3352 caught my eye. From looking at the broadcom selection, they seem to have decent cpu performance range, but otherwise they seemed to be targetted at quite specific needs (routers, TV stuff etc).. – julumme Aug 23 '12 at 13:22
  • @Julumme stories of people assembling PCBs with BGA using nothing more than their kitchen oven and a digital thermometer about in industry :) Not sure i'd want to try it though! – marko Aug 23 '12 at 15:19
1

You could also have a look at the work that Olimex is doing with their linux boards. Perhaps even order a som and then combine it with other external components.

Martin
  • 3,509
  • 3
  • 26
  • 31