Embedded Freaks..

December 2, 2010

Disko ‘Firststeps’ Tutorial in LPC3250

Filed under: ARM9, arm926ej-s, embedded-linux — Tags: , — kunilkuda @ 2:12 am

Going through with Disko tutorial at 2AM..=) So, here’s what I got so far.

Disko provides simple tutorial to kickstart your Disko project. You can download it using git:

# git clone git://www.diskohq.org/disko-tutorials.git

Inside the ‘disko-tutorials’ directory, go to ‘firststeps’ directory, and cross compile it with:

# CXX=arm-none-linux-gnueabi-g++ CXXFLAGS=-mcpu=arm926ej-s \
  PKG_CONFIG_PATH=$HOST_DIR/lib/pkgconfig make

Now copy all of firststeps directory to your target directory (or to SD-Card), and copy all the library dependencies (as described in my last post, ‘Preparing Root Filesystem’ section). Then run it..(Don’t forget to change the diskorc.xml before running the program)

Here’s some pics and videos of the ‘Firststeps’ tutorial in PHY3250 board

Disko Firststeps Tutorial 01

Disko Firststeps Tutorial 01

Disko 'Firststeps' Tutorial 02

Disko 'Firststeps' Tutorial 04

Disko 'Firststeps' Tutorial 04

About these ads

3 Comments »

  1. Nice pictures. Looks like our first steps on blackfin boards. But only regarding the display ;-)

    Regarding the touchscreen, you patched disko to recognize your touch. Well actually we do recognize remote controls by checking if keys (< 20) are recognized by the device. And it looks like your touch has this ability. Well I've never seen a touchscreen, getting EV_KEY bits, but that doesn't mean it doesnt't exist.

    It seems to be really hard to distinguish between touchscreens and other devices. What do you think?

    Comment by Matthias — December 2, 2010 @ 8:15 am

  2. Hi Matthias,

    I’ve checked the Linux-2.6.27.8 touchscreen devices, and it seems like everyone is defining EV_KEY bit.

    lpc32xx_ts.c:
    	/* Setup TS driver */
    	lpc32xx_tsc_dat->dev->name = "LPC32xx Touchscreen";
    	lpc32xx_tsc_dat->dev->phys = "lpc32xx/input0";
    	lpc32xx_tsc_dat->dev->id.bustype = BUS_HOST;
    	lpc32xx_tsc_dat->dev->id.vendor = 0x0001;
    	lpc32xx_tsc_dat->dev->id.product = 0x0002;
    	lpc32xx_tsc_dat->dev->id.version = 0x0100;
    	lpc32xx_tsc_dat->dev->dev.parent = &pdev->dev;
    
    	lpc32xx_tsc_dat->dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
    	lpc32xx_tsc_dat->dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
    
    atmel_tsadcc.c:
    	input_dev->name = "atmel touch screen controller";
    	input_dev->phys = ts_dev->phys;
    	input_dev->dev.parent = &pdev->dev;
    
    	input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
    	input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
    
    ads7846.c:
    	input_dev->name = "ADS784x Touchscreen";
    	input_dev->phys = ts->phys;
    	input_dev->dev.parent = &spi->dev;
    
    	input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
    	input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);
    

    I also wonder how the driver ends up replying with keybit between KEY_OK and KEY_MAX. It suppose to send BTN_TOUCH.

    Comment by kunilkuda — December 2, 2010 @ 6:44 pm

  3. I finally found the root cause.

    The ‘#include <linux/input.h>’ in mmsinputlishandler.cpp refers to the wrong version of the kernel. My host kernel is using Linux-2.6.32-26, while my PHY3250 kernel is using Linux-2.6.27-8. Inside Linux-2.6.32-26, KEY_MAX is set as 0x2FF, while in Linux-2.6.27-8: KEY_MAX=0x1FF. So, basically the disko library is testing non-existing keys in target system..

    Hmm…wonder how to handle this one.

    Comment by kunilkuda — December 2, 2010 @ 7:47 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Silver is the New Black Theme Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: