[okl4-developer] dx file - what and where does it register

Geoffrey Lee glee at ok-labs.com
Thu Mar 6 04:30:30 EST 2008


On Wed, Mar 05, 2008 at 08:54:54AM -0800, Gabi Voiculescu wrote:
> Hello again.
> 

Hi

> Upon changing the code for the s3c2410_lcd driver more extensively I came upon a new problem.
> 
> I have copied drivers/s3c2410_lcd/SConstruct to drivers/pxa_lcd/SConstruct. Inside I have edited "s3c2410_lcd" into "pxa_lcd" and currently have the following.
> 
> Import("env")
> lib = env.KengeLibrary("pxa_lcd", LIBS=["c", "driver"])
> #ig_env.Package("libs/pxa_lcd")
> Return("lib")
> 
> I did not use the .dx file in drivers/pxa_lcd/src but wanted to build my own header file by taking as example: build/iguana/object/drivers_s3c2410_lcd/src/s3c2410_lcd.h

This file is automatically generated by the build system.  In the .dx
file you specify the register layout of your device, i.e. you tell
the build system what your device looks like.  The build system will
auto-generate the header file based on the .dx file.  The header file
contains accessor functions you can use to read and write to the
individual registers and individual fields within those registers.

> 
> My current problem is that I don't understand what registering I am missing inside the build environment by not using .dx file. 
> 

by writing your own functions to access the registers on your device,
you have to re-write these for every device you implement.  This is
tedious and error prone, whereas if you just have a .dx file, you can
ask the computer to generate these for you, instead of having to write
these functions yourself.

	-gl

> Thank you again
> Gabi Voiculescu
> 
> 
> 
>        
> ---------------------------------
> Looking for last minute shopping deals?  Find them fast with Yahoo! Search.
> _______________________________________________
> Developer mailing list
> Developer at okl4.org
> https://lists.okl4.org/mailman/listinfo/developer


-- 




More information about the Developer mailing list