Technologic Systems Logo
Search Icon
Customer Area | Contact Us |Cart Icon
  16525 East Laser Drive
Fountain Hills, AZ 85268
Phone (480) 837-5200

Home > About > News > Documentation

 

TS-7500 Software Guide (deprecated)

arrow

Documentation from August-2009


Table of Contents

The purpose of this document, the TS-7500 Software Guide, is to act as supplemental documentation to the TS-7500 Manual and touch upon some basic usage, configurations, and information for the TS-7500 that didn't seem to belong in the full manual. It has been written for both new and experienced users alike.

This document is somewhat time sensitive. That is, it's not to be used verbatim too far past the date written. Updates are applied to images and files/locations sometimes change. The principles generally stay the same, so keep this in the back of your mind while working through anything which associates with filenames and links in this manual.


Introduction

The TS-7500 was released Jul. 2009 as a small embedded board with a CNS2132 250Mhz ARM9 CPU, Lattice XP2 5k FPGA, 64MB DDR SDRAM, and 4MByte SPI NOR flash chip.

Hardware features include:

  • 250Mhz Cavium ARM9 CPU core (Faraday 526)
  • 64MByte 16-bit wide DDR SDRAM running at 125Mhz
  • micro SD slot
  • 4MByte SPI NOR flash chip
  • DIO pins on the 40 pin header
  • 2 USB 2.0 High speed (480 Mb/s) Host ports
  • 1 USB 2.0 slave port
  • 1 TTL serial console port (16550) on CPU
  • 8 XUART TTL serial ports on FPGA
  • Hardware watchdog on FPGA
  • Optional battery backed real time clock
  • 10/100 Mbit on-CPU ethernet
  • Low power (395mA @ 5V or 2.0 Watt)
  • rugged 40 pin .1" header expansion connector
  • Fanless/heatsink-less operation up to 80C temperatures

Software features include:

  • Boots 2.6.24 Linux out-of-the-box in 2.65 seconds (to shell prompt)
  • Flexible booting options (SD card, onboard SPI NOR flash, offboard SPI)
  • SD card pre-installed with standard Debian Linux "Lenny" distribution
  • Hardware specific functionality via both high level (command line/shell
  • script) and low level (C language userspace) mechanisms.
  • Default software load has hook via USB flash dongle to hijack bootup
  • for custom production loading.

Manufacturer (Technologic Systems) benefits include:

  • Long term availability and short lead-times
  • Engineers on free technical support.
  • Each board undergoes production tests and burn-in stress tests prior to shipment.
  • Board customizations available with no minimum order.

Additional documentation which is generic to all TS models can be found at http://www.embeddedarm.com including:

There are two separate booting memories: SPI Flash and SD Card. In the absence of the TS-752 development board, the TS-7500 will always boot to initrd/busybox from SPI Flash (when 'exit' command is issued, it will boot to Debian located on SD Card). With the TS-752 connected, there are jumpers which control which device to boot from. Here are the jumper settings:

  • Boot from Offboard SPI Flash:
    • JP2 = ON
  • Boot from Onboard SPI Flash:
    • JP1 = OFF; JP2 = OFF
  • Boot from MicroSD Card:
    • JP1 = ON; JP2 = OFF

Should you wish to automatically bypass the fastboot and proceed directly into starting the SD card version of Linux, you can do so with the following command issued to the fastboot shell:

$ rm linuxrc; ln -sf /linuxrc-sdroot /linuxrc; save

For a NFS root filesystem, the command is:

$ rm linuxrc; ln -sf /linuxrc-nfsroot /linuxrc; save

If you would like to run the TS-7500 without the presence of the TS-752, you'll need to copy these changes to the SPI Flash. See "Copying Changes to SPI Flash"

To get back to the fastboot shell, you can do so by placing the file "/fastboot" in the root directory of the filesystem (fourth partition).

Connecting Via Serial Console

Connecting to the TS-7500 is done by connecting a RS-232 Null Modem cable from a development PC running either Linux or Windows to the COM port of the TS-752 development board. If using Windows, PuTTY or Hyperterminal are suggested. If using Linux, minicom is suggested. Whichever program is chosen, these settings are required to connect:

  • Bps/Par/Bits : 115200 8N1
  • Hardware Flow Control : No
  • Software Flow Control : No

Power on the board, and you should see the boot-up in progress and then the initrd/busybox terminal prompt (within 2 seconds).

If using minicom for Linux, you'll need to modify and save the default configuration page. Do to this, follow these instructions (in terminal):

   1.) apt-get install minicom     [IF NOT YET INSTALLED]
   2.) minicom -s
   3.) [Navigate to 'serial port setup']
   4.) [Type "a" and change location of serial device to '/dev/ttyS0' then hit "enter"]
   5.) [If needed, modify the settings to match this and hit "esc" when done]
      E - Bps/Par/Bits          : 115200 8N1
      F - Hardware Flow Control : No
      G - Software Flow Control : No
   6.) [Navigate to 'Save setup as dfl', hit "enter", and then "esc"]

To use minicom, simply type "minicom" in the terminal and power on the board (you'll need to run as super user (sudo) or root to get proper permissions). You should now see:

   >> TS-BOOTROM - built Oct  1 2008                                               
   >> Copyright (c) 2008, Technologic Systems                                      
   >> Booting from SD card...
      

Press "Ctrl + A" to get the minicom command menu. For example, hitting "Ctrl + A" then "Q" will quit the application and return you to the terminal.

Connecting Via Ssh Or Telnet

This section will not be comprehensive as to avoid duplicating any documentation which can already be found online or otherwise. To connect via secure shell (SSH), the TS-7500 needs a password setup for root because SSH will not allow connections without a password. Use the 'passwd' command to set a password. To connect via SSH in Windows, use an application like PuTTY (which also has telnet support). To connect in Linux, use the 'ssh' in the terminal (likewise, use 'telnet' command for telnet).

Basic Commands & Files

The TS-7500 has two environments: 1) an initrd/busybox environment with very fast bootup time and a very stripped down set of linux utilities (ls, cp, and others) and 2) a Debian environment which contains a comprehensive set of tools and utilities which would normally come with a Debian Linux install. If needed, the "Debian GNU/Linux Reference Card" is a good resource for getting started with Debian and can be viewed and printed by following this link: http://xinocat.com/refcard/

There are a couple of custom Technologic Systems commands which are included with the TS-7500 which will help to control and utilize the board and its features. The most useful commands are:


   ts7500ctl
   spiflashctl
   devmem

In order to understand how to use these commands, simply type '--help' at the end of the command ('ts7500ctl --help').

Since space is limited, the commands "df -h" and "free" can provide information about the SD Card/Filesystem and memory/swap usage. Also, "ps" and "top" and "ps aux" can provide information about what programs are running in the background.

