TS-7350

From embeddedTS Manuals
Revision as of 10:13, 3 February 2012 by Mark (talk | contribs)
TS-7350
TS-7350.jpg
Product Page
Documentation
Schematic
Mechanical Drawing
FTP Path
Cirrus Logic EP9302
CPU User Guide
Specifications
Weight 90g (approx)
Operating Temperature
Cold -40C
Hot 70C (166 MHz)

Overview

The TS-7350 is a compact full-featured Single Board Computer (SBC) based upon the Cirrus EP9302 200MHz ARM9 CPU, which provides a standard set of on-board peripherals. It features a programmable FPGA which is connected to a dedicated framebuffer and provides additional on-board peripherals.

Getting Started

A Linux PC is recommended for development. For developers who use Windows, virtualized Linux using VMWare or similar are recommended in order to make the full power of Linux available. The developer will need to be comfortable with Linux anyway in order to work with embedded Linux on the target platform. The main reasons that Linux is useful are:

  • Linux filesystems on the microSD card can be accessed on the PC.
  • More ARM cross-compilers are available.
  • If recovery is needed, a bootable medium can be written.
  • A network filesystem can be served.
  • Builds such as Linux kernel, buildroot, yocto, distro-seed will not work from WSL1/2 on a case insensitive filesystem.
WARNING: Be sure to take appropriate Electrostatic Discharge (ESD) precautions. Disconnect the power source before moving, cabling, or performing any set up procedures. Inappropriate handling may cause damage to the board.

The TS-7350 receives 5V-28V through the two power poles, or 5V through the PC104 bus.

Note: Pay attention to the polarity of the power connector as printed on the board.

Get a Console

Connect the TS-9445 to the 24 pin header facing outwards and use the 10 pin header (labeled "Console"). You can also telnet to the board with the default network configuration, though this will omit the TS-BOOTROM messages which are extremely useful for debugging.

Use a null modem cable to connect the ARM system to your workstation. If you do not have a COM port on your system (as many newer systems do not), you can find a USB serial adapter that will bring out RS232.

Console from Linux

There are many serial clients for Linux, but 3 simple ones would be picocom, screen, and minicom. These examples assume that your COM device is /dev/ttyUSB0 (common for USB adapters), but replace them with the COM device on your workstation.

Linux has a few applications capable of connecting to the board over serial. You can use any of these clients that may be installed or available in your workstation's package manager:

Picocom is a very small and simple client.

picocom -b 115200 /dev/ttyUSB0

Screen is a terminal multiplexer which happens to have serial support.

screen /dev/ttyUSB0 115200

Or a very commonly used client is minicom which is quite powerful:

minicom -s
  • Navigate to 'serial port setup'
  • Type "a" and change location of serial device to '/dev/ttyUSB0' then hit "enter"
  • 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
  • Navigate to 'Save setup as dfl', hit "enter", and then "esc"

Console from Windows

Putty is a small simple client available for download here. Open up Device Manager to determine your console port. See the putty configuration image for more details.

Device Manager Putty Configuration

Initrd / Busybox

When the board first boots you will see this shell:

 >> TS-BOOTROM - built Jan  7 2009
 >> Copyright (c) 2008-2009, Technologic Systems
 >> Booting from SD card...
 .
 .
 .
 / # 

This is a busybox shell which presents you with a very minimalistic system. This filesystem is loaded into memory, so none of the changes will be saved unless you type 'save', or mount a filesystem as read write. This can also provide a simple mechanism for running your application in an entirely read only environment. The linuxrc script will be the first thing executed as soon as the kernel is loaded.

While busybox itself doesn't contain much functionality, it does mount the Debian partition under /mnt/root/. It will also add common paths and load libraries from the Debian system. Many of the Debian applications will work by default. If an application relies on certain paths being in certain places, or running services, you should instead boot to Debian to run them.

This shell when started on the COM port is what is blocking a Debian boot. If you close it by typing 'exit', the boot process will continue. If you are connected through telnet, this will instead open up its own instance of the shell so typing 'exit' will only end that session. Through any connection method you can relink the linuxrc script to always boot into Debian.

The initrd has these boot scripts available:

Script Function
linuxrc-fastboot (default) Boots immediately to a shell in ramdisk. This will mount whichever boot medium you have selected to /mnt/root/. When you type 'exit', it will boot to that medium.
linuxrc-fastgui This is used by the TS-7390/TS-7395 which starts X11
linuxrc-mtdroot This mounts the onboard flash (not present on the TS-7350)
linuxrc-sdroot Boots immediately to the Debian stored on SD.
linuxrc-nfsroot This script needs to be modified before use, but shows an example of how to use NFS as your debian filesystem.

For example, to set the linuxrc to boot immediately to Debian on SD or NAND, you would run this:

rm linuxrc; ln -s /linuxrc-sdroot /linuxrc; save

To use any of the other boot scripts, you can simply replace 'linuxrc-sdroot' with the script name mentioned above.

The compiled instance of busybox includes several internal commands listed below:

 BusyBox v1.7.1 (2008-08-01 11:47:44 MST) multi-call binary
 Copyright (C) 1998-2006  Erik Andersen, Rob Landley, and others.
 Licensed under GPLv2.  See source distribution for full notice.
 
 Usage: busybox [function] [arguments]...
    or: [function] [arguments]...
 
 	BusyBox is a multi-call binary that combines many common Unix
 	utilities into a single executable.  Most people will create a
 	link to busybox for each function they wish to use and BusyBox
 	will act like whatever it was invoked as!
 
 Currently defined functions:
 	[, [[, ash, basename, cal, cat, catv, chgrp, chmod, chown,
 	chroot, cksum, clear, comm, cp, cttyhack, cut, date, dd,
 	df, dirname, dmesg, du, echo, egrep, env, eptime, expr,
 	false, fdisk, fgrep, find, free, ftpget, ftpput, getopt,
 	getty, grep, gunzip, halt, head, hexdump, hostname, ifconfig,
 	insmod, kill, killall, ln, ls, lsmod, md5sum, mdev, mkdir,
 	mkfifo, mknod, modprobe, more, mount, mtdcp, mv, mvtime,
 	netstat, nice, nohup, nslookup, peekpoke, ping, ping6,
 	pivot_root, playsound, poweroff, printenv, printf, ps,
 	pscan, pwd, reboot, rm, rmdir, rmmod, route, rx, sed,
 	setconsole, setlogcons, sh, sha1sum, sleep, split, stat,
 	stty, sum, sync, tail, tar, tee, telnetd, test, tftp,
 	time, top, tr, traceroute, true, tty, udhcpc, umount,
 	uname, unzip, uptime, usleep, uudecode, uuencode, vi,
 	wget, which, xargs, zcat


We also provide the ts7000.subr which provides the following functions:

 bit_set
 bit_clr
 bit_get
 dio_dir_get
 dio_dir_set
 dio_data_get
 dio_data_set
 usb_init
 usb_off
 usb_numports
 usb_port_devexists
 eth_off
 eth_on
 led0
 led1
 cpu_speed_max
 cpu_speed_166
 cpu_speed_42
 cpu_speed_min
 pc104on
 pc104off
 nand_on
 nand_off
 lcd_on
 lcd_off
 speaker_on
 speaker_off
 wdt_on_338ms
 wdt_on_2706ms
 wdt_on_10824ms
 wdt_on
 wdt_off
 is_ts7390 
 tshelp
 sdmount
 mtdmount
 help

Boot Process

The TS-BOOTROM consists of two parts, the code in the FPGA which does low level initialization of the CPU and MMU. It reads the first 512 bytes of the SD card, and jumps execution to the binary there. The code in the MBR looks at the partition table for the first partition of type 0xda, and loads this to memory 0x8000. The second partition of type 0xda is loaded into memory at 0x1000000. This also sets up the ATAGS which are used by the kernel to identify the hardware, and so it knows where to load the initrd. After that it jumps into execution at 0x8000 to the kernel. The kernel will recognize the ATAGS (which are in a standard location for ARM at 0x100) and it will see the initrd as /dev/ram0. If you look at the default kernel config we define the cmdline as: "root=/dev/ram0 rw init=/linuxrc lpj=498688 console=null". This is so that it executes the 'linuxrc' script as soon as it mounts the initrd.

The debian filesystem is bootstrapped at the end of our own init process from the initrd:

cd /mnt/root
pivot_root . ./initrd
./bin/mount -n --move ./initrd/sys ./sys
./bin/mount -n --move ./initrd/proc ./proc
exec ./usr/sbin/chroot . ./sbin/init < .$CONSOLE > .$CONSOLE 2>&1