What's new

Microprocessor /Embedded system develop expert/engineer, i need HELP !

@cnleio
you can create a development plan for yourself for learning linux device drivers and best way to learn is through writing code, you can learn about linux drivers on a PC as well.

Linux drivers are kernel modules, which have the .ko extension. If you are on a linux machine you can type lsmod at the command prompt, which will show kernel modules that are currently loaded. You can load individual kernel module using modprobe or when you write your own .ko file you can use insmod

Here is tutorial on a 'Hello World' kernel module that you can try on PC running linux

How to Write Your Own Linux Kernel Module with a Simple Example

More complex device drivers start out the same way.

Once you have the basic understanding of the kmodules , then pick an existing driver and study it by enabling debug messages and by putting in printk statements in the source code. For USB the drivers will be as follows

ehci-hcd
ohci-hcd


Then you need to also get an understanding of git , which is the version control program for linux kernel and most other open source software development projects.

You can get the linux source code from kernel.org as follows
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux-git

To browse linux code online :
Linux/drivers/usb/host/ - Linux Cross Reference - Free Electrons

Studying the Kernel directly from the source is good for writing drivers , for building root file systems along with the Kernel then Yocto makes the process much more simplified

Keep in mind that you could spend years ( like more than 10-15 years ) learning linux kernel internals and still you may find that there are some aspects that still prove to be elusive.

All the best in your journey
 
If not Qualcomm, get hold of Panda board by Texas Instruments. It is currently not supported actively but if you don't care about the latest version of the hardware, just get hold of it and start with Android/Linux build. You will get to do pretty much everything that you mentioned in the OP!




Some more pointers about Panda Board.

Android Panda Build Source - OMAPpedia
[Guide]How to download/compile specific ROM parts - xda-developers
Building android-4.2.2 JellyBean on Pandaboard/Pandaboard ES | Penguin Eating Kushari …
Didn't they stop production of the Pandaboard.
It is way better to have something with a large community, like the Beaglebone Black.
 
Yes, they stopped production but even the old versions of Pandaboard have very good and active communities with lots of online support. Moreover, the OMAP4/5 in Pandaboard is effing powerful. Very good for simple Linux/Android/device driver or even application development. Moreover, it comes with a powerful & built in WiFi chip too!
 
Yes, they stopped production but even the old versions of Pandaboard have very good and active communities with lots of online support. Moreover, the OMAP4/5 in Pandaboard is effing powerful. Very good for simple Linux/Android/device driver or even application development. Moreover, it comes with a powerful & built in WiFi chip too!
Added USB -WiFi to my Beaglebone, and I think it is better to base work on something in production.
(delivery problems right now though)
If I wanted something more powerful, I would probably go with an iMX6, maybe Wandboard.
 
Question:

Can a layman learn programming? If yes, where do i start? Looking for tutorials.

Thanks for any replies in advance.
 
Question:

Can a layman learn programming? If yes, where do i start? Looking for tutorials.

Thanks for any replies in advance.
start with language c/c++ :lol:
then if u are done then move to java......
u can search for tutorials on youtube/google
 
Question:

Can a layman learn programming? If yes, where do i start? Looking for tutorials.

Thanks for any replies in advance.


Install Quincy Editor which comes with C/C++ compiler and start programming simple programs in C.
 
In the real life, Leio is working for MCU / Embedded system development ... :-)

Many years ago when leio was a young studnet, the China college only taught us Assembly & C code and 8-bit MCU (MC51) for basic study then kick us into society. During jobs leio learnt more MCUs and used Atmel 8-bit at89s5x, STC 8-bit stc12c5xx, Atmel 8-bit AVRMegaxxx, TI 16-bit MSP430(only once), ST 32-bit stm32f1xxx and uC/OS-II for work. But that's not enough yet.:sick:

Now the popular is above ARM-9 core CPU like ARM9, ARM11, ARM Cortex-A8, Cortex-A15 etc, Most based on Linux driver development. :hitwall: Well leio didn't learn any linux program skills in my college :tdown:, This year i wanna update my personal skill to work in real embeded system development, to write Linux driver codes ... How can i start it ? I plan one year to finish the last problem in my career.

I knew there'r many experts in PDF, so any experienced engineer could provide good idea & advice for Linux driver study. Thank you very much ! :yahoo:

I only knew it need, how to learn them ?
1. Bootloader code
2. Makefile
3. BSP code
4. Linux kernel code <== Huge codes
5. Linux driver code
6. QT GUI code ???


Leio's job:
003U3wNwgy6KgHRwFKod0&690

003U3wNwgy6KgItIy63ef&690



1. Bootloader Code: Don't touch it, it is more complex and delicate than you think. Use the one which is already provided by the community (GRUB) or by the Hardware Vendor. If you wish to hack the code first try to hack the toy boot-loaders (provided toy OS sites).

2. Makefile: Learn the basics (there are plenty of resources on net), then sharpen your skills while working on a real project.

3. BSP Code: Commonly inside arch directory.

4. Linux Kernel: You don't need to learn each line. Learn the structure and then learn to write Kernel Modules and Device Drivers and then sharpen your skills while at work. When in confusion, take assistance from the developer community.

5. QT GUI code: Use the standard library for the target platform provided by the Hardware Vendor or by the community. Don't invent the wheel.

All hardware vendors provide necessary libraries and developer guides for the developers to get them started. Use those resources instead of trying to reinvent the wheel.