Some files of interest include:

  • linuxrc
    • Main TS startup script for initrd/busybox
  • linuxrc-fastboot
    • Uses initrd as root filesystem and drops to shell--on exit of serial shell, real Linux is booted.
  • linuxrc-mtdroot
    • Roots to NAND flash chip (NOT APPLICABLE TO TS-7500)
  • linuxrc-nfsroot
    • Attempts to NFS root to 192.168.0.1:/tsarm-nfsroot
  • linuxrc-sdroot
    • Roots to SD flash card, assumes partition #3
  • /etc/network/interfaces
    • Network interface configuration
  • /etc/inittab
    • Describes which processes are started at bootup and during normal operation

USB Devices in Fastboot Environment

By default, the TS-7500 will not insert the necessary modules into the kernel to mount and use USB devices within the initrd/busybox environment if there is no USB device present upon bootup (USB support is enabled by default within the Debian environment). The quickest way to get a USB device (like a USB thumb drive) to mount in the initrd/busybox environment is to ensure that it is plugged in before the TS-7500 is powered up. In order to get hot-swappable USB devices regardless of device presence at bootup time, you must "modprobe" the necessary modules. This has been done for you in the ts7500.subr file. The inclusion of the line ". /ts7500.subr" at the top of script followed by "usbload".

Setup a Dynamic/Static IP Address

You can change the default IP address of 192.168.0.50 to something that suits your network a little more. If you're interested in setting up a dynamic IP address, simply use the "dhclient" from within Debian or "udhcpc" from within the busybox/fastboot environment. If you'd like a bit more control over the IP address, you can set the TS-7500 up with a static IP address. From within Debian, edit "/etc/network/interfaces" to reflect the changes you'd like to make:

   # Used by ifup(8) and ifdown(8). See the interfaces(5) man page or
   # /usr/share/doc/ifupdown/examples for more information.

   auto eth0
   #iface eth0 inet dhcp
   iface eth0 inet static
           address 192.168.1.100
           network 192.168.1.0
           netmask 255.255.255.0
           broadcast 192.168.1.255
           gateway 192.168.1.1


   #auto eth1
   #iface eth1 inet dhcp

Then, edit the "/etc/resolv.conf" file to reflect the DNS servers:

   #domain ts-local.net
   #search ts-local.net
   nameserver 208.67.222.222
   nameserver 208.67.220.220

Now, reset the eth0 interface by using the command:

ifdown eth0; ifup eth0

Test the connection using the command:

ping google.com

Developing on Board

One of the most common ways to develop applications for the TS-7500 is on the board itself using an editor such as "vi" or "nano". vi can be difficult to understand at first, so refer to vi documentation which can be found through an Internet search. You may also use any other CLI editors of your choosing such as emacs, pico, nano, etc.

Development of a simple .c or .cpp file can be compiled directly on the board by issuing this command:

gcc -Wall -mcpu=arm9 tstest.c -o tstest
  • Wall = print out all warning messages
  • mcpu=arm9 = specify architecture (a bit redundant)
  • tstest.c = file to compile
  • -o tstest = output file name

Possibly the best way to develop applications for the TS-7500 is by using a Linux box with an NFS share setup which the TS-7500 can access (Linux Journal has a guide on how to do this entitled "Starting Share Files with NFS"). This way, development can occur from the Linux box with a full GUI and be quickly compiled and ran directly from the TS-7500 fastboot/initrd environment without the need to transfer files. Here is the brief set of commands to run after setting up the NFS server in order to access the NFS share and start developing:

   # On-Board development from initrd/fastboot environment (tested on TS-7500 & TS-7800).
   # Requires NFS server

   udhcpc
   mkdir -p /mnt/root/mnt2
   mount -o nolock,vers=2 192.168.1.101:/home/username /mnt/root/mnt2/
   chroot /mnt/root
   mount /proc
   cd mnt2/

   #EXAMPLE:
   #gcc -g -mcpu=arm9 gettemp.c sbus.c -o gettemp

