Maker Pro
Maker Pro

Embedded device driver

vead

Nov 27, 2011
473
Joined
Nov 27, 2011
Messages
473
Hello

I did google search for embedded device driver. I found some results

A device driver is a program that controls a particular type of device that is attached to computer. There are device drivers for printers, displays, CD-ROM readers, diskette drives, and so on. many device drivers are built into operating system. Its all about computer system .

I don't understand what are device drivers in embedded system ?
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
A device driver in an embedded system is the same as a device driver in other environments. It's a code module that provides support for a specific piece of hardware and provides standardised support for that hardware.

For example, an embedded system might include a display. The display hardware would have a device driver that accepts requests from user programs - either directly, or via the operating system - for actions to be performed on the display. For example, draw a rectangle, or erase a block of pixels.

The interface to the device driver follows some standard. If the embedded system needs to be built using a different display, a different device driver is used, but it follows the same standard and implements the same functionality. So the operating system and user program can work with either type of display, as long as the right device driver is present.

Device drivers are used for most complicated and optional devices in the system, such as serial ports, USB ports, video subsystems, HDMI, audio input and output circuits, memory cards, modems, GPS receivers, touch screens, accelerometers, etc. In fact, the Android source is probably a really good place to look for examples of device drivers for embedded systems.

Hardware that is a standard part of the system may have a device driver, or it may be supported directly by the operating system.
 

vead

Nov 27, 2011
473
Joined
Nov 27, 2011
Messages
473
Device drivers provide a software interface for accessing hardware from software

Peripheral module device drivers
.(UARTs, Timers, A/D or D/A converters, CAN or DMA controllers etc).

Device Drivers are written in C.

I have another question. I know about compiler , assembler , I have written some codes.
upload_2015-2-18_5-53-34.png
I did some search

file : hello.c , hello.asm , hello.obj

compiler: compiler translate source code into machine code
compiler: compiler translate source code into object code
example- sourcefile.c------ translate -------objectfile.obj

assembler:assembler translate assembly code to machine code or object code
example- sourcefile.asm------ translate -------objectfile.obj

linker: linker combine one or more object file

Loader : loader load executable file into memory

I want to see how does compiler , assembler, linker , loader ,translate code step by step ?
 
Last edited:

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
If you've written some code, have a look at the assembly language output of the compiler. There should be an option that you can give on the command line of the compiler to tell it to create an assembly language output file. This file will show you how the compiler has translated each line of your source code into assembly language.

There may not be any utilities to dump object files in a human-readable format, but try viewing them with notepad or a similar text editor. Depending on the development system, they may be human-readable.

What compiler and development environment are you using?
 
Top