It takes several decades to master Kernel Development. That is why there are hundreds of thousands of Linux Programmers but only a few thousand developers who work on the Kernel. Your proficiency will not depend on your ability to code, or on the number of lines of computer code you have written so far, but on your understanding of the Theoretical Computer Science.

Source: Been there, done that.
 
1. Bootloader Code: Don't touch it, it is more complex and delicate than you think. Use the one which is already provided by the community (GRUB) or by the Hardware Vendor. If you wish to hack the code first try to hack the toy boot-loaders (provided toy OS sites).

2. Makefile: Learn the basics (there are plenty of resources on net), then sharpen your skills while working on a real project.

3. BSP Code: Commonly inside arch directory.

4. Linux Kernel: You don't need to learn each line. Learn the structure and then learn to write Kernel Modules and Device Drivers and then sharpen your skills while at work. When in confusion, take assistance from the developer community.

5. QT GUI code: Use the standard library for the target platform provided by the Hardware Vendor or by the community. Don't invent the wheel.

All hardware vendors provide necessary libraries and developer guides for the developers to get them started. Use those resources instead of trying to reinvent the wheel.

It takes several decades to master Kernel Development. That is why there are hundreds of thousands of Linux Programmers but only a few thousand developers who work on the Kernel. Your proficiency will not depend on your ability to code, or on the number of lines of computer code you have written so far, but on your understanding of the Theoretical Computer Science.

Source: Been there, done that.
Thank you very much ! One year ago I ever spent some time to learn Bootloader/ Makefile/ BSP codes but just stop there didn't continue the Linux Kernel study.

For Linux Kernel advice, u r RIGHT! If u have many spare time, u can research Kernel codes. Or just study C structure & Kernel Modules, and copy/ modify Device Driver Examples. I have asked suggestion from some experienced Linux Driver Engineers, they all answer me as same as u said. I will choose s3c2440 as my first CPU for running Linux OS and platform for Linux Driver development, and continue writing codes on 8-bit/32-bit MCU chips.

I got a ARM9 (s3c2440) study video, im learning it. But now i have to finish a project by using ATmega328p and a 2.4' touchpad TFT-LCD, then i have some trouble with emWin GUI library for uC/OS-II. Recent 2x weeks many woke to do.:hitwall:

Question:

Can a layman learn programming? If yes, where do i start? Looking for tutorials.

Thanks for any replies in advance.
C is easy, then to C++ for future Java in Android OS ... As my personal experience in China, i saw many MCU project still using C program.

BTW i think a Embeded System engineer should spend most time on hardware program, to work with CPU's special registers (Peripheral registers) and Schematic diagram. Like Application program on Android OS, it should leave to the software engineer.

At lease now C is still OKay for hardware program. Usually in China we like to write the Firmware Library for MCU first, then start hardware program above MCU's FWLib. It's easy to maintain and transfer to another platforms. :tup:
 
Last edited:
@cnleio
you can create a development plan for yourself for learning linux device drivers and best way to learn is through writing code, you can learn about linux drivers on a PC as well.

Linux drivers are kernel modules, which have the .ko extension. If you are on a linux machine you can type lsmod at the command prompt, which will show kernel modules that are currently loaded. You can load individual kernel module using modprobe or when you write your own .ko file you can use insmod

Here is tutorial on a 'Hello World' kernel module that you can try on PC running linux

How to Write Your Own Linux Kernel Module with a Simple Example

More complex device drivers start out the same way.

Once you have the basic understanding of the kmodules , then pick an existing driver and study it by enabling debug messages and by putting in printk statements in the source code. For USB the drivers will be as follows

ehci-hcd
ohci-hcd


Then you need to also get an understanding of git , which is the version control program for linux kernel and most other open source software development projects.

You can get the linux source code from kernel.org as follows
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux-git

To browse linux code online :
Linux/drivers/usb/host/ - Linux Cross Reference - Free Electrons

Studying the Kernel directly from the source is good for writing drivers , for building root file systems along with the Kernel then Yocto makes the process much more simplified

Keep in mind that you could spend years ( like more than 10-15 years ) learning linux kernel internals and still you may find that there are some aspects that still prove to be elusive.

All the best in your journey
Thank you very much !

Are you familiar with the Linux kernel? Do you have a basic knowledge of topics like Memory Management, I/O management etc? If not, start from there. Learn about Kernel subsystems, kernel user interface etc. This will make your further journey more easier.

Also, try to grab a copy of the book - "Building Embedded Linux Systems" by Karim Yaghmour (download e-book from this link : Building Embedded Linux Systems, 2nd Edition.pdf - Free Download - File Hosting Service ) . Though the book is a bit old, but you'll still find the topics on the Kernel, Debugging etc very useful.


Finally, for the Qt part, the best place is the official documentation itself - Qt for Embedded Linux | Documentation | Qt Project


Hope you find it useful.
I didn't learn any Linux Kernel codes when i study in the university, there's almost 6 years ago. In that time they usually taught 8-bit MCU as the Embeded System Lesson for students, now they might teach 32-bit ARM Cortex-M3.

This year i plan to spend time to learn Linux Module structures and research Linux Driver codes, the Samsung s3c2440 (ARM9) CPU is a mature platform in China and have many examples on the internet. I will begin from it
 
Last edited:
Back
Top Bottom