If you are using OpenEmbedded instead of buildroot to build your gumstix’s software, then some of the documentation will look a touch outdated. The following is not necessarily guaranteed to be globally true, but works for me. The robostix modules and whatnot are in
Your Home Dir /gumstix/gumstix-oe/tmp/work/gumstix-custom-connex- angstrom-linux-gnueabi/robostix-module-1.0[whatever]/install/robostix- module/
Place them on your Gumstix in the indicated subdirectory. Don’t forget to edit /lib/modules/2.6.21/modules.dep and add the robostix.ko filename and path to it, since otherwise modprobe will not see it.
modprobe robostix to load it.
You will also be wanting the robostix command line program, that appears in your buildroot under
Home Dir/gumstix/gumstix-oe/tmp/work/armv5te-angstrom- linux-gnueabi/robostix-cmdline-1.0-r1/install/robostix- cmdline/usr/bin/robostix
The robostix is initially held in ‘reset’ mode by the gumstix. This is not a problem that needs to be fixed in hardware - it’s one of those things that you can fix by manipulating ‘GPIOs’, which incidentally are general-purpose input-output lines, which is to say, i/o wires. To turn it on, once you have installed these programs onto your gumstix, type:
robostix reset off
and Bob is your metaphorical uncle.
Alternatively take a look at the settings in the robostix /etc/init.d/robostix file:
echo “Starting robostix…”
# Make sure ttyS2 is setup
echo “AF2 in” > /proc/gpio/GPIO46
echo “AF1 out” > /proc/gpio/GPIO47
# Turn on the robostix ‘245
echo “GPIO out clear” > /proc/gpio/GPIO72
# Turn on the robostix Power
echo “GPIO out set” > /proc/gpio/GPIO70
# load driver
/sbin/modprobe robostix
# Take the robostix out of reset
echo “GPIO out set” > /proc/gpio/GPIO73
That is, basically, tell the gumstix to stop resetting the robostix and let it do its own thing.
Whatever program was installed on your robostix (say, LED flashing) should suddenly start functioning at this point. To stop it again, robostix reset on (it’s even intuitive).
To get all this to autostart symlink /etc/init.d/robostix to something like /etc/rcS.d/S97robostix
Or better still, read http://docwiki.gumstix.org/Robostix_gumstix_ISP#Installing_Driver_and_Command_Line_Tool_Permanently on the gumstix wiki
If some or all of these files don’t seem to be present in your OpenEmbedded folder that is probably because your configuration doesn’t include them. Check out .gumstix/gumstix-oe/com.gumstix.collection/conf/machine/gumstix-custom-connex.conf
assuming that is you have a connex.
The operative part is:
# if you enable robostix you will need to disable both “lcd” and “touchscreen” features
MACHINE_FEATURES += “robostix”
#MACHINE_FEATURES += “lcd”
#MACHINE_FEATURES += “touchscreen”
(If you’re using a standard openembedded binary you will have to remove these modules - anything that looks like it’s about touch screen and lcd).
Now assuming that part of the point of all of this was to have the robostix speak to the gumstix, you’ll need a few things. First, you’ll need the right jumpers, as shown here: http://docwiki.gumstix.org/Robostix_gumstix_ISP. That is, Atmel 0 Tx to PXA ST Rx and Atmel 0 Rx to PXA ST Tx. Which is to say, connecting the business ends of the AVR’s UART (ttl-level serial) to the business end of the gumstix’s UART.
Second, you’ll need to install a test such as the flash_led program, flash-led.c that writes to the UART on the robostix. Do this by flashing the AVR via the ten-pin ISP socket. REMEMBER TO REMOVE THE GUMSTIX FIRST. Then, do this:
#!/bin/sh
echo “AF2 in” > /proc/gpio/GPIO46
echo “AF1 out” > /proc/gpio/GPIO47
Set the speed to 38400, because otherwise you get the textual equivalent of technicolour gibberish:
stty 38400 < /dev/ttyS2
and
cat /dev/ttyS2
You should see:
Read: ‘ ‘
*** Press a key to continue
*** Continuing…
etc.
Or try: echo “zzzzzzzzzzzzzz”> /dev/ttyS2; more /dev/ttyS2
…which returns
‘Read: ‘z’
Read: ‘z’
Read: ‘z’
…’
Congratulations. You are now talking to your AVR. The dialogue may not be much, but hey