*banner
 

home
overview
developers


Topics of interest:
Cross-compiling
STLPort
Gumstix/Waysmall


Gumstix

The Gumstix computers are small embedded Xscale machines that run Linux.

http://www.gumstix.com

Linux Journal article

To Buy

  • cfstix audio pack [KIT0006] $224.00
     wall adapter
     serial null-modem cable
     audiostix AC97
     tweener
     gumstick connex 400g
     cfstix
    
    or
  • etherstix audio pack [KIT0003] $254.00
     wall adapter
     serial null-modem cable
     audiostix AC97
     tweener
     gumstick connex 400g
     etherstix
     ethernet cable 6' 
    
  • waysmall 200st-bt [WS200AXBT] $174.00 ( wall adapter, gumstix basix 200f-bt, waysmall board)
  • serial null-modem cable [CBL0002] $12.00
  • Initial checkout

  • See Getting Started
  • Connect the tweener tweener board, which has a round din connector to the cpu
  • Plug the power adapter in
  • Connect the serial cable to your computer
  • Under Windows, do Start -> All Programs -> Accessories -> Communications -> Hyperterminal. Then create a new connection and select COM1. Use File -> Edit to change the settings.
    Bits per second: 115200
    Databits: 8
    Parity: None
    Stop bits: 1
    Flow Control: None  
    
  • Connect to the gumstix with user root, password gumstix
  • Audio

    We have an audiostix AC97

    How to connect the audio gumstix

  • Power down the gumstix, connect the audio board
  • Q: How do I phycially connect up the boards of the etherstix audio pack?
    A: Graphically the connection of the gumstix connex sits between the etherstix and the audiostix boards.
    ++AA++-etherstix-----
    ++AA++-gumstix connex --++BB++
    +----------audiostix------+BB+
    
    
    AA = 92-pin bus header
    
    BB = 60-pin hirose connector
    
    or
    
    
    ++AA++-gumstix connex --++BB++
    ++BB++--------- tweener
    +----------audiostix------+BB+
    
    If the tweener board is added, connect the tweener to extend outside of the sandwich. Note: the etherstix cannot be connected at the same time as the tweener due to connectors getting in the way of each other.

    Q: Does it matter what direction the boards are connected on as long as the right connecter is used?

    A: The expansion boards will only work when connected the right way round, even though the connector is nearly symmetrical and will physically allow itself to be plugged in backwards. The three (3) boards should all overlap each other, aligned the same way, in the sandwich configuration. Audiostix/connex/etherstix should all fit comfortably for example.

    When the tweener board is used, it does not align with the other boards, but rather sticks out of the end.

  • Audio tools include Aumix, bplay, madplay
  • Q: How do I make sense of the sound system for audiostix?
  • Use the following command to enable the audio
    modprobe -v pxa-ac97
    
    If you don't do this then bplay will say /dev/dsp no such device or address
  • brec/bplay manual brec can be used to store audio
  • Looking at the audiostix on edge:
       usb      power  line-in  line-out
    
  • Connect up an audio source to line-in and a set of head phones to line-out
    modprobe -v pxa-ac97
    cd /tmp
    brec > foo
    bplay foo
    
  • Ethernet

    Q: Should either of the LEDs turn on when an Ethernet cable is plugged in?
    A: The LEDs on the etherstix board will only light when the ethernet cable is plugged in *and* the device is started in linux, by typeing "ifup eth0" at the command prompt.

    Bluetooth

    # ./init.d/S30bluetooth stop
    Stopping Bluetooth subsystem: pand dund rfcomm hidd sdpd hcid /dev/ttyS3.
    # ./init.d/S30bluetooth start
    Set (GPIO,out,clear) via /proc/gpio/GPIO7
    Set (GPIO,out,set) via /proc/gpio/GPIO7
    Starting Bluetooth subsystem: /dev/ttyS3 hcid sdpd rfcomm pand.
    
  • FlockBots page

    Software

    Building the environment under cygwin
  • Make sure you have the following commands:
    svn
    patch
    wget
    
    See if you have the above binaries, run Cygwin setup and install them.
    svn is the subversion binary.
  • Use subversion, run make:
    svn co http://svn.gumstix.com/gumstix-buildroot/trunk gumstix-buildroot
    cd gumstix-buildroot
    make
    
  • Problem: uClibC is not in the right place
    00:20:03 (9.83 KB/s) - `/cygdrive/c/cxh/src/gumstix/gumstix-buildroot/sources/dl/uClibc-0.9.27.tar.bz2' saved [1693895/1693895]
    
    mkdir -p /cygdrive/c/cxh/src/gumstix/gumstix-buildroot/toolchain_build_arm_nofpu
    bzcat /cygdrive/c/cxh/src/gumstix/gumstix-buildroot/sources/dl/uClibc-0.9.27.tar.bz2 | tar -C /cygdrive/c/cxh/src/gumstix/gumstix-buildroot/toolchain_build_arm_nofpu -xf -
    bzcat: Can't open input file /cygdrive/c/cxh/src/gumstix/gumstix-buildroot/sources/dl/uClibc-0.9.27.tar.bz2: No such file or directory.
    touch /cygdrive/c/cxh/src/gumstix/gumstix-buildroot/toolchain_build_arm_nofpu/uClibc-0.9.27/.unpacked
    touch: cannot touch `/cygdrive/c/cxh/src/gumstix/gumstix-buildroot/toolchain_build_arm_nofpu/uClibc-0.9.27/.unpacked': No such file or directory
    make: *** [/cygdrive/c/cxh/src/gumstix/gumstix-buildroot/toolchain_build_arm_nofpu/uClibc-0.9.27/.unpacked] Error 1
    
    Solution: This is a /cygdrive/c problem.

    Usually /cygdrive/c/cxh will map to c:\cxh. However, I'm running a bogus version of wget that does not understand /cygdrive/c notation:

    bash-3.00$ which wget
    /cygdrive/c/WinAVR/utils/bin/wget
    
    So, I just remove that directory from my path. and rerun
    make distclean
    make
    
    
  • Problem:
    make -j3 -C /cygdrive/c/cxh/src/gumstix/gumstix-buildroot/build_arm_nofpu/linux-2.6.11gum CROSS_COMPILE=/cygdrive/c/cxh/src/gumstix/gumstix-buildroot/build_arm_nofpu/staging_dir/bin/arm-linux-uclibc- ARCH=arm silentoldconfig
    make[1]: /cygdrive/c/cxh/src/gumstix/gumstix-buildroot/build_arm_nofpu/staging_dir/bin/arm-linux-uclibc-gcc: Command not found
    make[1]: Entering directory `/cygdrive/c/cxh/src/gumstix/gumstix-buildroot/build_arm_nofpu/linux-2.6.11gum'
    make[1]: Entering directory `/cygdrive/c/cxh/src/gumstix/gumstix-buildroot/build_arm_nofpu/linux-2.6.11gum'
    make[1]: /cygdrive/c/cxh/src/gumstix/gumstix-buildroot/build_arm_nofpu/staging_dir/bin/arm-linux-uclibc-gcc: Command not found
    make[1]: /cygdrive/c/cxh/src/gumstix/gumstix-buildroot/build_arm_nofpu/staging_dir/bin/arm-linux-uclibc-gcc: Command not found
      HOSTCC  scripts/basic/fixdep
    /bin/sh: /cygdrive/c/cxh/src/gumstix/gumstix-buildroot/build_arm_nofpu/staging_dir/bin/arm-linux-uclibc-gcc: No such file or directory
    fixdep: 
    : No such file or directory
    make[2]: *** [scripts/basic/fixdep] Error 2
    make[1]: *** [scripts_basic] Error 2
    make[1]: Leaving directory `/cygdrive/c/cxh/src/gumstix/gumstix-buildroot/build_arm_nofpu/linux-2.6.11gum'
    make: *** [/cygdrive/c/cxh/src/gumstix/gumstix-buildroot/build_arm_nofpu/linux-2.6.11gum/include/linux/autoconf.h] Error 2
    
    Solution: I ran make -k to get past this.
  • wget --passive-ftp -P /cygdrive/c/cxh/src/gumstix/gumstix-buildroot/sources/dl ftp://ftp.denx.de/pub/u-boot/u-boot-1.1.2.tar.bz2
    --18:39:54--  ftp://ftp.denx.de/pub/u-boot/u-boot-1.1.2.tar.bz2
               => `/cygdrive/c/cxh/src/gumstix/gumstix-buildroot/sources/dl/u-boot-1.1.2.tar.bz2'
    Resolving ftp.denx.de... 81.169.171.120
    Connecting to ftp.denx.de|81.169.171.120|:21... connected.
    Logging in as anonymous ... 
    Error in server response, closing control connection.
    Retrying.
    
    Download
  • Colinux

    The Cygwin install was not working, I kept getting
    make[1]: /cygdrive/c/cxh/src/gumstix/gumstix-buildroot/build_arm_nofpu/staging_dir/bin/arm-linux-uclibc-gcc: Command not found
    
    So, I tried the Colinux install
    1. When it says "bridge connections", open the network control panel, select both the TAP driver and your primary network connection using Control-click and then right click and select "Bridge connections"
    2. I ended up running
       apt-get -o APT::Force-LoopBreak=1 install subversion
      
    3. I suggest installing ssh and emacs21
    4. While building gumstix-buildroot, I got:
      sed -i -e "3,4s;/usr;/home/gumstix-buildroot/build_arm_nofpu/staging_dir;" /hom\
      e/gumstix-buildroot/build_arm_nofpu/staging_dir/bin/openobex-config
      sed: invalid option -- i
      Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]...
      
        -n, --quiet, --silent
                       suppress automatic printing of pattern space
        -e script, --expression=script
                       add the script to the commands to be executed
        -f script-file, --file=script-file
                       add the contents of script-file to the commands to be executed
            --help     display this help and exit
        -V, --version  output version information and exit
      
      If no -e, --expression, -f, or --file option is given, then the first
      non-option argument is taken as the sed script to interpret.  All
      remaining arguments are names of input files; if no input files are
      specified, then the standard input is read.
      
      E-mail bug reports to: bug-gnu-utils@gnu.org .
      Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
      make: *** [/home/gumstix-buildroot/build_arm_nofpu/root/usr/lib/libopenobex.so]\
       Error 4
      
      
      The version of sed installed in colinux is 3.02
      colinux:/home/gumstix-buildroot# /bin/sed --version
      GNU sed version 3.02
      
      
      The gumstix version of sed is 4.0.8:
      colinux:/home/gumstix-buildroot# 
      GNU sed version 4.0.8
      
      The solution is to copy build_arm_nofpu/staging_dir/bin/sed to /bin/sed I then did:
      mv sources/dl .
      make distclean
      mv dl sources
      
    5. Building fails because
      bash-3.00$ cd toolchain_build_arm_nofpu/gcc-3.4.2-initial/gcc
      bash-3.00$ make
      The directory that should contain system headers does not exist:
        /cygdrive/c/cxh/src/gumstix-buildroot/toolchain_build_arm_nofpu/uClibc_dev//usr/include
      make: *** [stmp-fixinc] Error 1
      
      The solution: Edit toolchain_build_arm_nofpu/gcc-3.4.2-initial/gcc/Makefile and change
      # Default native SYSTEM_HEADER_DIR, to be overridden by targets.
      # CXHFOO
      NATIVE_SYSTEM_HEADER_DIR = /usr/include
      
      to
      NATIVE_SYSTEM_HEADER_DIR = include
      

    SDL

    See also the Zaurus SDL page
    1. Build gumstix-buildroot: See the gumstix programming page at http://www.gumstix.org/tikiwiki/tiki-index.php?page=programming
    2. Place /usr/local/escher/crosscompile/buildroot_xscale/build_arm/staging_dir/bin in your path so that you have the cross compiler
      export PATH=${PATH}:/home/gumstix-buildroot/build_arm_nofpu/staging_dir/bin
      
      I probably would not put this in ~/root/.profile because that directory might not be mounted.
    3. Download SDL sources from http://www.libsdl.org/
    4. Untar the sources, cd in to the SDL directory
    5. To configure, use
      NM=arm-linux-nm LD=arm-linux-ld CC=arm-linux-gcc CXX=arm-linux-g++ RANLIB=arm-linux-ranlib AR=arm-linux-ar ./configure --disable-video-dummy --disable-video-fbcon  --disable-video-dga --disable-arts --disable-esd --disable-alsa --disable-cdrom --disable-video-x11 --disable-nasm --prefix=/home/arm-cross/SDL --host=arm-linux arm-unknown-linux-gnu
      
    6. make
      make install
      
    7. Compile SDL-1.2.8/test/loopwave.c with
      arm-linux-gcc -I/home/arm-cross/SDL/include loopwave.c -L/home/arm-cross/SDL/lib -static -lSDLmain -lSDL -lSDLmain -lpthread
      
      
      A wave file can be found at ptII/ptolemy/actor/lib/javasound/voice.wav. Copy the wave file and a.exe to the gumstix and run
      ./a.exe voice.wav
      

    USB

  • Download the DOS linendings version of linux.inf from Gumstix USB Instructions
  • Scratchpad work

    >XScale uses a Harvard memory architecture with separate buses for 
    >instructions and data. PXA255 and PXA26x family members each provide 
    >separate 32 Kbyte instruction and data caches and have a special 2 Kbyte 
    >mini data cache intended for “streaming” data. The main data cache is 
    >32-way set associative and employs a round-robin replacement policy.
    
    Hmm... This probably makes it less suitable for the scratchpad work,
    unless there is some way for the code to manipulate this...
    

    MMC

    To mount the mmc drive on gumstix2:
    mount /mnt/mmc
    

    GDB

    See gumstix.org programming notes for gdb instructions

    We run gdbserver on the gumstix and connect from the host machine. One problem is that gdbserver requires libthread_db.so, which was not on the gumstix.

    1. Download from http://ftp.gnu.org/gnu/gdb/, I used gdb-6.4
    2. tar -zxf gdb-6.5.tar.gz
      

    Compiling locally

    Under Windows, create a gdb binary that will run on the gumstix:
    cd gdb-6.5
    NM=arm-linux-nm LD=arm-linux-ld CC=arm-linux-gcc CXX=arm-linux-g++ RANLIB=arm-linux-ranlib AR=arm-linux-ar ./configure --host=arm-linux
    cd libiberty
    NM=arm-linux-nm LD=arm-linux-ld CC=arm-linux-gcc CXX=arm-linux-g++ RANLIB=arm-linux-ranlib AR=arm-linux-ar ./configure --host=arm-linux
    make
    cd ../bfd
    NM=arm-linux-nm LD=arm-linux-ld CC=arm-linux-gcc CXX=arm-linux-g++ RANLIB=arm-linux-ranlib AR=arm-linux-ar ./configure --host=arm-linux
    cd ../opcodes
    NM=arm-linux-nm LD=arm-linux-ld CC=arm-linux-gcc CXX=arm-linux-g++ RANLIB=arm-linux-ranlib AR=arm-linux-ar ./configure --host=arm-linux
    cd ../readline
    NM=arm-linux-nm LD=arm-linux-ld CC=arm-linux-gcc CXX=arm-linux-g++ RANLIB=arm-linux-ranlib AR=arm-linux-ar ./configure --host=arm-linux
    cd ../sim
    NM=arm-linux-nm LD=arm-linux-ld CC=arm-linux-gcc CXX=arm-linux-g++ RANLIB=arm-linux-ranlib AR=arm-linux-ar ./configure --host=arm-linux
    

    More memory

    http://www.gumstix.org/tikiwiki/tiki-view_faq.php?faqId=12&highlight=audiostix says:
    Q: I'm looking for a gumstix system which includes audio, USB, RS232 and storage (MCC or CF) in one system. It seems the 'cfstix audio pack' offers these possibilties but it's not clear to me if all the boards can be together in one system.

    A: Yes, the cfstix audio pack is likely the right answer for these requirements. Some things to consider:

  • cfstix only connects to the gumstix connex platform, not the gumstix basix platform
  • the gumstix connex platform does not have MMC onboard
  • gumstix offers USB client only, no USB host function
  • you could use the tweener board between the gumstix connex and audiostix to get RS232 serial. For more on RS232 serial, click here .
  • The cfstix could work well for your storage requirements with an optional compact flash storage card.

    The boards would connect like this:

    A-- cfstix
    A-- gumstix connex B
    B tweener
    audiostix B

    A = 92-pin bus header
    B = 60-pin hirose connector

  • ©2002-2018 Chess