Another way is to simply transfer files from the development PC to the TS-7500 via FTP (username: eclipse; password: eclipse) and then compile on board. Most Linux distributions have "ftp" installed already. Here is an example dialog from a Linux box which transfers a test file to and from the TS-7500 within the Debian environment:

   [user@linux ~]$ ftp 192.168.0.50
   Connected to 192.168.0.50 (192.168.0.50).
   220 ts7500 FTP server (Version 6.4/OpenBSD/Linux-ftpd-0.17) ready.
   Name (192.168.0.50:user): eclipse
   331 Password required for eclipse.
   Password: eclipse
   230- Linux ts7500 2.6.24.4 #55 Fri Aug 7 11:20:02 MST 2009 armv4l
   230- 
   230- The programs included with the Debian GNU/Linux system are free software;
   230- the exact distribution terms for each program are described in the
   230- individual files in /usr/share/doc/*/copyright.
   230- 
   230- Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
   230- permitted by applicable law.
   230 User eclipse logged in.
   Remote system type is UNIX.
   Using binary mode to transfer files.
   ftp> send test.c

   local: test.c remote: test.c
   227 Entering Passive Mode (192,168,0,50,169,248)
   150 Opening BINARY mode data connection for 'test.c'.
   226 Transfer complete.
   19914 bytes sent in 0.00399 secs (4994.73 Kbytes/sec)
   ftp> get test.c
   local: test.c remote: test.c
   227 Entering Passive Mode (192,168,0,50,218,4)
   150 Opening BINARY mode data connection for 'test.c' (19914 bytes).
   226 Transfer complete.
   19914 bytes received in 0.00578 secs (3447.71 Kbytes/sec)
   ftp> bye
   221 Goodbye.
   [user@linux ~]$ 

Java Development

Out of the box, the TS-7500 does not offer any support for Java developers. In order to provide Java development support, Technologic Systems has made a Debian Etch distribution complete with Java development tools available for download on the TS-7500 FTP Repository or by clicking on this direct link.

Once downloaded, the distribution can then be un-archived to the 4th partition of the MicroSD card.

Partition Layout Information

The TS-7500 can boot from a MicroSD card with the proper partition layout. One could purchase a 2GB MicroSD card on their own, download an MicroSD card image from the Technologic Systems TS-7500 FTP repository, and image the card. For customers who purchased the 2GB MicroSD card through the development kit or from the TS website, the MicroSD card already has the correct image. See "Backup/Restore the MicroSD Card/SPI Flash Image(s)".

The TS-7500 is similar to other TS models in that it can boot from an SD card (2GB MicroSD in this case) with four partitions with this layout:

   1 - vfat partition with development kit and samples  (FAT32)
   2 - raw linux kernel   (Non-FS)
   3 - initrd/busybox     (Non-FS)
   4 - debian linux       (ext3)
      

One of the major differences of the TS-7500 from other TS models is that it has a 4MB SPI Flash card which contains two 'partitions':

   1 - raw linux kernel  (2096640 bytes MAX!)
   2 - initrd/busybox    (2097152 bytes MAX!)
      

These are used when the absence of the TS-752. In other words, the TS-7500 will boot from SPI Flash if not connected to TS-752. When the user types "exit" from the busybox environment, it will boot into the Debian partition of the MicroSD card.

The partition locations can be found using the terminal command 'fdisk -l' on a development PC with Linux installed and the MicroSD card inserted in the USB SD card reader. Most of the time the SD card will probably be mounted as '/dev/sdb', but can be '/dev/sdc' or others. The partition number will follow ('/dev/sdb1'). It's advised to verify this location before issuing any commands found in this mini-guide.

NOTE:

If you try and mount the MicroSD card on a Windows PC, you will only see the very first partition. On a Linux PC, all partitions are visible.

Backup/Restore the MicroSD Card/SPI Flash Image(s)

Before modifying the files located on the factory image, it's always a good idea to create a backup or have a backup copy on hand. In order to create a backup, simply use the 'dd' command on the development PC with Linux. For example (done in the terminal):

   dd if=/dev/sdb of=backup.dd  [verify /dev/ location with 'fdisk -l']

A factory image can be found on the Technologic Systems FTP repository here:
ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7500-linux/binaries/ts-images/

To backup the SPI Flash on the TS-7500:

    
   1.) mkdir /temp
   2.) spiflashctl -R 4095 -z 512 -k part1 > /temp/zImage
   3.) spiflashctl -R 32 -z 65536 -k part2 > /temp/initrd
      

To restore image to the MicroSD card:

   dd if=backup.dd of=/dev/sdb
   

To restore image to SPI Flash:

   1.) spiflashctl -W 4095 -z 512 -k part1 -i /temp/zImage
   2.) spiflashctl -W 32 -z 65536 -k part2 -i /temp/initrd
         

Modifying/Adding Files

Most development can be completed directly from the board, but it might not be as efficient or simple as modifying or adding the files directly on a separate development PC with a Linux OS. To do this, insert the MicroSD card into the SD card adapter and then insert the SD Card adapter into the USB SD card reader. The Linux system will probably try to automatically mount the partitions. This might work for some users, but a good habit would be to manually mount the partitions to a known directory. Here is one way to do this and then start editing a file (all done in terminal on Linux PC):

   1.) mkdir /mnt/part4
   2.) mount -t ext3 /dev/sdb4 /mnt/part4 [verify /dev/ location with 'fdisk -l']
   3.) cd /mnt/part4
   4.) vi linuxrc  [you may use an editor of your choice like gedit]
      

Other partitions of interest would be partition 1 and 3, in which case you'll repeat the steps 1-3 above with the new partition number.

There are several other methods to transfer files including USB thumb drives, FTP, NFS, Samba, etc. Some of these methods have been discussed already in the Developing on Board section above.

Fixing MicroSD Card Corruption

Technologic Systems carefully chooses the type of filesystems in which to use in any of their products, however, no filesystem is perfect. They are all susceptible to becoming dirty with filesystem corruption. Symptoms include long boot times and/or the Linux development PC not being able to identify or mount the partitions (both nonfs and ext3) when the MicroSD card is inserted into the USB SD Card reader. Most of the time this is easily fixed by running, for example, "fsck /dev/sdb4" on the Linux development PC.

Copying Changes to SPI Flash

As mentioned before, the TS-7500 will boot from what is located on the SPI Flash in the absence of the TS-752 development board (or when the jumpers on the TS-752 are set to JP1= OFF; JP2 = OFF). In order to use any changes made to the kernel image or initrd/busybox partitions of the MicroSD card their files will need to be transferred to SPI Flash. In order to accomplish this, there is a custom program called 'spiflashctl' within the initrd/busybox environment. AFTER TESTING the changes and modified files on the MicroSD card AND VERIFYING THE KERNEL IMAGE SIZE IS < 2096640 bytes AND INITRD IMAGE IS < 2097152 bytes, use these steps to copy them to SPI Flash:

   1.) mkdir /temp
   2.) dd if=/dev/nbd2 of=/temp/zImage
   3.) dd if=/dev/nbd3 of=/temp/initrd
   4.) spiflashctl -W 4095 -z 512 -k part1 -i /temp/zImage
   5.) spiflashctl -W 32 -z 65536 -k part2 -i /temp/initrd
   6.) sync

Test by placing both JP1 and JP2 to the OFF position. You should see

   ">> Booting from onboard SPI flash..." 

on the console and the system should boot as expected.

For more information on the 'spiflashctl' program, add the '--help' flag:

   spiflashctl --help

Simple Cross Compiling Example

The following is a step-by-step guide to compiling a simple C++ program for use in the Debian environment. These steps have been verified and will work if they are followed in the exact, step-by-step order. If you would like to compile an application for the busybox environment, simply replace the glibc crosstools with the uclibc crosstools located here and keep in mind that the directory structure is a little different. Also, for compiling a C program, replace 'g++' with 'gcc'. The same is also true for other compilers.

   Assumptions:
      -- The cross compiler will be located at ~/crosstool (~ is equivalent to $HOME)
	     * mkdir ~/crosstool/   
      -- The program will be located at ~/main.cpp

   01.) Download the cross compile toolchain from Technologic Systems:
      *  wget ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7200-linux/cross-toolchains/crosstool-linux-gcc-4.0.1-glibc-2.3.5.tar.bz2

   02.) Extract to crosstool directory:
      * tar xvf crosstool-linux-gcc-4.0.1-glibc-2.3.5.tar.bz2 -C ~/crosstool

   03.) For cleanliness sake, delete the originally downloaded tar.gz file:
      * rm crosstool-linux-gcc-4.0.1-glibc-2.3.5.tar.bz2

   04.) Change directory to where your program is located:
      * cd ~
      
   05.) Use the following greatest common divisor (gcd.cpp) file as an example if 
	    needed:

   =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

     #include <iostream>
     using namespace std;

     int GCD(int a, int b)
     {
         while( 1 )
         {
             a = a % b;
		     if( a == 0 )
			     return b;
		     b = b % a;

             if( b == 0 )
			     return a;
         }
     }

     int main()
     {
	     int x, y;

	     cout << "This program allows calculating the GCD\n";
	     cout << "Value 1: ";
	     cin >> x;
	     cout << "Value 2: ";
	     cin >> y;

	     cout << "\nThe Greatest Common Divisor of "
	          << x << " and " << y << " is " << GCD(x, y) << endl;  

	     return 0;
     }

   =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

   06.) Use the cross compiling toolchain to compile the program:
      * ./crosstool/opt/crosstool/gcc-4.0.1-glibc-2.3.5/arm-unknown-linux-gnu/bin/arm-unknown-linux-gnu-g++ gcd.cpp -o gcd

   07.) Copy the program to the TS-75XX and then test by running it.  You will see:

        ts7500:~# ./gcd 
        This program allows calculating the GCD
        Value 1: 8
        Value 2: 2

        The Greatest Common Divisor of 8 and 2 is 2
        ts7500:~# 

   08.) Additionally, you can include the crosstools in your PATH for less typing:
      * PATH=$HOME/crosstool/opt/crosstool/gcc-4.0.1-glibc-2.3.5/arm-unknown-linux-gnu/bin/:$PATH
      * export PATH
      * arm-linux-uclibc-g++ gcd.cpp -o gcd

Compiling TS-Kernel with Custom Options

The following is a step-by-step guide to compiling a custom TS-Kernel specifically for the TS-7500. These steps have been verified and will work if they are followed in the exact, step-by-step order. This was written with beginners in mind, but may still be a bit too advanced for some. Remember to backup file and images so you may revert back to them if something goes wrong.

Warning:

BACKUP YOUR FILES AND IMAGES!

Prerequisites:

SOFTWARE:

  • Must be logged in as root on a Linux PC separate from the SBC
  • These packages need to be installed for kernel compiling:

    RHEL/Fedora/CentOS:
    yum install ncurses-devel ncurses
    Debian/Ubuntu:
    sudo apt-get install libncurses5-dev libncursesw5-dev

HARDWARE:

  • TS-7500 SBC with 2GB MicroSD Card inserted
  • TS-752 Development Board Connected with JP1 = OFF; JP2 = ON
  • MicroSD Card Adapter and USB SD Card Reader
  • Development PC with Linux installed

  
   01.) Download the cross compile toolchain (OABI)from Technologic Systems:
      * wget ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7500-linux/cross-toolchains/crosstool-linux-arm-uclibc-3.4.6.tar.gz

   02.) Extract to current working directory:
      * tar xvf crosstool-linux-arm-uclibc-3.4.6.tar.gz

   03.) Obtain the TS-7500 kernel source tree
      * wget ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7500-linux/sources/linux-2.6.24-ts-src-aug102009.tar.gz

   04.) Extract the TS-7500 kernel source tree
      * gzip -dc linux-2.6.24-ts-src-aug102009.tar.gz | tar xf -

   05.) Move into the newly extracted directory
      * cd linux-2.6.24-cavium/

   06.) Edit the Makefile at the kernel root dir to point to the appropriate 
        cross-compiler path.  In our case, with the toolchain decompressed into 
        the same directory as the kernel, we'll change line 195 of the Makefile 
        to read:
      * CROSS_COMPILE ?= ../arm-uclibc-3.4.6/bin/arm-linux-

   07.) Type "make ts7500_defconfig" to make the kernel with the options that 
        Technologic Systems uses for the TS-7500

   08.) Type "make menuconfig" and edit the boot command line and other options 
        of interest (optional)
      * For Example, to include CIFS support, use the arrow and Enter keys to 
        navigate to Filesystems -> Network File Systems -> CIFS Support.  Press 
        "y" to include CIFS support into the kernel (alternatively, you could 
        modularize the feature with "m" so you can enable or disable the module 
        on demand which will also enable you to simply copy/paste the cifs.ko 
        into the correct path in the kernel instead of copying the entire kernel 
        (outlined below in appendix)).  Keep hitting "exit" until you're 
        prompted to save changes, choose "yes".

   09.) Type "make" to compile the kernel

   10.) The new kernel will be at "arch/arm/boot" in a compressed format called 
        zImage (the uncompressed version is simply called Image, but it is 
        REQUIRED that it be < 2096640 bytes in size).

   11.) Copy the binary zImage to the second partition (in most cases, this is 
        mounted as /dev/sdb2).  This will erase any data which is on the MiniSD 
        card now, so a backup is advised.
      * TO BACKUP: dd if=/dev/sdb2 of=../zImageBak
      * TO COPY zImage: dd if=arch/arm/boot/zImage of=/dev/sdb2

   12.) At this point, insert the MiniSD card and try to boot.  If the image is 
        working correctly, and you'd like to be able to use the TS-7500 
        independently of the TS-752 development board, you will need to copy the 
        kernel to the 4MB SPI Flash on the board, as it will boot from SPI 
        Flash instead of MiniSD without the development board.
      * mkdir /temp
      * dd if=/dev/nbd2 of=/temp/zImage
      * dd if=/dev/nbd3 of=/temp/initrd
      * spiflashctl -W 4095 -z 512 -k part1 -i /temp/zImage
      * spiflashctl -W 32 -z 65536 -k part2 -i /temp/initrd
      * sync

   13.) Test by placing both JP1 and JP2 to the OFF position.  You should have 
        ">> Booting from onboard SPI flash..." and the system should boot as 
        expected.
        

Appendix - Compiling TS-Kernel with Custom Options

In order to compile a separate kernel module and come out with a .ko file for inclusion in the already existing kernel, these are the steps to take following step 08 and ending at step 09 above. Note: Steps after step 02 are unverified/untested. They represent an accurate procedure which one would go through.

   01.) Open menuconfig and modularize the kernel feature using "M".  For 
        example, to modularize cifs.ko, one would use the arrow and Enter keys 
        to navigate to Filesystems -> Network File Systems -> CIFS Support.  
        Press "M" to modularize CIFS support into the kernel then keep hitting 
        "exit" until you're prompted to save changes, choose "yes".
      * make menuconfig
      
   02.) Compile the kernel with the modules and copy the modules to the Linux PC
      * make && make modules && make modules_install  
      
   03.) Retrieve the module which was copied to the Linux PC with a command like
        cp so that it can be installed into the kernel on the MiniSD card.
      * mkdir /mnt/miniSD4
      * mount /dev/sdb4 /mnt/miniSD4
      * cp /lib/modules/2.6.24.4/kernel/fs/cifs/cifs.ko /mnt/miniSD4
      
   04.) Install the module into the kernel by copy and pasting from partition 4 
        of the card to partition 2 on the SBC.
      * cp -r /dev/nbd4/cifs.ko /dev/nbd2/lib/modules/2.6.24.4/kernel/fs/cifs/cifs.ko

    05.) Finally, in order to use the new module, you must enable it.  This can 
         be included in a startup script such as linuxrc.
      * depmod
      * modprobe cifs.ko

If you're having difficulties inserting your module (ie. "insmod: error inserting module.ko: -1 Invalid module format"), it could be because either 1.) the kernel which it was compiled against has not been loaded to the microSD and/or 2.) there are module dependencies that are not being satisfied. The 'dmesg' utility is invaluable when trying to troubleshoot these issues.

When compiling additional modules into the kernel, you must use "make modules_install" as the final step in kernel compiling to install the modules to your development Linux PC. From there, you can create a tarball to copy and then extract to the fourth partition of the microSD card. ie. (assuming your microSD card's device node was enumerated to /dev/sdb; use 'fdisk -l' to verify)

   tar czvf linuxmodules-2.6.24.tar.gz /lib/modules/2.6.24.4/
   mkdir /mnt/sd_part4
   mount /dev/sdb4 /mnt/sd_part4
   tar xzvf linuxmodules-2.6.24.tar.gz -C /mnt/sd_part4/

After doing this, boot the TS-7500 with the updated microSD card to full Debian and then can use "depmod -a" to build the module dependency lists that 'modprobe' will use. Once this has been complete, you should then be able to use 'modprobe' to successfully insert the module along with all of its dependencies. ie.

   modprobe usbnet

If you would like your module to be inserted automatically on system startup, then simply include the module name in /etc/modules. ie.

   echo "usbnet" >> /etc/modules

Keep in mind that if anything in the 'make menuconfig' step was required to be compiled as part of the kernel as indicated by [*], then you will need to copy the entire kernel image to the microSD card. ie.

   dd if=arch/arm/boot/Image of=/dev/sdb2

Simple Demonstration Utilizing an XUART

This is an example of how to use the XUART0 and CONSOLE and make them talk to each other. XUART0 was chosen because of it's easy to connect and RS-232 level shifters are not required to use it like the other XUARTS.

Hardware Required:

  • TS-7500
  • TS-752
  • 2x NULL Modem Cables
  • 2x Serial Ports on Development PC
  • Connecting hook-up cables with connector sockets
    • This will connect the male pins of the DB9 header to the female pins of the null modem cable
    • USB to Serial, built-in, or otherwise
 01.) Setup the test bench
      a.) Connect the TS-7500 with the TS-752, but do not power yet.
      b.) Connect the NULL modem cables to the serial ports on the development
          PC, but do not connect them to the TS-7500 at this point.
      c.) On the development PC, open a terminal emulator such as puTTY, 
          Hyperterminal (Windows), or minicom (Linux) and open two connections, 
          one for CONSOLE and one for XUART0.
          i.) You will need to set the connection variables to 115200 baud, 8N1,
              and no hardware control for both of the NULL modem cables for
              this test.
          ii.) To specify, this guide will refer to the NULL modem cable which
               will become the terminal console of the TS-7500 as NM1.  The NULL
               modem cable which will become the XUART0 of the TS-7500 will be
               referred to as NM2.
 02.) Make the connections between the DB9 header and NULL modem cables

       =============         =============  
      1\\+ + + + +//5       5\\- - - - -//1 
      6 \\+ + + +// 9       9 \\- - - -// 6 
         =========             =========
         DB9 HEADER          NULL MODEM (NM)

      a.) Required pins:
            PIN2 of DB9 header of TS-752 is CONSOLE_RX
            PIN3 of DB9 header of TS-752 is CONSOLE_TX
            PIN7 of DB9 header of TS-752 is DIO5_TXD2 (XUART#0)
            PIN8 of DB9 header of TS-752 is DIO6_RXD2 (XUART#0)
      b.) Make the following physical pin connections:
            DB9_PIN2 <=====> NM1_PIN2
            DB9_PIN3 <=====> NM1_PIN3
            DB9_PIN7 <=====> NM2_PIN3
            DB9_PIN8 <=====> NM2_PIN2
 03.) Power on the TS-7500
      a.) Observe NM1 terminal emulator on the development PC.  It should be 
          showing the startup sequence and command prompt of the TS-7500 which 
          looks like this:

            >> TS-BOOTROM - built Jul 30 2009 13:41:34
            >> Copyright (c) 2009, Technologic Systems
            >> Booting from offboard SPI flash...
            .
            .
            .
            Finished booting in 2.61 seconds
            Type 'tshelp' for help
            #

 04.) Setup XUART0 using the following command on the TS-7500:
      * xuartctl --port 0 --server
 05.) Observe the output of the above command.  It should look like this:     

        # xuartctl --port 0 --server --speed 115200
        ttyname=/dev/pts/0
        # 

 06.) Send a message to the development PC from the TS-7500 XUART0 by using
        the command:
      * echo "Hello world" > /dev/pts/0
 07.) Send a message to the TS-7500 from the development PC by using the
        following command and then typing into the terminal emulator on the 
        development PC.
      * cat /dev/pts/0
          -- Note: Use CTRL+C to exit
 08.) Observe the output of the characters typed on the development PC terminal
        emulator appear on the TS-7500.
        
        # cat /dev/pts/0
        Hello World!
        # 

The xuartctl utility will always choose the first free device node. So, there may be instances where specifying "--port 0" will result in /dev/pts/1. This makes it difficult when programming for /dev/pts/0 specifically. One suggestion to overcome this is to create symlinks:

   ln -s /dev/pts/1 /dev/pts/0

Bluetooth Support

This section will assist in giving an overview of how to proceed in order to get bluetooth started for both USB serial and Bluetooth ports on the TS-7500. These steps were reported to work by a customer, but have been unverified.

Required packages to be compiled manually:

   'bluez-libs-3.36' AND 'bluez-utils-3.36'

Required modules to be compiled into or modularized in kernel (see "Compiling TS-Kernel with Custom Options"):

   'ohci-hcd', 'bluetooth', and 'hci_usb'

Here is an example script to get everything working:

   #######################
   # BEGIN SCRIPT        #
   #######################
   depmod
   modprobe ohci-hcd    # open HCI
   #modprobe uhci-hcd   # Intels HCI universal uses the PCI

   modprobe bluetooth   # load Bluez stack
   modprobe hci_usb     # load USB device handlers
    
   /etc/init.d/bluetooth restart   # startup hci0 bluetooth network device
   hciconfig  hci0 up
   modprobe rfcomm 

   mknod -m 666 /dev/rfcomm0 c 216 0 
   mknod -m 666 /dev/rfcomm1 c 216 1 
   rfcomm bind 0 <Bluetooth device MAC address>  # serial BT connection  
   #######################
   # END SCRIPT          #
   #######################

Example .c Program

Here is an example of a userspace application which controls and reads the DIO pins of the TS-752. This example can also be found on the FTP site located here: ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7500-linux/samples/dio.c

    /*******************************************************************************
    * Program: 
    *    Get DIO (dio.c)
    *    Technologic Systems TS-7500 with TS-752 Development Board
    * 
    * Summary:
    *   This program will accept any pin number between 5 and 40 and attempt to get
    * or set those pins in a c program rather than scripted.  You will need the 
    * TS-7500 and TS-752 development board. Although this program will enable the 
    * use of said pins, it will primarily enable the use of the 8 Inputs, 3 Outputs,
    * and Relays on the TS-752.  Keep in mind that if a GND or PWR pin is read (or
    * something else illogical, we don't necessarily care about the output because 
    * it could be simply "junk". 
    *   Notice careful semaphore usage (sbuslock, sbusunlock) within main.
    *
    * Usage:
    *   ./dio <get|set> <pin#> <set_value (0|1|2)>
    *
    * 0 - GND
    * 1 - 3.3V
    * 2 - Z (High Impedance)
    *
    * Examples:
    *   To read an input pin (such as 1 through 8 on the TS-752):
    *      ts7500:~/sbus# ./dio get 40
    *      Result of getdiopin(38) is: 1 
    *
    *   To set an output pin (such as 1 through 3 or relays on the TS-752):
    *      ts7500:~/sbus# ./dio set 33 0
    *      Pin#33 has been set to 0   [You may verify with DVM]
    *
    * Compile with:
    *   gcc -mcpu=arm9 dio.c sbus.c -o dio
    *******************************************************************************/
    #include "sbus.h"
    #include <assert.h>
    #include <string.h>
    #include <stdio.h>

    #define DIO_Z 2

    /*******************************************************************************
    * Main: accept input from the command line and act accordingly.
    *******************************************************************************/
    int main(int argc, char **argv)
    {
       int pin;
       int val;
       int returnedValue;
             
       // Check for invalid command line arguments
       if ((argc > 4) | (argc < 3))
       {
           printf("Usage: %s <get|set> <pin#> <set_value (0|1|2)>\n", argv[0]);
           return 1;
       }
       
       // We only want to get val if there are more than 3 command line arguments
       if (argc == 3)
          pin = strtoul(argv[2], NULL, 0);
       else
       {
          pin = strtoul(argv[2], NULL, 0);
          val = strtoul(argv[3], NULL, 0);
       }
       
       // If anything other than pins 5 through 40, fail program
       assert(pin <= 40 && pin >= 5);

       // Parse through the command line arguments, check for valid inputs, and exec
       if (!(strcmp(argv[1], "get")) && (argc == 3))
       {
          sbuslock();
          returnedValue = getdiopin(pin);
          sbusunlock();
          
          printf("pin#%d = %d \n", pin, returnedValue);
       }
       else if(!(strcmp(argv[1], "set")) && (argc == 4) && (val <= 2))
       {
          sbuslock();
          setdiopin(pin, val);
          sbusunlock();
          
          printf("pin#%d set to %d\n", pin, val);
       }   
       else
       {
          printf("Usage: %s <get|set> <pin#> <set_value (0|1|2)>\n", argv[0]);
          return 1;
       }
       return 0;
    }

