Hi
I am new to Beagle Board XM and have just finished setup where I can
cross compile and download code to board.
I am searching for sample codes in beagleboard.org "projects" section,
but I do not see any links to download actual software for projects to
try, or maybe I am not looking at right place.
Ideally I would like to download few sample projects related to IO,
I2C, serial port and some other high level application projects which
are ready to compile and download to board for learning purpose.
Please point me to link where I can actually download software for
beagle xm board
Regards
Hi,
Check with the following tutorials:
http://elinux.org/EBC_Embedded_Beagle_Class_Topics
Thanks,
Rajiv
- Please point me to link where I can actually download software for
- beagle xm board
I have USB-related examples here:
http://www.lvr.com/beagleboard.htm
Jan
Tutorial link is great for starters
I am still not clear on beagleboard.org "Projects" section, there are
so many projects going on, but was unable to see any code on any
projects.
Thanks & Best Regards,
Vaibhav Desai
ARM MPU Business Unit
Texas Instruments, Inc
12500 TI Blvd, MS8638
Dallas, Texas 75243
Office - + 1 214-567-8446 | Cell - + 1 281-781-6657
When I execute the i2c sample on the BeagleBone I get the following:
root@beaglebone:~# gcc myi2cget.c -o myi2cget
/tmp/cchtYrvx.o: In function `main':
myi2cget.c:(.text+0x208): undefined reference to
`i2c_smbus_write_byte'
myi2cget.c:(.text+0x24c): undefined reference to
`i2c_smbus_read_byte_data'
collect2: ld returned 1 exit status
Do I need to load a library or other code?
thanks,
Wayne
Jan
I am trying your code on beaglexm
I am using your example code to test LED but LED initialize is failed,
I did created leds-90 rules file
any suggestions here
void led_initialize()
{
int led_number;
char* led_trigger[2];
led_trigger[0] = "/sys/class/leds/beagleboard::usr0/trigger";
led_trigger[1] = "/sys/class/leds/beagleboard::usr1/trigger";
FILE *p_led_trigger = NULL;
char trigger_none[] = "none";
for (led_number = 0; led_number < 2; led_number++)
{
if ((p_led_trigger = fopen(led_trigger[led_number], "r+")) != NULL)
//if ((p_led_trigger = fopen(led_trigger[led_number], "r")) !=
NULL)
{
// The specified LED's trigger file is open for reading and
writing.
// Write "none" to the trigger file and close the file.
fwrite(trigger_none, sizeof(trigger_none), sizeof(char),
p_led_trigger);
fclose(p_led_trigger);
}
else
{
printf("ERROR LED Initialize\n");
}
}
// Turn off both LEDs.
led_control(0,0);
led_control(1,0);
}
Here is rule file
SUBSYSTEM=="leds", PROGRAM+="/bin/sh -c 'chmod a+rw /sys/devices/
platform/leds-gpio/leds/beagleboard::usr0/trigger /sys/devices/
platform/leds-gpio/leds/beagleboard::usr0/brightness /sys/devices/
platform/leds-gpio/leds/beagleboard::usr1/trigger /sys/devices/
platform/leds-gpio/leds/beagleboard::usr1/brightness'"
Actually I was unable to toggle led from shell also using starter
tutorial instructions
ubuntu@omap:~$ cd /sys/class/leds
ubuntu@omap:/sys/class/leds$ ls
I am unable to control usr0 LED in beagle xm board from shell
beagleboard::pmu_stat beagleboard::usr1 rt73usb-phy0::quality
beagleboard::usr0 rt73usb-phy0::assoc rt73usb-phy0::radio
ubuntu@omap:/sys/class/leds$ ls -F
beagleboard::pmu_stat@ beagleboard::usr1@ rt73usb-phy0::quality@
beagleboard::usr0@ rt73usb-phy0::assoc@ rt73usb-phy0::radio@
ubuntu@omap:/sys/class/leds$ cd beagleboard\:\:usr0
ubuntu@omap:/sys/class/leds/beagleboard::usr0$ ls -F
brightness device@ max_brightness power/ subsystem@ trigger
uevent
ubuntu@omap:/sys/class/leds/beagleboard::usr0$ cat trigger
none nand-disk mmc0 [heartbeat] rfkill0 phy0rx phy0tx phy0assoc
phy0radio
ubuntu@omap:/sys/class/leds/beagleboard::usr0$ echo none > trigger
-bash: trigger: Permission denied
ubuntu@omap:/sys/class/leds/beagleboard::usr0$ sudo echo none >
trigger
-bash: trigger: Permission denied
ubuntu@omap:/sys/class/leds/beagleboard::usr0$
ubuntu@omap:~$ cd /sys/class/leds
ubuntu@omap:/sys/class/leds$ ls
I am unable to control usr0 LED in beagle xm board from shell
beagleboard::pmu_stat beagleboard::usr1 rt73usb-phy0::quality
beagleboard::usr0 rt73usb-phy0::assoc rt73usb-phy0::radio
ubuntu@omap:/sys/class/leds$ ls -F
beagleboard::pmu_stat@ beagleboard::usr1@ rt73usb-phy0::quality@
beagleboard::usr0@ rt73usb-phy0::assoc@ rt73usb-phy0::radio@
ubuntu@omap:/sys/class/leds$ cd beagleboard::usr0
ubuntu@omap:/sys/class/leds/beagleboard::usr0$ ls -F
brightness device@ max_brightness power/ subsystem@ trigger
uevent
ubuntu@omap:/sys/class/leds/beagleboard::usr0$ cat trigger
none nand-disk mmc0 [heartbeat] rfkill0 phy0rx phy0tx phy0assoc
phy0radio
ubuntu@omap:/sys/class/leds/beagleboard::usr0$ echo none > trigger
-bash: trigger: Permission denied
ubuntu@omap:/sys/class/leds/beagleboard::usr0$ sudo echo none >
trigger
-bash: trigger: Permission denied
ubuntu@omap:/sys/class/leds/beagleboard::usr0$
try doing ‘sudo -s’ first.
See http://en.wikipedia.org/wiki/Filesystem_permissions.
Thanks
sudo -s - works OK, now I can initialize and toggle LED