views:

323

answers:

4

I'm very much interested in building applications for Embedded Devices. I'm in my 3rd year Electrical Engineering and I'm passionate about coding, algorithms, Linux OS, etc. And also by Googling I found out that Linux OS is one of the best OSes for Embedded devices(may be/may not be). I want to work for companies which work on mobile applications. I'm a newbie/naive to this domain & my skills include C/C++ & MySQL. I need help to get started in the domain of Embedded Systems; like how/where to start off, Hardware prerequisites, necessary programming skills, also what kind of Embedded Applications etc. I've heard of ARM, firmware, PIC Micorcontrollers; but I don't know anything & just need proper introduction about them. Thanx.

P.S: I'm currently reading Bjarne Struotsup's lecture in C++ at Texas A&M University, and one chapter in it describes about Embedded Systems Programming.

+2  A: 

Take a look at the Arduino project. It was designed, among other things, as a cheap and easy to program embedded system for students.

Taneli Waltari
+3  A: 

by Googling I found out that Linux OS is one of the best OSes for Embedded devices(may be/may not be)

It gives you a lot of functionality at on the face of it, low cost. However you have to factor in the cost of the hardware needed to run it, when you might otherwise have been able to use lower cost devices, and the huge amount of third-party code over which you have little control. Also it is not suited to hard real-time applications. By using Linux, you will have implicitly imposed a requirement for a 32 bit processor with an MMU (unless you use uClinux and loose memory protection), and several Mb of RAM and non-volatile storage.

Also you'd learn a lot more about embedded systems by not initially targeting Linux, but using an RTOS or real-time kernel such as FreeRTOS, QNX, VxWorks, eCOS, uC/OS-II or III for example, or just programming 'bare metal' without an OS or executive at all.

A good resource for embedded systems articles is http://embedded.com/

Regarding hardware, ARM is the most ubiquitous architecture in embedded systems used everywhere including phones, PDAs, STBs, DAB radios, digital cameras, hand-held games, netbooks, iPad, robotics etc. It is available from many chip-makers, in a wide range of cost/performance and peripherals and on-chip memory. A Cortex-M3 based part would be a good introduction, and is a cleaner design that the older ARM7TDMI core that it essentially replaces. (so long as you don't want to run Linux in which case you'll need at least an ARM9 with external memory).

If board/tool cost is critical, you might rather use an 8bit device, and I suggest something based on Atmel's AVR. These devices are simple, come in an extensive range, and are suited to programming in C (and C++ if you wish). PIC may seem attractive, but it covers a range of largely incompatible architectures (each requiring different tool-chains) and unless you use a high end-device (PIC24/dsPIC for example), they do not present the best platform for programming in C or C++.

Clifford
+6  A: 

I would avoid operating systems all together, Embedded Linux is an oxymoron, what are you really learning? You could learn the same thing with your home computer.

Yes, ARM is the king of embedded and may remain so for a while, eventually you will need to take a look.

Sparkfun.com is a great site, they offer a number of the olimex boards plus others like arduino derivatives. I prefer the msp430 to the avr, but the avr is more popular.

Outside sparkfun look at the ez430 from TI (msp430) direct or from digikey or mouser. Stellaris has a number of nice boards, the 811 is easy to brick, my first one lasted only a few hours, oops, I should have read the 17 warning labels stuck to everything in the box, dont touch the enables or direction on those jtag lines. stellaris packed a ton of stuff on the boards, very good platform for learning embedded programming, reading schematics, reading data sheets and programmers reference manuals, learning that all schematics and reference manuals are a little buggy and you have to hack your way through. If you want something to build your own projects on though you have to cut away (not literally) goodies on the boards, so I would go with an olimex header board for adding your own electronics to.

I normally recommend learning arm before thumb but have just completed (well is anything every complete?) a thumb instruction set simulator thumbulator.blogspot.com, very easy to use and modify to watch what is going on or debug your stuff.

Back to sparkfun. The olimex header boards are good, sub $50, the various arm vendors are represented (except for ti/stellaris). Arduino pro mini for under $20. The armmite pro is good. Avoid the mbed2 and lpcxpresso, perhaps avoid lpc all together (other than the armmite pro).

qemu is also a good simulator, not as easy as the armulator or my thumbulator to dig into to see what your code is doing. But there are many rtoses and linuxes that run on it (arm and other processors are simulated), the arm integrator eval board is a popular target and is simulated by qemu. Just within arm there are many eval boards emulated by qemu.