Custom FPGA Programming by Customer

Technologic Systems has made available a zipped up a Lattice ispLever 7.2 project which allows customers to generate custom TS75xx FPGA projects. It can be found here:

ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7500-linux/sources/ts75xx_opencores_source.tar.gz

Once downloaded, open up the project in ispLever (free download from Lattice) and double-click "Generate Data File (JEDEC)"

A few minutes later, a ts7500_opencore.jed will be produced that can be copied over to the SBC and loaded into the FPGA SRAM via the command "ts7500ctl --loadfpga ts7500_opencore.jed". FPGA reloading takes approx 2.8 seconds.

Some notable points about the FPGA opencore:

  • The opencore FPGA bitstream has all functionality of the default bitstream including SD, XUARTs, SPI NOR flash, watchdog, etc..
  • SD and XUART cores are Lattice .ngo (binary netlists), but Verilog sources to everything else is included.
  • You need the newest ts7500ctl just released that has the "--loadfpga" option at ftp://ftp.embeddedARM.com/ts-arm-sbc/ts-7500-linux/binaries/ts-utils/
  • You also need jed2vme executable in your path (same FTP location as above) to use ts7500ctl --loadfpga on a .jec file.
  • jed2vme can be used to turn the 1.2Mbyte JEDEC .jed file into a 190Kbyte .vme file. This .vme file can also be gzip'ed or bzip2'ed into (~90Kbyte) .vme.bz2 or .vme.gz and "ts7500ctl --loadfpga" will decompress automatically.
  • Licensing will be BSD (not GPL) to allow for proprietary closed-source modifications. However, there will be a caveat that you can only use the sources on our own TS hardware. Basically, as long as you do it on our boards, you can do whatever you want with it.
  • The intention is to make the default initrd "linuxrc" attempt to automatically load a bitstream at "/ts7500.vme.gz" if it exists since it is best to reload the FPGA as early as possible before userspace driver daemons are all started.

