I plan to make my career in Embedded Devices and System Programming. I also want to learn to modify Linux Kernel. I know basic level C and C++.

Can somebody suggest me good starting place for learning Embedded Device programming and System Programming using C / C++.

Thanks in advance.

share|improve this question

migrated from stackoverflow.com May 31 '11 at 12:32

6 Answers

If you have one of that small devices then you could join to some OpenSource project which developes the kernel for your device (take a look here for instance). Try to compile the kernel for that device, try to modify it, read forums, join to some dev team.

If you haven't one then you could find a job at a position of C++ Junior at some company which produce the software for embedded devices. They will even pay for it.

share|improve this answer
Is is advisible to buy a small embedded device for oneself.. for sake of learning and experimenting..? – mahendraliya May 31 '11 at 4:51
Yes, I think you could buy some device for that purposes (Android phone for instance). Try to compile the kernel for that device, try to modify it, read forums, join to some dev team. – Kirill V. Lyadvinsky May 31 '11 at 4:55
I have recently bought an Android Phone.. that was more for learning android.. I even have downloaded Android source code... what do you recommend should be my next approach... any good starting point you can suggest.. – mahendraliya May 31 '11 at 5:05
Find custom kernel for your phone and try to compile it and run on your phone. Then you could try to fix issues with your phone (modify kernel source code) which you can find on thematic forums. Be careful since you can damage your phone. – Kirill V. Lyadvinsky May 31 '11 at 5:59
Check this tutorial for instance. – Kirill V. Lyadvinsky May 31 '11 at 6:05
show 3 more comments

If you have no experience of embedded devices, I would suggest starting with an Arduino.

They are relatively inexpensive, can be attached to computers running Windows or Linux and the code to drive them is basically C.

The common boards also have the bonus that they have safeguards in the hardware to prevent you accidentally overloading them.

They come with an open-source IDE if you are new to coding, but you dont need to use that, you can use a makefile. Good luck.

share|improve this answer

That appears to be two different questions (regarding Linux Kernel, and embedded systems). While Linux can and is used in embedded systems, there is a large range of embedded applications and platforms for which it is entirely unsuitable or impossible to deploy. (including the Arduino and PIC suggestions already given).

If you are considering embedded Linux, you first need a target platform with sufficient resources to run it; that will typically be an ARM based device with an MMU (ARM9, 11, XScale or Cortex A*n*). You can use an ARM7 or similar MMU'less microcontroller (with sufficient memory resources) with uCLinux (micro-controller Linux), but not having MMU support kind of misses the point and much of the benefit of using Linux in the first instance.

My advice is that you clearly separate these two requirements, while Linux may seem inexpensive (or even free), the hardware required to run it is not. It will need at least 4Mb of RAM and similar non-volatile storage just to start, while using a simpler RTOS kernel and third-party libraries, you could get real-time priority based pre-emptive scheduling, IPC, an SD card based filesystem, networking and USB support in less than 50kb! Using Linux it may also shield you from exposure to the fundamentals of embedded systems that you would do well to learn.

A target platform based on an ARM Cortex-M3 or M4 would provide a good balance between cost and performance, and will be suitable for running typical embedded RTOS's such as eCOS, FreeRTOS or uC/OS-II. They are more complex perhaps that AVR or PIC based systems, but far more suited to running C++. Microchip's compilers do not even support C++, even on the MIPS based PIC-32!

A useful portal for all things embedded is http://www.eetimes.com/design/embedded (formerly www.embedded.com).

share|improve this answer

I'd point a few resources that I like:

  • if you know basic programming, do fun stuff. Doing fun stuff can be for example trying to solve euler's project problem : they are fun mathematical challenges, which will make you think on how to write efficient programming (golden rule is more than 2 minutes computing, you did it wrong). From my personaly experience, doing a good algorithm is even more important on embedded devices
  • try to do some personal projects, you'll learn a great deal of stuff. like : what about controlling some lights with your PC through USB : e.g., use a microchip PIC, it's cheap and versatile
  • want to hack into the kernel, it's not the easiest. However, a great deal of open-source projects are looking for developper : pick the one you prefer. Note that more and more, embedded programming is just like standard programming : focus on reusability, good design, clean programming and you've won (I got 8 years of professional experience in this domain, not counting hobby time)
share|improve this answer
1  
Nowadays, PIC isn't cheaper or easier than any other MCU, that was 15 years ago. The only advantage of PIC is a wide sortiment of DIP packages. On the other hand, the PIC core is horribly outdated. – Lundin May 31 '11 at 6:17
If you want a cheap MCU to get your feet wet with, the TI MSP430 for US$5 is hard to beat. Comes with all the hardware you need, just download a (free) IDE and you're in business. – TMN May 31 '11 at 14:42

A good start for Micro C and embedded devices is here: Micro C

Starts with simple programs, and layouts of specific embedded 'pics' (not pictures)

share|improve this answer

Write programs and learn from the best sources you can find.

share|improve this answer
I understand that... but I was looking for how to learn and write such programs.. – mahendraliya May 31 '11 at 4:52
examine the existing kernel modules, find the datasheets/programmers reference manuals that go with them, and start to understand the code. ora.com has some writing and understanding the linux kernel books. Basically take existing software, learn to build and run it as, is then start changing it, then write some drivers from scratch. – dwelch May 31 '11 at 4:56
@dwelch: any links for online tutorials / ebooks would help me.. or some good pointers where to start off exactly.. Thanks. – mahendraliya May 31 '11 at 5:06
1  
@mahendraliya perhaps you do -- perhaps you should have specified how you intended to accomplish your goals in the original post in order to receive more accurate/relevant responses. nevertheless, many people in a position similar to yours (severely) underestimate the importance of my recommendation. – justin May 31 '11 at 5:13

Your Answer

 
or
required, but never shown
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.