Thursday, December 16, 2010

unboxing ezDSP 5515 USB Stick

Bought this kit for $73 with shipping from ebay. $6 cheaper than TI.estore :).








Tuesday, November 23, 2010

beagleboard Android froyo - adding usb mass storage gadget support

Originally in TI devkit 2.0 android for beagleboard usb mass storage gadget driver is not enabled.
(i.e. when beagle board is connected to PC via USB OTG port it will shows a usb mass storage device on PC).

following modification is for enabling this usb mass storage gadget driver both in the kernel and the android system.


1]. Modifications to the Kernel

a). make sure kernel is configured support android USB Gadget with both "abd" and "mass_storage" functions.

make ARCH=arm CROSS_COMPILE=arm-eabi- menuconfig

at Device Drivers -> USB support -> USB Gadget support -> USB Gadget drivers (android)

both adb and mass storage function should be enabled


b). modification to arch/arm/mach-omap2/board-omap3beagle.c

change ,

static char *usb_functions_adb[] = {
"adb",
};

static char *usb_functions_all[] = {
"adb",
};

static struct android_usb_product usb_products[] = {
{
.product_id = GOOGLE_PRODUCT_ID,
.num_functions = ARRAY_SIZE(usb_functions_adb),
.functions = usb_functions_adb,
},
};

code section in to this,

static char *usb_functions_mass_storage[] = {
"usb_mass_storage",
};

static char *usb_functions_adb[] = {
"adb",
};

static char *usb_functions_all[] = {
"adb","usb_mass_storage"
};

static struct android_usb_product usb_products[] = {
{
.product_id = GOOGLE_PRODUCT_ID,
.num_functions = ARRAY_SIZE(usb_functions_adb),
.functions = usb_functions_adb,
},
{
.product_id = GOOGLE_PRODUCT_ID, /*added for usb mass storage */
.num_functions = ARRAY_SIZE(usb_functions_mass_storage),
.functions = usb_functions_mass_storage,
},
};

2]. Modifications to android system

with in the android srouce,in the system/vold/VolumeManager.cpp file change "/sys/devices/platform/usb_mass_storage/lun0/file" string to
"/sys/devices/platform/musb_hdrc/gadget/lun0/file".

There were two instants in Line. 810 and Line. 854

Tuesday, September 28, 2010

I2C frame work in Linux 2.6.32

following article from embeded-bits have nice descriptions on how to use new I2C frame work on linux 2.6.32 kernel.

http://www.embedded-bits.co.uk/?p=174

This describes how to use i2c driver via i2c_board_info in the board specific code.

for beagle board i2c device can be added by editing board-omap3beagle.c file located at kernel/arch/arm/mach-omap2.

for example a bq27200 fuel gauge added to I2C -2 by adding following code make sure probe function of bq27200 driver is called ;-).

static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = {
{
I2C_BOARD_INFO("bq27200", 0x55),
},
};

Wednesday, August 18, 2010

set the time and save it to the RTC HW


To set the system clock use the date command.

from "http://developer.axis.com/wiki/doku.php?id=faq" article,

date MMDDHHMMYYYY

Where MM=Month, DD=Day, HH=Hour, MM=Minute, and YY=Year

To permanently store the system clock in the RTC chip just type the following command

hwclock -w

This works with busybox.

Monday, July 5, 2010

Mount ramdisk linux

to mount ramdisk which is created for embedded linux platform can be mount as follows.

losetup /dev/loop1 ramdisk

here /mnt/ram is the mounting point

mount /dev/loop1 /mnt/ram