Also, Technologic Systems has released the source code to all the userspace *ctl utilities they have written at ftp://ftp.embeddedARM.com/ts-arm-sbc/ts-7500-linux/sources/.

Detailed Instructions for Loading Custom FPGA

Outlined below are two approaches to loading a custom or updated FPGA bitstream to the TS-7500. Keep in mind that the FPGA contains flash memory which contains Technologic System's default FPGA SRAM load. The "ts7500ctl --loadfpga" will not overwrite the flash memory of the FPGA and will only load the SRAM contents of the FPGA, making for an unbrickable system if something should go wrong. If something does go wrong, you can restore the onboard flash via the offboard flash or microSD card (see Copying Changes to SPI Flash).

You'll need a standard bootable MicroSD card and the TS-752 board with JP1 set to ON and JP2 set to OFF so that the board will boot using the MicroSD card and not the on or off-board flash.

You may use the provided binary bitstreams that have already been compiled using the steps outlined in the above section located here:

ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7500-linux/binaries/ts-bitstreams/ts75xx_opencores.tar.gz

NOTE:

For customers interested in TS-7500 CAN Bus, there has been a bitstream binary created especially for this and is included in the above tar.gz file as ts7500_opencore_can.vme.gz.

The goal is to download the "bitstream.vme.gz" file to the fourth partition and modify the "linuxrc" file to call the "ts7500ctl --loadfpga" command upon boot. You will need the updated ts7500ctl (with --loadfpga option) utility compiled with uclibc located on the FTP site here: ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7500-linux/binaries/ts-utils/ts7500ctl.uclibc. Copy this utility to partition 4 of the MicroSD card, boot to SPI Flash (JP1 and JP2 = OFF), and copy from MicroSD card to SPI Flash using "cp /mnt/root/ts7500ctl.uclibc /sbin/ts7500ctl". Save the changes using the "save" command.

