Monthly Archives: May 2011

BeagleBoard-XM + DSP boot

mmc init

fatload mmc ${mmcdev} ${loadaddr} uImage-2.6.37

setenv bootargs root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait mem=200M

bootm ${loadaddr}

After booting, load the drivers:

insmod dsplinkk.ko
insmod lpm_omap3530.ko
insmod cmemk.ko phys_start=0x8C900000 phys_end=0x8D900000
pools=20×4096,10×131072,2×1048576,1×5250000,4×829440,2×691200

root@beagleboard:/lib/modules/2.6.37/kernel/drivers/dsp# lsmod Module Size Used by
cmemk 20171 0
lpm_omap3530 6125 0
dsplinkk 122177 1 lpm_omap3530

[ 68.373840] DSPLINK Module (1.65.00.03) created on Date: Mar 9 2011 Time: 14:36:55
[ 79.071655] CMEMK module: built on Jan 27 2011 at 01:19:18 [ 79.075683] Reference Linux version 2.6.37
[ 79.079162] File
/OE/angstrom-setup-scripts/build/tmp-angstrom_2008_1/work/beagleboard-angstrom-linux-gnueabi/ti-linuxutils-1_2_26_01_02-r100d/linuxutils_2_26_01_02/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c [ 79.096405] allocated heap buffer 0xce000000 of size 0x32c000 [ 79.100799] cmemk initialized

# cat /proc/cmdline
root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait mem=200M

Blinking BeagleBoard-XM LED (C version)

#include

void main() {

FILE *fp;

//Configures LED to be manually controlled
fp = fopen(“/sys/class/leds/beagleboard\:\:usr0/trigger”, “w”); fprintf(fp, “none”);
fclose(fp);

while (1) {
fp = fopen(“/sys/class/leds/beagleboard\:\:usr0/brightness”, “w”); fprintf(fp, “1”);
fclose(fp);
sleep(1);

fp = fopen(“/sys/class/leds/beagleboard\:\:usr0/brightness”, “w”); fprintf(fp, “0”);
fclose(fp);
sleep(1);
}

}