The beagleboard is popular but I was quite disappointed with my beagleboard and always innovating netbook. It cost another $100 - $150 to make the beagleboard useful. Embest has a much better beagleboard clone, that is useful out of the box. I like the hawkboard.org much better than the beagleboard, slower by a bit, half the price, but a better board. You can work on linux or true embedded (no operating system) or whatever you like. Being TI omap based there is a dsp on chip as well in case you have some interests there.

I am not a fan of pic, and have been and will get flamed for it, doesnt bother me. I recommend learning assembler for the msp430, avr, arm, thumb (and pic), real embedded always involves a little assembler to manage the boot process, interrupt handling and the like at a minimum. The msp430 and arm are well suited instruction sets for C compilers, pic is horrible as is the 8051, that doesnt mean there arent C compilers, it is just horribly inefficient and adding a high level language makes the result that much worse. The pics are quite resource limited. The pic32 is a mips derivative and not what I am talking/complaining about. That is a whole other family and category of device. I would go with the msp430 over pic given the choice both for assembler and C, size, power, features, etc.

Mips is probaby arms biggest competitor, sadly it is the one platform I have not had the opportunity to learn.

8051, 6501, and the lsi11 used by the pdp11 are a nice trip down history lane. the lsi11 is what the C language was invented on and you can see parallels between the assembler and C. The msp430 instruction set has the same feel, both the msp430 and lsi11 are excellent instruction sets for beginning assembler. The 8051 is probably the oldest surviving workhorse, it had its day as the dominant embedded processor, and can still be found in new chip products. like the pic the instruction set is a tower of hanoi puzzle, in and out of the accumulator, in and out, in and out several instructions to do anything useful. sdcc is a free 8051 C compiler and just the right size if you want to dig into the guts of a compiler and have a chance at understanding it (without having to buy books or take classes).

I am a big fan of the gameboy advance and nintendo ds, the gba is easier, emulators are out there for both, although are geared toward playing rom games and not necessarily perfect at emulation you might do for homebrew development. the gba's other than the mini have serial ports making debug that much easier (mini has one but getting at it is harder). start with the gba if you can, much cheaper, much easier, once you get the hang of the the ds is a couple of gbas tied together with some extra complications.

Based on your post, not knowing if the cost is too much, my guess is the hawkboard (hawkboard.org) is a good choice for linux, embedded, algorithms and other items you listed. Go ahead and get the power supply and the otg usb cable if it doesnt come with it. If you are like I was as an EE student that may be too rich, look at the arduino pro or actually the lillypad because it comes with the pins already, no soldering or extra parts required, yes get the $14 usb to serial thing. For the price of the lillypad and usb to serial/power board you could get a armmite pro and not need anything else other than a usb cable (I know it is a lpc, its okay). I have web pages on how to remove the arduino like firmware from both platforms and get at the processor, not brain surgery, pretty easy, but first timers might hesitate. The ez430 falls into this same price category, you dont need anything else but the $20 kit, three more boards cost you $10 for the set. If that is too rich or even if not the emulators are free some are much easier to debug than running on real hardware as you have the source code and can compile in print statements or whatever. You can get your feet wet without expending anything but time, and see if this is something you are really interested in.

Remember even the best emulator is not like being on the real hardware (same as running your code under a debugger). You may have to start your project over on hardware, but that is the fun of embedded. board bring up...

dwelch
Oooff.. Marathon post.. I read it 4 times to grasp it fully, because the jargon are new to me.. Thanks for your reply. Will ping you if I've any doubts. Thanku once again
Rahul
I pulled my nxp (lpc) mbed out of purgatory yesterday and it aint as bad as I had originally thought. You dont have to use their sandbox development environment, you can do your own thing. mounts like a flash drive, copy the .bin file and push the button to run. Still has migraine producing leds on it which I hope to remove and replace. lpcxpresso is still evil, avoid that one.
dwelch
+1  A: 

I happen to be a fan of the more recent PIC devices, such as PIC24F and dsPIC33F. They are optimized for C, and Microchip has a free compiler available. One thing nice about the PICs is that many of them come in DIP packages, so you can put them on a plastic breadboard and get started with them right away. Inexpensive also. For example, Digikey sells the PIC24FJ16GA002 (16K Flash, 4K RAM, I2C, SPI, UART and parallel port) in a 28-pin DIP package for $3.64.

tcrosley