Bitstream Update via MicroSD Card:

 01.) Remove the MicroSD card from the TS-7500 and insert it into the SD Card 
        adapter and then into the USB SD Card reader.
 02.) Open a terminal window in your Linux PC and use the following commands to
        mount partition 4 of the SD card to /mnt/part4:
      * mkdir /mnt/part4 && mount /dev/sdb4 /mnt/part4
         - You'll need to verify the location of the device node using 'fdisk -l'
 03.) Copy the "bitstream.vme.gz" file
      * cp /the/path/to/bitstream.vme.gz /mnt/part4
 04.) Sync the changes and unmount the SD card from the Linux PC
      * sync; umount /dev/sdb4
 05.) Insert the MicroSD card back into the TS-7500, set the jumpers of the
        TS-752 to JP1=OFF and JP2=OFF, causing the system to boot from onboard
        SPI Flash.  Apply power to boot the board.
 06.) Copy the bitstream.vme.gz file from the fourth partition of the MicroSD
        card to the initrd of onboard SPI Flash
      * cp /mnt/root/bitstream.vme.gz .
 07.) Edit "linuxrc" and add the "ts7500ctl --loadfpga=bitstream.vme.gz -d" 
        command (use snippit below for reference).  BE SURE YOU HAVE THE LATEST
        'ts7500ctl' AS MENTIONED IN THE ABOVE SECTION!
      * vi linuxrc
 08.) Save the changes you've made to the linuxrc file and exit (in vi, the 
        command is :wq), then save all changes to SPI Flash
      * save
 09.) Reboot the TS-7500.  You will notice a three second delay while the 
        bitstream is loaded.  Use the following to verify the FPGA revision 
        number:
      * ts7500ctl --info

Bitstream Update via FTP:

 01.) Boot the TS-7500 to the Debian environment.  Here, you will be able to use 
        FTP to transfer the "bitstream.vme.gz" file from your PC to the TS-7500.
        Make sure you have a working network connection and you can ping both
        the TS-7500 and the PC you're working on.  You may need to change the IP
        address of the TS-7500
      * ifconfig eth0 192.168.1.100  #[you'll need to tailor to your network]
 02.) Use an FTP client such as FileZilla or the built-in 'ftp' command in Linux
        to connect to the TS-7500 using the username "eclipse" and the password 
        "eclipse"
 03.) Transfer the file to the default home directory (which is /home/eclipse/ 
        on the TS-7500) and then sync the changes
      * sync
 04.) Place the JP1 and JP2 jumpers of the TS-752 to the "OFF" position so the 
        board will boot to onboard SPI Flash upon restart and then restart the
        board
      * shutdown -r now
 05.) Copy the bitstream.vme.gz file from the fourth partition of the MicroSD
        card to the initrd of onboard SPI Flash
      * cp /mnt/root/bitstream.vme.gz .
 06.) Edit "linuxrc" and add the "ts7500ctl --loadfpga=bitstream.vme.gz -d" 
        command (use snippit below for reference) BE SURE YOU HAVE THE LATEST
        'ts7500ctl' AS MENTIONED IN THE ABOVE SECTION!
      * vi linuxrc
 07.) Save the changes you've made to the linuxrc file and exit (in vi, the 
        command is :wq), then save all changes to SPI Flash
      * save
 08.) Reboot the TS-7500.  You will notice a three second delay while the 
        bitstream is loaded.  Use the following to verify the FPGA revision 
        number:
      * ts7500ctl --info      
      
      
 
   -----------------------------------------------------------------------------     
   linuxrc snippit:
   -----------------------------------------------------------------------------     
   #!/bin/sh

   export CONSOLE=/dev/ttyS0
   export
   PATH=/bin:/sbin:/usr/bin:/usr/sbin:/mnt/root/bin:/mnt/root/sbin:/mnt/root

   let x=`devmem 0x79000040`
   sec=$((x / 100000))
   tenths=$((x % 100000 / 1000))
   export BOOTTIME=`printf "%d.%02d" $sec $tenths`

   setconsole $CONSOLE
   stty -F $CONSOLE ospeed 115200 > /dev/null 2>&1
   mount -t proc proc /proc
   mount -t sysfs sysfs /sys
   hostname ts7500
   ts7500ctl --getrtc --resetswitchon --autofeed 2 -d
   ts7500ctl --loadfpga bitstream.vme.gz
   
   devmem 0xc8000004 32 0x106
   devmem 0xcc000060 32 0x1
   let x=`devmem 0xcc000068`
   let y=`devmem 0xcc000064`
   x=$(((x | y) & 0x1))
   -----------------------------------------------------------------------------     

USB to Serial Devices

Additional serial ports can be added to the TS-7500 by using USB to Serial cables through the USB Ports of the TS-7500 (and even more if a USB hub is used). The instructions for how to use this are outline below. Within these steps, You will need to download the "ftdi_sio.ko" module from our FTP site using wget which will require a working network connection on the TS-7500 (see Static/Dynamic IP Address section above if you need help). If you don't have a working network connection, then simply download it manually from ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7500-linux/binaries/ts-modules/ftdi_sio.ko and then copy it to the TS-7500.

   01.) Set the jumpers of the TS-752 to boot from MicroSD card, power on the 
          TS-7500, and 'exit' to Debian.
   02.) Download the ftdi_sio.ko module from the FTP site           
        * wget ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7500-linux/binaries/ts-modules/ftdi_sio.ko
   03.) Insert the necessary modules
        * insmod /lib/modules/2.6.24.4/kernel/drivers/usb/host/ohci-hcd.ko
        * insmod /lib/modules/2.6.24.4/kernel/drivers/usb/serial/usbserial.ko
        * insmod ftdi_sio.ko
   04.) The kernel should then detect the FTDI device and add device node at
          /dev/ttyUSB0.

If you have problems inserting the modules and get an error such as "-1 Invalid module format", try updating the microSD Card image to the latest which at the time of this writing is 2gbsd-eclipse-dec152009.dd.bz2.

Load Scripts/Programs Automatically on Bootup

Scripts and/or programs can be run automatically as part of the Linux bootup process by adding it to the /etc/rc2.d runtime folder. For example, if you wanted to immediately print out the IP address on boot, you would follow these simple steps:

   01.) echo "ifconfig eth0 192.168.1.100" > /etc/init.d/changeip
   02.) chmod +x /etc/init.d/changeip
   03.) ln -sf /etc/init.d/changeip /etc/rc2.d/S01changeip
           * Note: you may need to check your default runlevel with the
             'runlevel' command.  The TS-7500 should be defaulted to 2.

If you find that your process is being killed, try preceding it with the 'nohup' command, followed by a 'sleep 1' command. For example:

#!/bin/sh

echo -n "Initializing my program..."
nohup myprogram --daemonize &
sleep 1
echo "done"

USB Device Port Usage

Certain Technologic System Single Board Computers (SBC) contain both USB Host and USB Device ports. This section will discuss the configuration and use of the Linux USB device gadgets (http://www.linux-usb.org/). The two supported gadgets are 1) USB Mass Storage Device and 2) IP over USB (A.K.A. USB Ethernet).

The USB Mass Storage Device Linux USB gadget will allow you to use your SBC as a storage device, like a USB thumb drive, when connected to a host PC. Subsequently, the SBC can access the saved data through the storage element named usb_storage_file.

The IP over USB (A.K.A. USB Ethernet) Linux USB gadget will allow you to connect to your SBC with a USB cable from a PC like you would with a CAT5 Ethernet cable. You will have access to the SBC via the TCP/IP connection allowing you to use any networking utility (e.g. ping, ssh, ftp, http, etc).

All software modules required for Linux are contained on recent SBCs (those released with the May 18, 2010 or later software load). For Windows, a driver interface configuration file (linux.inf) will need to be downloaded and installed on the host PC. This procedure is described in detail below. The linux.inf file can be downloaded here: ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7500-linux/USB_gadget/linux.inf

Utilizing SBC as "USB Mass Storage Device"

The SBC must be setup prior to connection to a host PC. These steps are outline below.

   1.) Create a mount point and then mount the first partition of SD card where
       the storage element exists.
      * mkdir /mnt/vfat; mount /dev/nbd1 /mnt/vfat

   2.) Install the g_file_storage driver with storage element details
      * modprobe g_file_storage file=/mnt/vfat/usb_storage_file

After following these steps for preparing the SBC storage element, plug the SBC into the host PC with a A to B USB Cable (ISB Cable). You will see the newly mounted volume and should be able to access it.

When you have completed using the device on the Linux or Windows System, you will need to eject volume using either umount on Linux, or "Safely Remove Hardware" on Windows and then unplug the USB cable.

After transferring data from a host PC to the SBC through the USB Mass Storage Device Linux gadget, you can access the data on the SBC by using the following steps.

   1.) Remove the g_file_storage driver allowing local access to storage element
      * rmmod g_file_storage

   2.) Create a mount point and then mount the storage element (assuming
       "/dev/nbd1" is still mounted to "/mnt/vfat" from steps above)
      * mkdir /mnt/usbdev
      * mount -t vfat -o loop=/dev/loop0,offset=4096 /mnt/vfat/usb_storage_file /mnt/usbdev/
NOTE:

The kernel should already have support for loop block devices. If not, you will need to insert the loop.ko module with modprobe or insmod.

You can now locally access /mnt/usbdev.

When finished with the device, or to allow access via the USB Device port, you must un-mount the device using:

   umount /mnt/usbdev

Utilizing IP over USB (USB Ethernet) on SBC

The SBC must be setup prior to connection to a host PC. These steps are outline below.

   1.) Install the g_ether driver
      * modprobe g_ether

   2.) Assign an IP address to the new usb0 interface
      * ifconfig usb0 192.168.42.20
NOTE:

The IP address in the above example may be any valid IP address, but should typically not be on the same subnet as the Ethernet network on the SBC (if connected), or the host computer to which the SBC will be connected.

Connecting Linux Host to SBC via IP over USB

Most modern Linux distributions already have all of the required modules (such as usbnet.ko) and utilities installed, so the setup steps are minimal. Simply plug in the SBC after it has been prepared for IP over USB (see above) and observe that a new interface has been added named usb0 or similar (use dmesg | tail to verify). You can now assign an IP address to that interface with ifconfig (e.g. ifconfig usb0 192.168.42.21) and begin using the TCP/IP connection. To test your connection, use ping 192.168.42.20. You should also be able to login to the SBC using ssh ie. ssh root@192.168.42.40.

NOTE:

The IP address above may be any valid IP address, but must be in the same subnet as the IP address assigned to the SBC IP over USB connection above.

Connecting Windows XP Host to SBC via IP over USB

An additional driver interface configuration file called linux.inf is required for IP over USB connection to a Windows host. First, download this file onto the Windows PC and remember where you placed it. The linux.inf file can be downloaded here: ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7500-linux/USB_gadget/linux.inf Next, connect the SBC and Windows PC with the A to B USB cable (ISB Cable). You should see the "Found New Hardware Wizard". Answer the prompts as follows:

  1. Select Include this location in the search and choose the location of the driver you downloaded. Finish running the wizard.
  2. Go to the Control Panel and open "Network Connections". Right-click the new connection (labeled "Linux USB Ethernet/RNDIS Gadget") and click "Rename". Rename it to something useful such as "USB Network".
  3. Right-click on the newly labeled icon, and select properties.
  4. Under the properties General tab, select the item labeled Internet Protocol (TCP/IP)
  5. Select Use the following IP Address, and enter 192.168.42.21.
  6. Click OK; Click OK

You may now access the SBC via the TCP/IP connection. Use ping in the Command Prompt window to verify connectivity (e.g. ping 192.168.42.20).

NOTE:

Note that the IP address above may be any valid IP address, but must be in the same subnet as the IP address assigned to the SBC IP over USB connection above.

Connecting Windows Vista Host to SBC via IP over USB

Not yet supported, but currently in progress.

Connecting Windows 7 Host to SBC via IP over USB

Not yet supported, but currently in progress.

Appendix A: Document History

Date of Issue/Revision Revision Number Comments
08/26/2009 1.0 Created as "TS-7500 Software Guide"
11/04/2009 1.1 Added section "Setup Dynamic/Static IP Address" and "Document History"
11/18/2009 1.2 Added section "Detailed Instructions for Loading Custom FPGA"
12/09/2009 1.3 Corrected sample code syntax which was being lost in HTML translation.
12/11/2009 1.4 Added section "Simple Demonstration Utilizing an XUART"
12/14/2009 1.5 Modified "Detailed Instructions for Loading Custom FPGA" step so that it now safe.
12/16/2009 1.6 Corrected image sizes of kernel image and initrd image for spiflashctl (from "-W 32 -z 65536" to "-W 4095 -z 512").
Added a few comments in the "Detailed Instructions for Loading Custom FGPA" section about unbrickable design.
Added section "USB to Serial Devices"
Added section "Load Scripts/Programs Automatically on Bootup"
02/04/2010 1.7 Corrected /etc/resolv.conf reference (/etc/resolv --> /etc/resolv.conf)
02/17/2010 1.8 Added section "Simple Cross Compiling Example (C++/Debian)"
Changed all links from ftp://oz.embeddedarm.com to ftp://ftp.embeddedarm.com
02/24/2010 1.9 Added a description and link to already compiled opencore bitstreams
Change insmod to modprobe in USB to Serial section
03/04/2010 2.0 Fixed USB to Serial section and verified correctness with dec152009 microSD card image
04/08/2010 2.1 Updated opencore bitstream URLs and created note for TS-7500 CAN Bus
05/14/2010 2.2 Added explanation for properly installing and loading newly compiled kernel modules
05/19/2010 2.3 Added "USB Device Usage" section (requires may172010 or greater software)
06/17/2010 2.4 Moved the --loadfpga option to it's own line so if FPGA load fails, ts7500ctl will continue to live and feed watchdog
07/08/2010 2.5 Added a link to linux.inf for USB gadget