From Technologic Systems Manuals
Jump to: navigation, search
TS-TPC-8390-4900
TS-TPC-8390.jpg
Product Page
Product Images
Specifications
TS-8390 Documents
Schematic
PCB Mechanical Drawing
Bezel Mechanical Drawing
TS-4900 Documents
Schematic
Mechanical Drawing
Processor
NXP i.MX6 Quad core, or Solo
1GHz Commercial, 800MHz Industrial
ARMv7 Cortex-A9
i.MX6 Quad Product Page
i.MX6 Solo Product Page
IMX6Q Reference Manual
IMX6S Reference Manual
LCD Datasheet

Contents

1 Overview

The TS-4900 is a TS-Socket Macrocontroller Computer on Module designed for high performance applications.

2 Getting Started

A Linux PC is recommended for development, and will be assumed for this documentation. For users in Windows or OSX we recommend virtualizing a Linux PC. Most of our platforms run Debian and if there is no personal distribution preference this is what we recommend for ease of use.

Virtualization

Suggested Linux Distributions

It may be possible to develop using a Windows or OSX system, but this is not supported. Development will include accessing drives formatted for Linux and often Linux based tools.

2.1 Booting up the board

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.

If you are using one of our off the shelf baseboards you will need to refer to that baseboard's manual here. Different baseboards use different power connectors, voltage ranges, and may have different power requirements.

The macrocontroller only requires a 5V rail from the baseboard which may be regulated from other voltage ranges. Refer to the #TS-Socket Connector section for the POWER pins. The TS-4900 draws from 0.85W to 6W depending on how idle the processor is, and if you are using a solo, dual, or quad core. A typical power supply for just the macrocontroller will allow around 1.5A@5V, but a larger power supply may be needed depending on your peripherals.

Once you have applied power to your baseboard you should look for console output. The next section of the manual provides information on getting the console connected. The first output is from U-Boot:

U-Boot 2013.10-00049-g311750c (Jul 10 2014 - 10:37:04)

CPU:   Freescale i.MX6Q rev1.2 at 792 MHz
Reset cause: POR
Board: TS-4900
DRAM:  2 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
SF: Detected N25Q64 with page size 256 Bytes, erase size 4 KiB, total 8 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   using phy at 7
FEC [PRIME]
Hit any key to stop autoboot:  0 

The default U-Boot will check for USB updates, and then will check the "SD Boot" jumper. If the SD boot jumper is set, it will boot to the Linux on the SD card. If it is not set, it will boot to the eMMC.

Note: The "*** Warning - bad CRC, using default environment" can be safely ignored. If you "env save" this will use your environment on the disk, but on new boards the SPI flash is erased so it just doesn't have a modifed env saved.

2.2 Get a Console

The console UART (ttymxc0) is a RS232 UART at 115200 baud, 8n1 (8 data bits 1 stop bit), and no flow control. This UART is brought out to the COM1 header when the "Console Enable" jumper is on. It is also always available on the 40 pin header at TTL levels.


Console from Linux

There are many serial terminal applications for Linux, but 3 common implementations 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

3 U-Boot

The TS-4900 includes u-boot as the bootloader to launch the full operating system. When the i.MX6 processor starts it loads u-boot from the onboard 8MB SPI flash. This allows you to include your boot image on either the SD, eMMC, SATA, NFS, or USB. U-boot is a general purpose bootloader that is capable of booting into common Linux distributions, Android, QNX, or others.

On a normal boot you should see something similar to this:

U-Boot 2013.10-00034-ga8a4e60 (May 02 2014 - 12:19:18)

CPU:   Freescale i.MX6Q rev1.2 at 792 MHz
Reset cause: POR
Board: TS-4900
DRAM:  2 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
SF: Detected N25Q64 with page size 256 Bytes, erase size 4 KiB, total 8 MiB
In:    serial
Out:   serial
Err:   serial
Net:   using phy at 7
FEC [PRIME]
Hit any key to stop autoboot:  5

By default the board will boot to SD or eMMC depending on the status of CN1_98/MODE2 on startup. On our off the shelf baseboards this pin is brought out as the "SD Boot" jumper. This can be customized further in u-boot as described below.

3.1 U-Boot Environment

The eMMC flash contains both the U-Boot executable binary and U-Boot environment. Our default build has 2 MiB of environment space which can be used for variables and boot scripts. The following commands are examples of how to manipulate the U-Boot environment:

# Print all environment variables
env print -a
 
# Sets the variable bootdelay to 5 seconds
env set bootdelay 5;
 
# Variables can also contain commands
env set hellocmd 'led red on; echo Hello world; led green on;'
 
# Execute commands saved in a variable
env run hellocmd;
 
# Commit environment changes to the SPI flash
# Otherwise changes are lost
env save
 
# Restore environment to default
env default -a
 
# Remove a variable
env delete emmcboot

3.2 U-Boot Commands

# The most important command is 
help
# This can also be used to see more information on a specific command
help i2c
 
# This is a command added to U-Boot by TS to read the baseboard ID on our 
# Computer on Module devices
bbdetect
echo ${baseboard} ${baseboardid} 
# The echo will return something similar to:
# TS-8390 2
 
# Boots into the binary at $loadaddr.  The loaded file needs to have
# the U-Boot header from mkimage.  A uImage already contains this.
bootm
# Boots into the binary at $loadaddr, skips the initrd, specifies
# the FDT addrress so Linux knows where to find the device tree
bootm ${loadaddr} - ${fdtaddr}
 
# Boot a Linux zImage loaded at $loadaddr
bootz
# Boot in to a Linux zImage at $loadaddr, skip initrd, specifies
# the FDT address to Linux knows where to find the device tree
bootz ${loadaddr} - ${fdtaddr}
 
# Get a DHCP address
dhcp
# This sets ${ipaddr}, ${dnsip}, ${gatewayip}, ${netmask}
# and ${ip_dyn} which can be used to check if the dhcp was successful
 
# These commands are used for scripting:
false # do nothing, unsuccessfully
true # do nothing, successfully
 
# This command can set fuses in the processor
# Setting fuses can brick the unit, will void the warranty,
# and should not be done in most cases
fuse
 
# GPIO can be manipulated from U-Boot.  Keep in mind that the IOMUX 
# in U-Boot is only setup enough to boot the device, so not all pins will
# be set to GPIO mode out of the box.  Boot to the full operating system
# for more GPIO support.
# GPIO are specified in bank and IO in this manual.  U-Boot uses a flat numberspace,
# so for bank 2 DIO 25, this would be number (32*2)+25=89
# Note that on some products, bank 1 is the first bank
# Set 2_25 low
gpio clear 83
# Set 2_25 high
gpio set 83
# Read 2_25
gpio input 83
 
# Control LEDs
led red on
led green on
led all off
led red toggle
 
# This command is used to copy a file from most devices
# Load kernel from SD
load mmc 0:1 ${loadaddr} /boot/uImage
# Load Kernel from eMMC
load mmc 1:1 ${loadaddr} /boot/uImage
# Load kernel from USB
usb start
load usb 0:1 ${loadaddr} /boot/uImage
# Load kernel from SATA
sata init
load sata 0:1 ${loadaddr} /boot/uImage
 
# View the FDT from U-Boot
load mmc 0:1 ${fdtaddr} /boot/imx6q-ts4900.dtb
fdt addr ${fdtaddr}
fdt print
 
# It is possible to blindly jump to any memory location
# This is similar to bootm, but it does not require
# the use of the U-Boot header
load mmc 0:1 ${loadaddr} /boot/custombinary
go ${loadaddr}
 
# Browse fat, ext2, ext3, or ext4 filesystems:
ls mmc 0:1 /
 
# Access memory like devmem in Linux, read/write arbitrary memory
# using mw and md
# write
mw 0x10000000 0xc0ffee00 1
# read
md 0x10000000 1
 
# Test memory.
mtest
 
# Check for new SD card
mmc rescan
# Read SD card size
mmc dev 0
mmcinfo
# Read eMMC Size
mmc dev 1
mmcinfo
 
# The NFS command is like 'load', but used over the network
dhcp
env set serverip 192.168.0.11
nfs ${loadaddr} 192.168.0.11:/path/to/somefile
 
# Test ICMP
dhcp
ping 192.168.0.11
 
# Reboot
reset
 
# SPI access is through the SF command
# Be careful with sf commands since
# this is where U-Boot and the FPGA bitstream exist
# Improper use can render the board unbootable
sf probe
 
# Delay in seconds
sleep 10
 
# Load HUSH scripts that have been created with mkimage
load mmc 0:1 ${loadaddr} /boot/ubootscript
source ${loadaddr}
 
# Most commands have return values that can be used to test
# success, and HUSH scripting supports comparisons like
# test in Bash, but much more minimal
if load mmc 1:1 ${fdtaddr} /boot/uImage;
	then echo Loaded Kernel
else
	echo Could not find kernel
fi
 
# Commands can be timed with "time"
time sf probe
 
# Print U-Boot version/build information
version

3.3 Modify Linux Kernel cmdline

The Linux kernel cmdline can be customized by modifying the cmdline_append variable. The variable contents are clobbered when set, so be sure to specify the full desired cmdline string.

env set cmdline_append console=ttymxc0,115200 init=/sbin/init quiet
env save

The kernel command line can also be modified from from the on-board Linux. Debian (and other distributions) provide a U-Boot utilities package that contains the tools necessary to create a U-Boot script:

apt-get update && apt-get install u-boot-tools -y
echo "env set cmdline_append console=ttymxc0,115200 init=/sbin/init quiet" > /boot/boot.scr
mkimage -A arm -T script -C none -n 'tsimx6 boot script' -d /boot/boot.scr /boot/boot.ub

The boot.scr includes the plain text commands to be run in U-Boot on startup. The mkimage tool adds a checksum and header to this file which can be loaded by U-Boot. The .ub file should not be edited directly.

3.4 Linux NFS Boot

U-Boot's NFS support can be used to load a kernel, device tree binary, and root filesystem. The default scripts include an example NFS boot script.

# Set this to your NFS server ip
env set serverip 192.168.0.11;
 
# Set this to your NFS root path.  The server root should be accessible at this path.
env set nfsroot /path/to/nfs/rootfs/
env save

To boot your NFS root:

# Boot to NFS once
run nfsboot;
 
# To make the NFS boot the persistent default
env set bootcmd run nfsboot;
env save

3.5 Linux USB Boot

Our U-Boot by default will attempt to read a U-Boot script from a USB drive on startup. It copies /tsinit.ub into memory and jumps in to the script. To make a bootable drive, create a single ext3 partition on a USB drive and copy over your preferred rootfs just like you would with an SD card. This is described in the Debian and Yocto sections.

The one addition is to create the tsinit.ub file in the root of the USB drive.

Create the file tsinit.scr in the root of the USB drive with the Linux filesystem:

# Prepare with:
# mkimage -A arm -T script -C none -n 'mx6 usb' -d tsinit.scr tsinit.ub
 
# DO NOT MANUALLY EDIT THE .UB FILE
 
if test ${model} = '4900'; 
	then load usb 0:1 ${loadaddr} /boot/ts4900-fpga.bin;
	ice40 ${loadaddr} ${filesize};
 
	bbdetect;
	if load usb 0:1 ${fdtaddr} /boot/imx6${cpu}-ts4900-${baseboardid}.dtb;
		then echo $baseboardid detected;
	else 
		echo Booting default device tree;
		load usb 0:1 ${fdtaddr} /boot/imx6${cpu}-ts4900.dtb;
	fi;
	load usb 0:1 ${loadaddr} ${uimage};
	setenv bootargs root=/dev/sda1 rootwait rw ${cmdline_append};
	bootm ${loadaddr} - ${fdtaddr};
fi
 
load usb 0:1 ${loadaddr} ${uimage};
load usb 0:1 ${fdtaddr} /boot/imx6${cpu}-ts${model}.dtb;
setenv bootargs root=/dev/sda1 rootwait rw ${cmdline_append};
bootm ${loadaddr} - ${fdtaddr};

Then in the same directory generate the tsinit.ub file:

mkimage -A arm -T script -C none -n 'mx6 usb' -d tsinit.scr tsinit.ub

You may need to install u-boot-tools or the equivalent package for your distribution.

3.6 Update U-Boot

WARNING: Installing your own u-boot is not recommended and may cause the board to fail to boot.

U-boot requires a different build for Quad/Dual and Solo/Duallite. Flashing the wrong u-boot will cause the board to fail to properly boot. Recovery in this case would require a TS-8550, or submitting an RMA.

On your current u-boot, type "env print imx_type" and this will return the u-boot build you should use. Copy the u-boot.imx to the SD card, and run:

mmc dev 0
load mmc 0:1 ${loadaddr} /u-boot.imx
sf probe
sf erase 0 0x80000
sf write ${loadaddr} 0x400 $filesize

3.7 U-boot Recovery

We have several variations of the TS-4900's u-boot which include different RAM configurations for the Quad core, solo commercial, solo industrial, and a few older variants. On a functional board if you run "ech o ${imx_type}" this will show which variant you are running. To recover the system you must get it booting over the USB OTG port.

Boot the TS-4900 on a TS-8550 carrier board and flip the Boot select switch up. This will boot to the TS-8550 SPI flash which includes a blank flash. If the CPU boots up and the internal ROM does not find a valid header on the boot device, it will fall back to the "Serial Downloader". If it is in this mode and the USB1 header on the TS-8550 is connected to your Linux pc you will see this in dmesg:

 hid-generic 0003:15A2:0054.0006: hiddev0,hidraw3: USB HID v1.10 Device [Freescale SemiConductor Inc  SE Blank ARIK] on usb-0000:00:14.0-6.4.2/input0

If this does not show up then the SPI flash may have a valid image programmed, though it is not capable of booting the system. In this case the CPU must be strapped to force this USB serial downloader boot. On Boot:

Name Location Value
BOOT_MODE_0 CN1_52 1
BOOT_MODE_1 CN2_54 0

Normally these BOOT_MODE[1:0] pins are strapped to "10" for Internal boot, so both of these will need to be jumpered with wires to 3.3v/GND to force a serial downloader boot.

Once it is in this mode you can use the imx USB loader to boot the board.

After building imx_usb on your host pc, run "imx_usb u-boot.imx" to get u-boot loaded and running on the cpu. You can then use the instructions #Update u-boot to get the system permanently booting again.

Alternatively, if the u-boot is erased and you need it recovered you can submit an RMA for us to recover the board.

3.8 U-boot Development

We do provide our u-boot sources, but we do not recommend rebuilding a custom uboot if it can be avoided. This CPU has a long lifetime which will outlast most RAM chips. If we have to update the RAM timing later in the boards life due to an EOL, die change, or any other change that may require new RAM configuration/timing changes, we will update this in our shipping u-boot. If you are using our u-boot these changes will happen without affecting your application. If you are using a custom u-boot you may need to rebuild to get the updated settings.

Our u-boot includes a variable "imx_type". If you are loading a custom u-boot, make sure you check the value of this before writing. If we are forced to update the RAM configuration we will change this variable. We will also send out a product change to anyone who is subscribed to our PCS system.

If you still want to proceed with building a custom u-boot, use the master branch from the github here: https://github.com/embeddedarm/u-boot

Boot up a TS-4900 into u-boot and run "echo ${imx_type}". This will show you the u-boot config to use for the correct RAM timing. We use the same GCC 4.8 used from yocto Fido to compile the u-boot binary.

source /opt/poky/1.8/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi
 
# For example, one of the quad core variants.  Replace this with your imx_type
make ts4900-q-2g-1000mhz-c_defconfig
make -j4

This will output a u-boot.imx you can write to the board using the steps in #Update u-boot.

3.9 Fallback Capable U-boot scripts

U-boot can be configured to have a fallback boot if your application does not acknowledge a successful boot. These scripts can be used in place of the defaults which will require your application to acknowledge a successful boot. If the system returns to u-boot again indicating a failed boot, it will instead boot to the fallback script. The fallback script could be booting to sd, a different read only partition on eMMC, or a small kernel/initramfs on the SPI flash.

env set bootcmd 'sf probe; sf read ${loadaddr} 80000 1; mw.b ${fdtaddr} 0xf0 1; if cmp.b ${loadaddr} ${fdtaddr} 1; 
then run fallback; else sf erase 80000 1000; sf write ${fdtaddr} 80000 1; run emmcboot; fi;';
env set fallback 'run usbprod; sf probe; echo set your fallback action here';
sf erase 80000 1000;
 
env set sdboot 'echo Booting from the SD; if load mmc 0:1 ${fdtaddr} /boot/imx6${cpu}-ts4900-${baseboardid}.dtb; 
then echo $baseboardid detected; else echo Booting default device tree; 
load mmc 0:1 ${fdtaddr} /boot/imx6${cpu}-ts4900.dtb;
 fi; if fdt addr ${fdtaddr}; then echo "Loaded Device Tree"; else run fallback; fi; 
if load mmc 0:1 ${loadaddr} /boot/ts4900-fpga.bin; then echo "Loaded FPGA"; else run fallback; fi; 
if load mmc 0:1 ${loadaddr} ${uimage}; then echo "Loaded Kernel"; else run fallback; fi; 
setenv bootargs root=/dev/mmcblk1p1 rootwait rw ${cmdline_append}; bootm ${loadaddr} - ${fdtaddr}; 
run fallback;'
 
env set emmcboot 'echo Booting from the eMMC; if load mmc 1:1 ${fdtaddr} /boot/imx6${cpu}-ts4900-${baseboardid}.dtb; 
then echo $baseboardid detected; else echo Booting default device tree; load mmc 1:1 ${fdtaddr} /boot/imx6${cpu}-ts4900.dtb;
 fi; if fdt addr ${fdtaddr}; then echo "Loaded Device Tree"; else run fallback; fi; 
if load mmc 1:1 ${loadaddr} /boot/ts4900-fpga.bin; then echo "Loaded FPGA"; else run fallback; fi; 
if load mmc 1:1 ${loadaddr} ${uimage}; then echo "Loaded Kernel"; else run fallback; fi; 
setenv bootargs root=/dev/mmcblk2p1 rootwait rw ${cmdline_append}; bootm ${loadaddr} - ${fdtaddr}; run fallback;'
 
env save;

Once your application has started you can clear the error byte to indicate a successful boot with:

dd if=/dev/zero bs=1 of=/dev/mtdblock0 seek=524288 count=1

3.10 Access U-boot Environment from Linux

U-Boot includes a utility fw_printenv which set set/read environment variables from Linux. This must be built and provided with a config file before it will work.

On the board first boot to u-boot by pressing ctrl+c on startup. At the prompt run:

U-Boot > env print imx_type
imx_type=ts4900-s-1g-800mhz-i

Save this output then boot to Linux to build the fw_printenv tool.

cd /usr/src/
git clone --depth 1 https://github.com/embeddedarm/u-boot-imx.git -b imx_v2015.04_3.14.52_1.1.0_ga
cd u-boot-imx

Since u-boot gave us "imx_type=ts4900-s-1g-800mhz-i", the example defconfig is ts4900-s-1g-800mhz-i_defconfig. Your board's defconfig may be different and this build should match.

make ts4900-s-1g-800mhz-i_defconfig
make -j4 env
cp tools/env/fw_printenv /usr/bin/
# The same utility sets environment variables when
# called as fw_setenv
ln -s /usr/bin/fw_printenv /usr/bin/fw_setenv

The board will also need a config file to know where to load the environment. Create a file /etc/fw_env.config

# SPI flash on the TS-4900
# MTD device name	Device offset	Env. size	Flash sector size	Number of sectors
/dev/mtdblock1		0x0		0x2000		0x1000			2

From here you can run "fw_printenv" and read the environment variables. If first line of output is:

Warning: Bad CRC, using default environment

Then the environment is blank, and u-boot is loading the environment compiled into the u-boot binary. This is normal and is how boards are shipped.

You can modify variables with this command as well:

# Set cmdline_append to include "quiet"
fw_setenv cmdline_append console=ttymxc0,115200 ro init=/sbin/init quiet

4 Yocto

Yocto is our recommended distribution for graphics packages as the software includes patches to support the GPU. X11 in Yocto includes drivers for providing 2D support as well. Support is also provided for OpenGLES 1&2, as well as GStreamer acceleration, included standalone or with Qt. Yocto also provides cross toolchains that include the rootfs. This toolchain allows integration with the Qt Creator IDE and Eclipse.

Yocto does not provide binary security updates. This distribution also does not have any remote repository of pre-built applications. For either of these we features we recommend using Debian.

Our current Yocto support is based off of Yocto 2.2 "Morty".

4.1 Getting Started with Yocto

Yocto itself is a set of scripts and tools used to build a custom Distribution. In our default images we try to include all the common utilities requested by users. Rebuilding Yocto should not be necessary for many users, but is possible if needed. Once installed the default user is "root" with no password.

Our Yocto rootfs is available here:

Yocto Download Links
Yocto Image Download Link
ts-x11-image Download

To write this to an SD card, first partition the SD card to have one large ext3 partition. Most SD cards include one MBR partition by default. Cards can also be partitioned with fdisk, cfdisk, or the graphical gparted utility. This should be an MBR partition, not GPT. Once it is partitioned, format the SD and extract this tar with:

# Assuming your SD card is /dev/sdc with one partition
mkfs.ext3 /dev/sdc1
mkdir /mnt/sd/
sudo mount /dev/sdc1 /mnt/sd/
sudo tar --numeric-owner -jxf ts-x11-image-tsimx6-latest.rootfs.tar.bz2 -C /mnt/sd
sudo umount /mnt/sd
sync
Note: The ext4 filesystem can be used instead of ext3, but it may require additional options. U-Boot does not support the 64bit addressing added as the default behavior in recent revisions of mkfs.ext4. If using e2fsprogs 1.43 or newer, the options "-O ^64bit,^metadata_csum" must be used with ext4 for proper compatibility. Older versions of e2fsprogs do not need these options passed nor are they needed for ext3.

To rewrite the eMMC, boot to the SD card. You cannot rewrite the eMMC while it is mounted elsewhere, or used to currently boot the system. Once booted to the SD, run:

mkfs.ext3 /dev/mmcblk2p1
mkdir /mnt/emmc
mount /dev/mmcblk2p1 /mnt/emmc
wget -qO- ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/\
ts-4900-linux/distributions/yocto/morty/ts-x11-image-tsimx6-\
latest.rootfs.tar.bz2 | tar --numeric-owner xj -C /mnt/emmc/
umount /mnt/emmc
sync

The same commands can be used to write SATA by substituting /dev/mmcblk2p1 with /dev/sda1.

4.2 Yocto Networking

Our Yocto image uses systemd which stores its network files in "/etc/systemd/network/". The simplest network config for a DHCP configuration would look like this:

In /etc/systemd/network/eth.network

[Match]
Name=eth*
 
[Network]
DHCP=yes

For a static configuration create a config file for that specific interface. /etc/systemd/network/eth0.network

[Match]
Name=eth0
 
[Network]
Address=192.168.0.50/24
Gateway=192.168.0.1
DNS=192.168.0.1

DNS will be loaded from /etc/resolv.conf. To make this use a static DNS:

rm /etc/resolv.conf
echo "nameserver 8.8.8.8" > /etc/resolv.conf
echo "nameserver 8.8.4.4" >> /etc/resolv.conf

To use the DNS assigned by DHCP, run:

ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf

For more information on what options are available to configure the network, see the systemd network documentation.

4.2.1 Yocto Wireless

The Atmel driver needs to be loaded manually on units that include wifi. Run 'modprobe wilc3000' to manually load the driver once, or edit /etc/modules and add "wilc3000" on a new line to have the module automatically load on startup.

Yocto uses systemd to start wpa_supplicant, and systemd-networkd to set an IP address via a static setting or DHCP.

Scan for a network

ifconfig wlan0 up
 
# Scan for available networks
iwlist wlan0 scan

An example of connecting to an open network with an SSID of "default":

          Cell 03 - Address: c0:ff:ee:c0:ff:ee
                    Mode:Managed
                    ESSID:"default"
                    Channel:2
                    Encryption key:off
                    Bit Rates:9 Mb/s

To connect to this open network manually for just this boot:

iwconfig wlan0 essid "default"

Use the 'iwconfig' command to determine authentication to an access point. Before connecting it will show something like this:

# iwconfig wlan0
wlan0     IEEE 802.11bgn  ESSID:"default"  
          Mode:Managed  Frequency:2.417 GHz  Access Point: c0:ff:ee:c0:ff:ee   
          Bit Rate=1 Mb/s   Tx-Power=20 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=70/70  Signal level=-34 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

If connecting using WEP, also specify a network key:

iwconfig wlan0 essid "default" key "yourpassword"

If connecting to a WPA network use wpa_passphrase and wpa_supplicant:

mkdir /etc/wpa_supplicant/
wpa_passphrase "ssid name" "full passphrase" >> /etc/wpa_supplicant/wpa_supplicant-wlan0.conf

After generating the configuration file the wpa_supplicant daemon can be started.

wpa_supplicant -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant-wlan0.conf -B

This will return:

 root@ts-imx6-q:~# wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -B
 Successfully initialized wpa_supplicant
 root@ts-imx6-q:~# [  306.924691] wlan0: authenticate with 28:cf:da:b0:f5:bb
 [  306.959415] wlan0: send auth to 28:cf:da:b0:f5:bb (try 1/3)
 [  306.968137] wlan0: authenticated
 [  306.978477] wlan0: associate with 28:cf:da:b0:f5:bb (try 1/3)
 [  306.988577] wlan0: RX AssocResp from 28:cf:da:b0:f5:bb (capab=0x1431 status=0 aid=9)
 [  307.009751] wlan0: associated
 [  307.012768] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
 [  307.047989] wlcore: Association completed.

Use 'iwconfig wlan0' to verify an "Access Point" is specified to verify a connection. This will also report the link quality to the AP.

Wireless may be associated, but this does not get an IP on the network. To connect to the internet or talk to the internal network first configure the interface. See configuring the network, but on many networks only a DHCP client is needed:

udhcpc -i wlan0

Systemd can also be configured to start wpa_supplicant on boot up.

# Assuming the same path for the wpa conf file as shown above
systemctl enable wpa_supplicant@wlan0
systemctl start wpa_supplicant@wlan0

Once this service is started it will bring up the wlan0 interface and associate it to the SSID that is noted in the wpa_supplicant.conf file. Configure the IP settings the same way as a wired network.

In /etc/systemd/network/wlan0.network

[Match]
Name=wlan0
 
[Network]
DHCP=yes

For a static configuration create a config file for that specific interface. /etc/systemd/network/wlan0.network

[Match]
Name=wlan0
 
[Network]
Address=192.168.0.50/24
Gateway=192.168.0.1
DNS=192.168.0.1

For more information on what options are available to configure the network, see the systemd network documentation.

4.3 Yocto Application Development

Yocto provides cross toolchains including the native tools and required arm files. First get the toolchain by right clicking and "Save as":

In the case of either toolchain you would run these commands to install them:

chmod a+x poky-*.sh
sudo ./poky-*.sh

To build an application first source the environment for the toolchain:

source /opt/poky/2.2.2/environment-setup-cortexa9hf-neon-poky-linux-gnueabi
 
# Assuming you have a hello.c:
$CC hello.c -o hello
 
#If you cat the environment file you can see all the paths this sets up.
$ echo $CC
arm-poky-linux-gnueabi-gcc -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/opt/poky/2.2.2/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi

It is also possible to develop over the serial console or ssh on the board itself. Yocto includes development tools such as vim, gcc, g++, gdb, make, autoconf, binutils, and more. See the next sections for using the cross toolchain with IDEs.

4.3.1 Configure Qt Creator IDE

Note: This guide is intended for our stock Yocto image using systemd. On custom images the directions should apply if a toolchain is compiled. "bitbake meta-toolchain-qt5", and update the paths if you are using a different distribution.


Install the qtcreator tool on a host Linux PC. Any recent version from a modern Linux distribution should be sufficient and work without issue. On a Debian/Ubuntu desktop, run:

sudo apt-get update && sudo apt-get install qtcreator -y

The SDK which includes the Qt support will also need to be downloaded (Right click and save as):

They can be installed with:

sudo bash ./poky-*.sh

These instructions assume the path will be default at "/opt/poky/2.2.2/".


Note: An environment script has to be sourced before every execution of qtcreator. Without this, builds will fail.
source /opt/poky/2.2.2/environment-setup-cortexa9hf-neon-poky-linux-gnueabi
qtcreator


Qt Creator needs to be configured to build using this toolchain. Once Qt Creator is launched, select Tools->Options->Devices. Click "Add," select "Generic Linux Device," and then click "Start Wizard".

Qt Device Configuration

On the next page specify the IP address or hostname of the device running Yocto. In this example, the unit has an IP address of 192.168.2.45 obtained by DHCP. The default Yocto image will use "root" with no password to connect. Set the name to TSIMX6.

Qt Device Configuration

It will then verify connectivity. Click close and continue.

Qt Device Test
Note: If this returns an error: "SSH connection failure: SSH Protocol error: Server and client capabilities don't match. Client list was: aes128-cbc,3des-cbc.

Server list was chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com.". If this happens connect to the device's console and edit /etc/ssh/sshd_config and append the line "Ciphers +aes128-cbc". Reset sshd, or reboot the unit and try again. Upgrading Qt Creator may also resolve this issue.

Note: The paths given in the images may not match the latest toolchain, but are meant to show where these values would go. Follow the text appropriate to the architecture of your host PC for the correct values


In the left column of the Options menu, select "Build & Run". On the "Qt Versions" tab, click "Add" in the upper right to configure the TS Kit. Qt Creator may see the "qmake" binary added to your path from the sourced environment script. If this is detected add in the string "TSIMX6" to the title. If not, add the full path and ensure the version name is set to "TSIMX6 QT 5.7.1". This will allow it to be recognized when setting the right binary for the kit.

i686
/opt/poky/2.2.2/sysroots/x86-pokysdk-linux/usr/bin/qt5/qmake
x86_64
/opt/poky/2.2.2/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake
Qt Versions tab


On the "Compilers" tab click "Add", and select "GCC". Set the Name to "TSIMX6 GCC". For the "Compiler Path" use one of the following:

i686
/opt/poky/2.2.2/sysroots/i686-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++
x86_64
/opt/poky/2.2.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++
Qt Compiler tab

On the "Debuggers" tab click "Add". For name, specify "TSIMX6 GDB". For the paths, specify the location of gdb with one of the following:

i686
/opt/poky/2.2.2/sysroots/i686-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gdb
x86_64
/opt/poky/2.2.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gdb
Qt Debugger tab

On the "Kits" tab click "Add". For "Name", enter "TSIMX6". Set device type to "Generic Linux Device". Set the device to "TSIMX6 (default for Generic Linux)". Set Qt mkspec to:

/opt/poky/2.2.2/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/lib/qt5/mkspecs/linux-oe-g++

Make sure there is no space at the end.

Set "Compiler" to "TSIMX6 GCC". Set "Debugger" to "TSIMX6 GDB". Set the "Qt version" to "TSIMX6 QT 5.7.1". Finally, click Apply.

Qt Kit tab
Note: If there is a red exclamation point over the kits icon, it indicates that the compiler ABI does not match. In this case, you will need to revisit the "Compiler", "Debugger", and "Qt Versions" tabs, and browse the host PC for these files manually rather than copy/pasting the paths from these instructions. This is a bug in Ubuntu 16.04's Qt Creator, and may be in later versions as well.

At this point Qt Creator is set up to begin a hello world project.

4.3.1.1 Qt Creator Hello World

Open the Qt Creator IDE and click "New Project".

Qt New Project

Qt provides multiple templates for application development. For this example select the default "Qt Widgets Application".

Qt Widgets App

Specify the location for your project. Keep in mind that the compile process will create more build paths in the "Create In:" path.

Qt Location

Next, select the kit. The TSIMX6 is the kit we set up in the last section, but you may have other kits preinstalled on your system. These can be used for testing graphical development on your PC. Keep in mind distribution versions may contain different functionality.

Qt Select Kit

Next select the class and filename information. This example will use the defaults.

Qt Select Classes

Select any version control for the project. The example will use none and finish the wizard. This will generate the new project.

Qt Project Management

Click the button under "Help" on the left column, and select "TSIMX6" debug. If you only have one kit selected this will be default.

Qt Select build

Now return to edit, and open the Qt project file (qt5-helloworld.pro). Add in these lines anywhere after the target is specified:

linux-* {
    target.path = /home/root/
    INSTALLS += target
}
Qt run environment settings

Last, the DISPLAY must be selected. This is done by setting a run environment variable that will be set when the application is run on the board.

Qt pro file

At this point click the green allow in the bottom left to run the application. This can also be launched from the menu at Build->Run.

Qt Build and Deploy

From here, you can begin customizing your application. Refer to the official Qt documentation for more information

4.3.2 Yocto Hide Cursor

The default image includes the xcursor-transparent icon theme. This can hide the mouse pointer. To enable this, run these commands:

mkdir -p ~/.icons/default/
 
echo "[Icon Theme]" > ~/.icons/default/index.theme
echo "Inherits=xcursor-transparent" >> ~/.icons/default/index.theme
 
# Now reset x, or reset the unit and the cursor will be invisible.

4.4 Yocto Startup Scripts

To have a custom headless application start up at boot a systemd service needs to be created. Create the file /etc/systemd/system/yourapp.service with contents similar to below:

[Unit]
Description=Run an application on the i.MX6
 
[Service]
Type=simple
ExecStart=/usr/local/bin/your_app_or_script
 
[Install]
WantedBy=multi-user.target

If you depend on networking you should add "After=network.target" in the Unit section. Once this file is in place, it cab be added to automatic startup with the following:

# Start your app on bootup, but will not start it now
systemctl enable yourapp.service
 
# Start your app now, but doesn't change auto startup
systemctl start yourapp.service
Note: See the systemd documentation for in depth documentation on services.

To set up a graphical application startup, change the file: /usr/bin/mini-x-session

At the end of the script replace "matchbox-terminal" with your application (absolute path may need to be specified):

matchbox-terminal&
exec matchbox-window-manager

The exec statement must be last in the script in order to take over this script's PID for correct operation.

4.5 Custom Build Yocto

If our stock Yocto distribution does not meet all of your needs, it is possible to re-build it with a custom set of features. Including less options for a smaller footprint, or more packages to add more features.

While we may provide guidance, our free support does not include every situation that can cause a build failure in generating custom images.

5 Debian

Debian is a community run Linux distribution. Debian provides tens of thousands of precompiled applications and services. This distribution is known for stability and large community providing support and documentation. This distribution does not include the same support as Yocto for the GPU. OpenGL ES, Gstreamer, or OpenCL are not supported in Debian. The framebuffer is supported so 2D applications such as browsers and typical simple interface will still run well. Debian is also very well suited for headless applications.

We provide Debian Jessie (8) and Debian Stretch (9). New development is recommended to use Debian Stretch (9) which will receive updates until June 2022, while Jessie is updated with at least until April 2020.

5.1 Debian Stretch(9)

We provide two images for Debian Stretch which apply to our TS-4900, TS-7970, and TS-TPC-7990. If you are unsure which image to pick, use the larger image which contains more development tools and drivers.

Image Size Kernel config Description
debian-armhf-stretch-latest.tar.bz2 1279MB ts4900_defconfig Contains gcc, vim, X11, slim, and will autologin to an xfce4 desktop.
debian-armhf-stretch-minimal-latest.tar.bz2 184MB ts4900_tiny_defconfig Stripped down Debian containing bare minimal hardware support, very limited peripheral support, and only the core debian packages.

Once installed the default user on either image is "root" with no password.

To prepare an SD card, use partitioning tools such as 'fdisk' 'cfdisk' or 'gparted' in linux to create a single linux partition on the SD card. See the guide here for more information. Once it is formatted, extract the above tarball with:

# Assuming your SD card is /dev/sdc with one partition
mkfs.ext3 /dev/sdc1
mkdir /mnt/sd/
sudo mount /dev/sdc1 /mnt/sd/
sudo tar --numeric-owner -xjf debian-armhf-stretch-latest.tar.bz2 -C /mnt/sd
sudo umount /mnt/sd
sync
Note: The ext4 filesystem can be used instead of ext3, but it may require additional options. U-Boot does not support the 64bit addressing added as the default behavior in recent revisions of mkfs.ext4. If using e2fsprogs 1.43 or newer, the options "-O ^64bit,^metadata_csum" must be used with ext4 for proper compatibility. Older versions of e2fsprogs do not need these options passed nor are they needed for ext3.

To rewrite the eMMC the unit must be booted to SD or any other media that is not eMMC. Once booted, run the following commands.:

mkfs.ext3 /dev/mmcblk2p1
mkdir /mnt/emmc
mount /dev/mmcblk2p1 /mnt/emmc
wget -qO- ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/debian/debian-armhf-stretch-latest.tar.bz2 | tar xj -C /mnt/emmc/
umount /mnt/emmc
sync


The same commands can be used to write a SATA drive by substituting /dev/mmcblk2p1 with /dev/sda1.

5.1.1 Debian Networking

Debian can automatically set up the networking based on the contents of /etc/network/interfaces. For example, to enable DHCP for eth0 by default on startup:

echo "auto eth0
iface eth0 inet dhcp" > /etc/network/interfaces.d/eth0

To set up a static IP:

echo "auto eth0
iface eth0 inet static
    address 192.168.0.50
    netmask 255.255.255.0
    gateway 192.168.0.1" > /etc/network/interfaces.d/eth0
echo "nameserver 1.1.1.1" > /etc/resolv.conf

To make this take effect immediately:

service networking restart

To configure other interfaces, replace eth0 with your other network device. New distributions will use predictable interface names. For example, on older Linux a second ethernet port might be eth1, but may now be enp1s0 for pcie, or "enx00D069C0FFEE" including the MAC address for USB ethernets. Run "ifconfig -a" or "ip a" to get a complete list of interfaces, including the ones that are not configured.

5.1.1.1 Debian WIFI Client

Wireless interfaces are also managed with /etc/network/interfaces.d/. For example, to connect as a client to a WPA network with DHCP.

Install wpa_supplicant:

apt-get update && apt-get install wpasupplicant -y

Run:

wpa_passphrase youressid yourpassword

This will output something like:

 network={
 	ssid="youressid"
 	#psk="yourpassword"
 	psk=151790fab3bf3a1751a269618491b54984e192aa19319fc667397d45ec8dee5b
 }

Use the PSK in your network interfaces file.

echo "auto wlan0
iface wlan0 inet dhcp
    wpa-ssid youressid
    wpa-psk 151790fab3bf3a1751a269618491b54984e192aa19319fc667397d45ec8dee5b" > /etc/network/interfaces.d/wlan0

To make this take effect immediately:

service networking restart

For more information on configuring wifi, see Debian's guide here.

5.1.1.2 Debian WIFI Access Point

First, hostapd needs to be installed in order to manage the access point on the device:

apt-get update && apt-get install hostapd -y

Note: The install process will start an unconfigured hostapd process. This process must be killed and restarted before a new hostapd.conf will take effect.

Edit /etc/hostapd/hostapd.conf to include the following lines:

interface=wlan0
driver=nl80211
ssid=YourAPName
channel=1
Note: Refer to the kernel's hostapd documentation for more wireless configuration options.


To start the access point launch hostapd:

hostapd /etc/hostapd/hostapd.conf &

This will start up an access point that can be detected by WIFI clients. A DHCP server will likely be desired to assign IP addresses. Refer to Debian's documentation for more details on DHCP configuration.

5.1.2 Debian Application Development

5.1.2.1 Debian Stretch Cross Compiling

Debian Stretch provides cross compilers from its distribution. An install on a workstation can build for the same release on other architectures. A Linux desktop or laptop PC, virtual machine, or chroot will need to be used for this. Install Debian Stretch for your workstation here.

From a Debian workstation (not the target), run these commands to set up the cross compiler:

# Run "lsb_release -a" and verify Debian 9.X is returned.  These instructions are not
# expected to work on any other version or distribution.
su root
# Not needed for the immediate apt-get install, but used
# so we can install package:armhf for cross compiling
dpkg --add-architecture armhf
apt-get update
apt-get install curl build-essential crossbuild-essential-armhf -y

This will install a toolchain that can be used with the prefix "arm-linux-gnueabihf-". The standard GCC tools will start with that name, eg "arm-linux-gnueabihf-gcc".

The toolchain can now compile a simple hello world application. Create hello-world.c on the Debian workstation:

#include <stdio.h>
int main(){
    printf("Hello World\n");
}

To compile this:

arm-linux-gnueabihf-gcc hello-world.c -o hello-world
file hello-world

This will return that the binary created is for ARM. Copy this to the target platform to run it there.

Debian Stretch supports multiarch which can install packages designed for other architectures. On workstations this is how 32-bit and 64-bit support is provided. This can also be used to install armhf packages on an x86 based workstation.

This cross compile environment can link to a shared library from the Debian root. The package would be installed in Debian on the workstation to provide headers and .so. This is included in most "-dev" packages. When run on the arm target it will also need a copy of the library installed, but it does not need the -dev package.

apt-get install libcurl4-openssl-dev:armhf
 
# Download the simple.c example from curl:
wget https://raw.githubusercontent.com/bagder/curl/master/docs/examples/simple.c
# After installing the supporting library, curl will link as compiling on the unit.
arm-linux-gnueabihf-gcc simple.c -o simple -lcurl

Copy the binary to the target platform and run on the target. This can be accomplished with network protocols like NFS, SCP, FTP, etc.

If any created binaries do not rely on hardware support like GPIO or CAN, they can be run using qemu.

# using the hello world example from before:
./hello-world
# Returns Exec format error
apt-get install qemu-user-static
./hello-world

5.1.3 Debian Installing New Software

Debian provides the apt-get system which allows management of pre-built applications. The apt tools require a network connection to the internet in order to automatically download and install new software. The update command will download a list of the current versions of pre-built packages.

apt-get update

A common example is installing Java runtime support for a system. Find the package name first with search, and then install it.

root@ts:~# apt-cache search openjdk
jvm-7-avian-jre - lightweight virtual machine using the OpenJDK class library
freemind - Java Program for creating and viewing Mindmaps
icedtea-7-plugin - web browser plugin based on OpenJDK and IcedTea to execute Java applets
default-jdk - Standard Java or Java compatible Development Kit
default-jdk-doc - Standard Java or Java compatible Development Kit (documentation)
default-jre - Standard Java or Java compatible Runtime
default-jre-headless - Standard Java or Java compatible Runtime (headless)
jtreg - Regression Test Harness for the OpenJDK platform
libreoffice - office productivity suite (metapackage)
icedtea-7-jre-jamvm - Alternative JVM for OpenJDK, using JamVM
openjdk-7-dbg - Java runtime based on OpenJDK (debugging symbols)
openjdk-7-demo - Java runtime based on OpenJDK (demos and examples)
openjdk-7-doc - OpenJDK Development Kit (JDK) documentation
openjdk-7-jdk - OpenJDK Development Kit (JDK)
openjdk-7-jre - OpenJDK Java runtime, using Hotspot Zero
openjdk-7-jre-headless - OpenJDK Java runtime, using Hotspot Zero (headless)
openjdk-7-jre-lib - OpenJDK Java runtime (architecture independent libraries)
openjdk-7-source - OpenJDK Development Kit (JDK) source files
uwsgi-app-integration-plugins - plugins for integration of uWSGI and application
uwsgi-plugin-jvm-openjdk-7 - Java plugin for uWSGI (OpenJDK 7)
uwsgi-plugin-jwsgi-openjdk-7 - JWSGI plugin for uWSGI (OpenJDK 7)
                                                       

In this case you will want the openjdk-7-jre package. Names of packages are on Debian's wiki or the packages site.

With the package name apt-get install can be used to install the prebuilt packages.

apt-get install openjdk-7-jre
# More than one package can be installed at a time.
apt-get install openjdk-7-jre nano vim mplayer

For more information on using apt-get refer to Debian's documentation here.

5.1.4 Debian Setting up SSH

To install ssh, install the package as normal with apt-get:

apt-get install openssh-server


Make sure the device is configured on the network and set a password for the remote user. SSH will not allow remote connections without a password or a valid SSH key pair.

passwd root

After this setup it is now possible to connect from a remote PC supporting SSH. On Linux/OS X this is the "ssh" command, or from Windows using a client such as PuTTY.

Note: If a DNS server is not present on the target network, it is possible to save time at login by adding "UseDNS no" in /etc/ssh/sshd_config.

5.1.5 Debian Starting Automatically

A systemd service can be created to start up headless applications. Create a file in /etc/systemd/system/yourapp.service

[Unit]
Description=Run an application on startup
 
[Service]
Type=simple
ExecStart=/usr/local/bin/your_app_or_script
 
[Install]
WantedBy=multi-user.target

If networking is a dependency add "After=network.target" in the Unit section. Once you have this file in place add it to startup with:

# Start the app on startup, but will not start it now
systemctl enable yourapp.service
 
# Start the app now, but doesn't change auto startup
systemctl start yourapp.service
Note: See the systemd documentation for in depth documentation on services.

To start an application on bootup with X11 instead change the x-session-manager. By default the system starts xfce:

root@ts:~# ls -lah /usr/bin/x-session-manager 
lrwxrwxrwx 1 root root 35 May 26  2015 /usr/bin/x-session-manager -> /etc/alternatives/x-session-manager
root@ts:~# ls -lah /etc/alternatives/x-session-manager
lrwxrwxrwx 1 root root 19 May 26  2015 /etc/alternatives/x-session-manager -> /usr/bin/startxfce4

The x-session can be modified to only start specified processes. Create the file /usr/bin/mini-x-session with these contents:

#!/bin/bash
matchbox-window-manager -use_titlebar no &
 
exec xfce4-terminal

You may need to "apt-get install matchbox-window-manager." first. This is a tiny window manager which also has a few flags that simplify embedded use. Now enable this session manager and restart slim to restart x11 and show it now.

chmod a+x /usr/bin/mini-x-session
rm /etc/alternatives/x-session-manager
ln -s /usr/bin/mini-x-session /etc/alternatives/x-session-manager
service slim restart

If the x-session-manager process ever closes x11 will restart. The exec command allows a new process to take over the existing PID. In the above example xfce4-terminal takes over the PID of x-session-manager. If the terminal is closed with commands like exit the slim/x11 processes will restart.

5.2 Debian Jessie(8)

5.2.1 Getting Started with Debian

Once installed, the default user is "root" with no password.

Note: This is a shared image that supports the TS-4900, TS-7970, and TS-TPC-7990.


To prepare an SD card, use partitioning tools such as 'fdisk' 'cfdisk' or 'gparted' in linux to create a single linux partition on the SD card. See the guide here for more information. Once it is formatted, extract the above tarball with:

# Assuming your SD card is /dev/sdc with one partition
mkfs.ext3 /dev/sdc1
mkdir /mnt/sd/
sudo mount /dev/sdc1 /mnt/sd/
sudo tar --numeric-owner -xjf debian-armhf-jessie-latest.tar.bz2 -C /mnt/sd
sudo umount /mnt/sd
sync
Note: The ext4 filesystem can be used instead of ext3, but it may require additional options. U-Boot does not support the 64bit addressing added as the default behavior in recent revisions of mkfs.ext4. If using e2fsprogs 1.43 or newer, the options "-O ^64bit,^metadata_csum" must be used with ext4 for proper compatibility. Older versions of e2fsprogs do not need these options passed nor are they needed for ext3.

To rewrite the eMMC the unit must be booted to SD or any other media that is not eMMC. Once booted, run the following commands.:

mkfs.ext3 /dev/mmcblk2p1
mkdir /mnt/emmc
mount /dev/mmcblk2p1 /mnt/emmc
wget -qO- ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/debian/debian-armhf-jessie-latest.tar.bz2 | tar xj -C /mnt/emmc/
umount /mnt/emmc
sync


The same commands can be used to write a SATA drive by substituting /dev/mmcblk2p1 with /dev/sda1.

5.2.2 Debian Networking

From almost any Linux system you can use 'ip' command or the 'ifconfig' and 'route' commands to initially set up the network.

# Bring up the CPU network interface
ifconfig eth0 up
 
# Or if you're on a baseboard with a second ethernet port, you can use that as:
ifconfig eth1 up
 
# Set an ip address (assumes 255.255.255.0 subnet mask)
ifconfig eth0 192.168.0.50
 
# Set a specific subnet
ifconfig eth0 192.168.0.50 netmask 255.255.0.0
 
# Configure your route.  This is the server that provides your internet connection.
route add default gw 192.168.0.1
 
# Edit /etc/resolv.conf for your DNS server
echo "nameserver 192.168.0.1" > /etc/resolv.conf

Most networks will offer a DHCP server, an IP address can be obtained from a server with a single command in linux:

Configure DHCP in Debian:

# To setup the default CPU ethernet port
dhclient eth0
# Or if you're on a baseboard with a second ethernet port, you can use that as:
dhclient eth1
# You can configure all ethernet ports for a dhcp response with
dhclient


Systemd provides a networking configuration option to allow for automatic configuration on startup. Systemd-networkd has a number of different configuration files, some of the default examples and setup steps are outlined below.

/etc/systemd/network/eth.network

[Match]
Name=eth*
 
[Network]
DHCP=yes

To use DHCP to configure DNS via systemd, start and enable the network name resolver service, systemd-resolved:

systemctl start systemd-resolved.service 
systemctl enable systemd-resolved.service
ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf


For a static config create a network configuration for that specific interface.

/etc/systemd/network/eth0.network

[Match]
Name=eth0
 
[Network]
Address=192.168.0.50/24
Gateway=192.168.0.1
DNS=192.168.0.1

For more information on networking, see Debian and systemd's documentation:

5.2.2.1 Debian WIFI Client

If connecting to a WPA/WPA2 network, a wpa_supplicant config file must first be created:

wpa_passphrase yournetwork yournetworkpassphrase > /etc/wpa_supplicant/wpa_supplicant-wlan0.conf


Create the file /lib/systemd/system/wpa_supplicant@.service with these contents

[Unit]
Description=WPA supplicant daemon (interface-specific version)
Requires=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device
 
[Service]
Type=simple
ExecStart=/sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-%I.conf -i%I
 
[Install]
Alias=multi-user.target.wants/wpa_supplicant@%i.service


Create the file /etc/systemd/network/wlan0.network with:

[Match]
Name=wlan0
 
[Network]
DHCP=yes

See the systemctl-networkd example for setting a static IP for a network interface. The wlan0.network can be configured the same way as an eth.network.


To enable all of the changes that have been made, run the following commands:

systemctl enable wpa_supplicant@wlan0
systemctl start wpa_supplicant@wlan0
systemctl restart systemd-networkd

5.2.2.2 Debian WIFI Access Point

First, hostapd needs to be installed in order to manage the access point on the device:

apt-get update && apt-get install hostapd -y

Note: The install process will start an unconfigured hostapd process. This process must be killed and restarted before a new hostapd.conf will take effect.

Edit /etc/hostapd/hostapd.conf to include the following lines:

interface=wlan0
driver=nl80211
ssid=YourAPName
channel=1
Note: Refer to the kernel's hostapd documentation for more wireless configuration options.


To start the access point launch hostapd:

hostapd /etc/hostapd/hostapd.conf &

This will start up an access point that can be detected by WIFI clients. A DHCP server will likely be desired to assign IP addresses. Refer to Debian's documentation for more details on DHCP configuration.

5.2.3 Debian Application Development

5.2.3.1 Debian Jessie Cross Compiling

Debian Jessie provides cross compilers from its distribution. An install on a workstation can build for the same release on other architectures. A PC, virtual machine, or chroot will need to be used for this. Install Debian Jessie for your workstation here.

From a Debian workstation (not the target), run these commands to set up the cross compiler:

# Run "lsb_release -a" and verify Debian 8.X is returned.  These instructions are not
# expected to work on any other version or distribution.
 
apt-get install curl build-essential
 
su root
echo "deb http://emdebian.org/tools/debian jessie main" > /etc/apt/sources.list.d/emdebian.list
curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | apt-key add -
# Note that while Ubuntu uses apt as well, Ubuntu host setup is slightly different, instead of the above commands use the following:
# echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports trusty main restricted universe multiverse" >> /etc/apt/sources.list
# echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports trusty-updates main restricted universe multiverse" >> /etc/apt/sources.list
# echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports trusty-security main restricted universe multiverse" >> /etc/apt/sources.list
dpkg --add-architecture armhf
apt-get update
apt-get install crossbuild-essential-armhf

This will install a toolchain that can be used with the prefix "arm-linux-gnueabihf-". The standard GCC tools will start with that name, eg "arm-linux-gnueabihf-gcc".

The toolchain can now compile a simple hello world application. Create hello-world.c on the Debian workstation:

#include <stdio.h>
int main(){
    printf("Hello World\n");
}

To compile this:

arm-linux-gnueabihf-gcc hello-world.c -o hello-world
file hello-world

This will return that the binary created is for ARM. Copy this to the target platform to run it there.

Debian Jessie supports multiarch which can install packages designed for other architectures. On workstations this is how 32-bit and 64-bit support is provided. This can also be used to install armhf packages on an x86 based workstation.

This cross compile environment can link to a shared library from the Debian root. The package would be installed in Debian on the workstation to provide headers and .so. This is included in most "-dev" packages. When run on the arm target it will also need a copy of the library installed, but it does not need the -dev package.

apt-get install libcurl4-openssl-dev:armhf
 
# Download the simple.c example from curl:
wget https://raw.githubusercontent.com/bagder/curl/master/docs/examples/simple.c
# After installing the supporting library, curl will link as compiling on the unit.
arm-linux-gnueabihf-gcc simple.c -o simple -lcurl

Copy the binary to the target platform and run on the target. This can be accomplished with network protocols like NFS, SCP, FTP, etc.

If any created binaries do not rely on hardware support like GPIO or CAN, they can be run using qemu.

# using the hello world example from before:
./hello-world
# Returns Exec format error
apt-get install qemu-user-static
./hello-world

5.2.4 Debian Installing New Software

Debian provides the apt-get system which allows management of pre-built applications. The apt tools require a network connection to the internet in order to automatically download and install new software. The update command will download a list of the current versions of pre-built packages.

apt-get update

A common example is installing Java runtime support for a system. Find the package name first with search, and then install it.

root@ts:~# apt-cache search openjdk
jvm-7-avian-jre - lightweight virtual machine using the OpenJDK class library
freemind - Java Program for creating and viewing Mindmaps
icedtea-7-plugin - web browser plugin based on OpenJDK and IcedTea to execute Java applets
default-jdk - Standard Java or Java compatible Development Kit
default-jdk-doc - Standard Java or Java compatible Development Kit (documentation)
default-jre - Standard Java or Java compatible Runtime
default-jre-headless - Standard Java or Java compatible Runtime (headless)
jtreg - Regression Test Harness for the OpenJDK platform
libreoffice - office productivity suite (metapackage)
icedtea-7-jre-jamvm - Alternative JVM for OpenJDK, using JamVM
openjdk-7-dbg - Java runtime based on OpenJDK (debugging symbols)
openjdk-7-demo - Java runtime based on OpenJDK (demos and examples)
openjdk-7-doc - OpenJDK Development Kit (JDK) documentation
openjdk-7-jdk - OpenJDK Development Kit (JDK)
openjdk-7-jre - OpenJDK Java runtime, using Hotspot Zero
openjdk-7-jre-headless - OpenJDK Java runtime, using Hotspot Zero (headless)
openjdk-7-jre-lib - OpenJDK Java runtime (architecture independent libraries)
openjdk-7-source - OpenJDK Development Kit (JDK) source files
uwsgi-app-integration-plugins - plugins for integration of uWSGI and application
uwsgi-plugin-jvm-openjdk-7 - Java plugin for uWSGI (OpenJDK 7)
uwsgi-plugin-jwsgi-openjdk-7 - JWSGI plugin for uWSGI (OpenJDK 7)
                                                       

In this case you will want the openjdk-7-jre package. Names of packages are on Debian's wiki or the packages site.

With the package name apt-get install can be used to install the prebuilt packages.

apt-get install openjdk-7-jre
# More than one package can be installed at a time.
apt-get install openjdk-7-jre nano vim mplayer

For more information on using apt-get refer to Debian's documentation here.

5.2.5 Debian Setting up SSH

To install ssh, install the package as normal with apt-get:

apt-get install openssh-server


Make sure the device is configured on the network and set a password for the remote user. SSH will not allow remote connections without a password or a valid SSH key pair.

passwd root

After this setup it is now possible to connect from a remote PC supporting SSH. On Linux/OS X this is the "ssh" command, or from Windows using a client such as PuTTY.

Note: If a DNS server is not present on the target network, it is possible to save time at login by adding "UseDNS no" in /etc/ssh/sshd_config.

5.2.6 Debian Starting Automatically

A systemd service can be created to start up headless applications. Create a file in /etc/systemd/system/yourapp.service

[Unit]
Description=Run an application on startup
 
[Service]
Type=simple
ExecStart=/usr/local/bin/your_app_or_script
 
[Install]
WantedBy=multi-user.target

If networking is a dependency add "After=network.target" in the Unit section. Once you have this file in place add it to startup with:

# Start the app on startup, but will not start it now
systemctl enable yourapp.service
 
# Start the app now, but doesn't change auto startup
systemctl start yourapp.service
Note: See the systemd documentation for in depth documentation on services.

To start an application on bootup with X11 instead change the x-session-manager. By default the system starts xfce:

root@ts:~# ls -lah /usr/bin/x-session-manager 
lrwxrwxrwx 1 root root 35 May 26  2015 /usr/bin/x-session-manager -> /etc/alternatives/x-session-manager
root@ts:~# ls -lah /etc/alternatives/x-session-manager
lrwxrwxrwx 1 root root 19 May 26  2015 /etc/alternatives/x-session-manager -> /usr/bin/startxfce4

The x-session can be modified to only start specified processes. Create the file /usr/bin/mini-x-session with these contents:

#!/bin/bash
matchbox-window-manager -use_titlebar no &
 
exec xfce4-terminal

You may need to "apt-get install matchbox-window-manager." first. This is a tiny window manager which also has a few flags that simplify embedded use. Now enable this session manager and restart slim to restart x11 and show it now.

chmod a+x /usr/bin/mini-x-session
rm /etc/alternatives/x-session-manager
ln -s /usr/bin/mini-x-session /etc/alternatives/x-session-manager
service slim restart

If the x-session-manager process ever closes x11 will restart. The exec command allows a new process to take over the existing PID. In the above example xfce4-terminal takes over the PID of x-session-manager. If the terminal is closed with commands like exit the slim/x11 processes will restart.

6 Ubuntu

Ubuntu is a distribution provided by Canonical which is based on Debian. Ubuntu often has more recent packages but follows a shorter release cycle. The image we provide is based on Ubuntu. We use the root filesystem, but the kernel is not provided by Ubuntu or in any way associated with Canonical. Our Kernel is based on the imx_4.1.15_1.0.0_ga release from git.freescale.com. This is patched to provide support for our boards and peripherals.

This image includes support for the TS-4900, TS-7970, and TS-TPC-7990.

6.1 Getting Started with Ubuntu

The latest release is available here:

The login is either "root" with no password, or username "ubuntu" with the password "ubuntu". The ubuntu user is allowed to run sudo.

To write this to an SD card, first partition the SD card to have one large ext3, or ext4 partition. See the guide here for more information. Once it is formatted, extract this tar with:

# Assuming your SD card is /dev/sdc with one partition
mkfs.ext3 /dev/sdc1
mkdir /mnt/sd/
sudo mount /dev/sdc1 /mnt/sd/
sudo tar --numeric-owner -xjf ubuntu-armhf-16.04-latest.tar.bz2 -C /mnt/sd
sudo umount /mnt/sd
sync

To rewrite the eMMC, boot to the SD card. You cannot rewrite the emmc while it is mounted elsewhere, or used to currently boot the system. Once booted to the SD, run:

mkfs.ext3 /dev/mmcblk2p1
mkdir /mnt/emmc
mount /dev/mmcblk2p1 /mnt/emmc
wget -qO- ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/ubuntu/ubuntu-armhf-16.04-latest.tar.bz2 | tar --numeric-owner -xj -C /mnt/emmc/
umount /mnt/emmc
sync


Note: The ext4 filesystem can be used instead of ext3, but it may require additional options. U-Boot does not support the 64bit addressing added as the default behavior in recent revisions of mkfs.ext4. If using e2fsprogs 1.43 or newer, the options "-O ^64bit,^metadata_csum" must be used with ext4 for proper compatibility. Older versions of e2fsprogs do not need these options passed nor are they needed for ext3.

6.2 Ubuntu Networking

From almost any Linux system you can use "ip" or the ifconfig/route commands to set up the network.

# Bring up the CPU network interface
ifconfig eth0 up
 
# Or if you're on a baseboard with a second ethernet port, you can use that as:
ifconfig eth1 up
 
# Set an ip address (assumes 255.255.255.0 subnet mask)
ifconfig eth0 192.168.0.50
 
# Set a specific subnet
ifconfig eth0 192.168.0.50 netmask 255.255.0.0
 
# Configure your route.  This is the server that provides your internet connection.
route add default gw 192.168.0.1
 
# Edit /etc/resolv.conf for your DNS server
echo "nameserver 192.168.0.1" > /etc/resolv.conf

Most networks will offer DHCP which can be set up with one command:

# To setup the default CPU ethernet port
dhclient eth0
# Or if you're on a baseboard with a second ethernet port, you can use that as:
dhclient eth1
# You can configure all ethernet ports for a dhcp response with
dhclient

To make DHCP run on startup systemd's networking will need to be configured.

In /etc/systemd/network/eth.network

[Match]
Name=eth*
 
[Network]
DHCP=yes

Then, if you intend to use DHCP to configure your DNS, start and enable the network name resolver service:

systemctl start systemd-resolved.service 
systemctl enable systemd-resolved.service
ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf

For a static configuration create a config file for that specific interface. /etc/systemd/network/eth0.network

[Match]
Name=eth0
 
[Network]
Address=192.168.0.50/24
Gateway=192.168.0.1
DNS=192.168.0.1

For more information on networking, see Ubuntu and systemd's documentation:

6.2.1 Ubuntu WIFI Client

If connecting to a WPA/WPA2 network, a wpa_supplicant config file must first be created:

wpa_passphrase yournetwork yournetworkpassphrase > /etc/wpa_supplicant/wpa_supplicant-wlan0.conf


Create the file /lib/systemd/system/wpa_supplicant@.service with these contents

[Unit]
Description=WPA supplicant daemon (interface-specific version)
Requires=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device
 
[Service]
Type=simple
ExecStart=/sbin/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-%I.conf -i%I
 
[Install]
Alias=multi-user.target.wants/wpa_supplicant@%i.service


Next, enable the service to start up on boot:

systemctl enable wpa_supplicant@wlan0


Create the file /etc/systemd/network/wlan0.network with:

[Match]
Name=wlan0
 
[Network]
DHCP=yes

Enable networkd to run dhcp on startup:

systemctl enable systemd-networkd

See the systemctl-networkd example for setting a static IP for a network interface. The wlan0.network can be configured the same way as an eth.network. To enable all of the changes that have been made, run the following commands:

systemctl enable wpa_supplicant@wlan0
systemctl start wpa_supplicant@wlan0
systemctl restart systemd-networkd

6.2.2 Ubuntu WIFI Access Point

First, hostapd needs to be installed in order to manage the access point on the device:

apt-get update && apt-get install hostapd -y

Note: The install process will start an unconfigured hostapd process. This process must be killed and restarted before a new hostapd.conf will take effect.

Edit /etc/hostapd/hostapd.conf to include the following lines:

interface=wlan0
driver=nl80211
ssid=YourAPName
channel=1
Note: Refer to the kernel's hostapd documentation for more wireless configuration options.


To start the access point launch hostapd:

hostapd /etc/hostapd/hostapd.conf &

This will start up an access point that can be detected by WIFI clients. A DHCP server will likely be desired to assign IP addresses. Refer to Debian's documentation for more details on DHCP configuration.

6.3 Ubuntu Installing New Software

Ubuntu provides the apt-get system which lets you manage pre-built applications. Before you do this you need to update Ubuntu's list of package versions and locations. This assumes you have a valid network connection to the internet.

apt-get update

For example, lets say you wanted to install openjdk for Java support. You can use the apt-cache command to search the local cache of Debian's packages.

root@ts-imx6:~# apt-cache search openjdk
jvm-7-avian-jre - lightweight virtual machine using the OpenJDK class library
freemind - Java Program for creating and viewing Mindmaps
icedtea-7-plugin - web browser plugin based on OpenJDK and IcedTea to execute Java applets
default-jdk - Standard Java or Java compatible Development Kit
default-jdk-doc - Standard Java or Java compatible Development Kit (documentation)
default-jre - Standard Java or Java compatible Runtime
default-jre-headless - Standard Java or Java compatible Runtime (headless)
jtreg - Regression Test Harness for the OpenJDK platform
libreoffice - office productivity suite (metapackage)
icedtea-7-jre-jamvm - Alternative JVM for OpenJDK, using JamVM
openjdk-7-dbg - Java runtime based on OpenJDK (debugging symbols)
openjdk-7-demo - Java runtime based on OpenJDK (demos and examples)
openjdk-7-doc - OpenJDK Development Kit (JDK) documentation
openjdk-7-jdk - OpenJDK Development Kit (JDK)
openjdk-7-jre - OpenJDK Java runtime, using Hotspot Zero
openjdk-7-jre-headless - OpenJDK Java runtime, using Hotspot Zero (headless)
openjdk-7-jre-lib - OpenJDK Java runtime (architecture independent libraries)
openjdk-7-source - OpenJDK Development Kit (JDK) source files
uwsgi-app-integration-plugins - plugins for integration of uWSGI and application
uwsgi-plugin-jvm-openjdk-7 - Java plugin for uWSGI (OpenJDK 7)
uwsgi-plugin-jwsgi-openjdk-7 - JWSGI plugin for uWSGI (OpenJDK 7)
                                                       

In this case you will likely want openjdk-7-jre to provide a runtime environment, and possibly openjdk-7-jdk to provide a development environment.

Once you have the package name you can use apt-get to install the package and any dependencies. This assumes you have a network connection to the internet.

apt-get install openjdk-7-jre
# You can also chain packages to be installed
apt-get install openjdk-7-jre nano vim mplayer

For more information on using apt-get refer to Ubuntu's documentation here.

6.4 Ubuntu Setting up SSH

To install ssh, install the package as normal with apt-get:

apt-get install openssh-server


Make sure the device is configured on the network and set a password for the remote user. SSH will not allow remote connections without a password or a valid SSH key pair.

passwd root

After this setup it is now possible to connect from a remote PC supporting SSH. On Linux/OS X this is the "ssh" command, or from Windows using a client such as PuTTY.

Note: If a DNS server is not present on the target network, it is possible to save time at login by adding "UseDNS no" in /etc/ssh/sshd_config.

6.5 Ubuntu Starting Automatically

A systemd service can be created to start up headless applications. Create a file in /etc/systemd/system/yourapp.service

[Unit]
Description=Run an application on startup
 
[Service]
Type=simple
ExecStart=/usr/local/bin/your_app_or_script
 
[Install]
WantedBy=multi-user.target

If networking is a dependency add "After=network.target" in the Unit section. Once you have this file in place add it to startup with:

# Start the app on startup, but will not start it now
systemctl enable yourapp.service
 
# Start the app now, but doesn't change auto startup
systemctl start yourapp.service
Note: See the systemd documentation for in depth documentation on services.

To start an application on bootup with X11 instead change the x-session-manager. By default the system starts xfce:

root@ts:~# ls -lah /usr/bin/x-session-manager 
lrwxrwxrwx 1 root root 35 May 26  2015 /usr/bin/x-session-manager -> /etc/alternatives/x-session-manager
root@ts:~# ls -lah /etc/alternatives/x-session-manager
lrwxrwxrwx 1 root root 19 May 26  2015 /etc/alternatives/x-session-manager -> /usr/bin/startxfce4

The x-session can be modified to only start specified processes. Create the file /usr/bin/mini-x-session with these contents:

#!/bin/bash
matchbox-window-manager -use_titlebar no &
 
exec xfce4-terminal

You may need to "apt-get install matchbox-window-manager." first. This is a tiny window manager which also has a few flags that simplify embedded use. Now enable this session manager and restart slim to restart x11 and show it now.

chmod a+x /usr/bin/mini-x-session
rm /etc/alternatives/x-session-manager
ln -s /usr/bin/mini-x-session /etc/alternatives/x-session-manager
service slim restart

If the x-session-manager process ever closes x11 will restart. The exec command allows a new process to take over the existing PID. In the above example xfce4-terminal takes over the PID of x-session-manager. If the terminal is closed with commands like exit the slim/x11 processes will restart.

7 QNX

QNX is an RTOS that supports the i.MX6 CPU. We provide a BSP for the TS-4900 and TS-7970 quad core or solo based on QNX Neutrino 6.6.0. The supporting files are available here:

We provide support for booting QNX on our platforms, but further support is provided by QNX

Known Working:

  • UARTs 1-5
  • Ethernet
  • I2C 1, I2C 2
  • SD (/dev/hd0)
  • eMMC (/dev/emmc0)
  • USB Host
  • SPI NOR (/dev/fs0)
  • HDMI (TS-7970 only)
  • LCD Interface (TS-TPC-8390 with TS-4900 only)
  • RS485

Known not working:

  • WIFI
  • FPGA based UARTs

Not yet tested:

  • I210 (Second gig eth)

7.1 QNX BSP

Before compiling QNX be sure to edit the file: src/hardware/startup/boards/imx6x/ts7970/board.h Set either BOARD_TS7970 or BOARD_TS4900 depending on the target board.

We have also included a port of tshwctl which is used to access the FPGA. This allows you to read/write FPGA registers and to change the crossbar. For example, to set up auto TXEN on the TS-7970 RS-485 port (/dev/ser4):

export MB_TXD=TTYSER4_TXD
export TTYMAX1_RXD=GPIO
export TTYSER4_RXD=MB_RXD_485
export TXD_232_COM=GPIO
export MB_TX_EN_485=TTYSER4_TXEN
tshwctl -b 0x7970 -s
 
tshwctl -b 0x7970 -c

This will print out the modified state of the crossbar. The relevant pins are now:

  TTYSER4_RXD ( in) (  0) MB_RXD_485  
       MB_TXD ( in) (  0) TTYSER4_TXD
 MB_TX_EN_485 ( in) (  0) TTYSER4_TXEN                                          
  TTYMAX1_RXD ( in) (  0) GPIO                                                  
  TXD_232_COM ( in) (  0) GPIO   

Use tshwctl to specify the baud rate and mode of the uart so the TX enable pin will be automatically toggled.

tshwctl -b 0x7970 -a 4 -x 115200 -i 8n1

/dev/ser4 is now configured for RS485 traffic.

7.2 QNX Booting

Write the example image to a disk.

bzip2 -d ts7970-qnx-6.6.0-20150707.dd.bz2
 
#Replace sdx with your device.  Try lsblk to find your SD card.
sudo dd if=ts7970-qnx-6.6.0-20150707.dd bs=4M of=/dev/sdx
sync

Reinsert or partprobe the disk, and there will be a single partition present. The partition includes the QNX IFS, and a u-boot script. On startup the imx6 is configured to launch the hush script. If present, at /boot/boot.ub on either the SD or eMMC depending on if the SD boot jumper is present. The script loads the FPGA, then copies the QNX ifs into memory and jumps into it to begin execution.

8 Android

This Android distribution is based off of Freescale's port of AOSP to the i.MX6 platform. This allows users to run existing APKs to use this platform with no modifications, or develop new projects using Android Studio.

8.1 Getting Started with Android

Android must be run from the eMMC. This can be written with the USB production tool, or from the SD card. To use the USB drive, follow the instructions here, and download the image and copy it to the USB drive as emmcimage.dd.bz2.

Download the Android image here:

To load from the SD card, boot up to any Linux distribution from the SD card such as the default Yocto. Once booted here, run:

wget -qO- ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7990-linux\
/distributions/android/android-7.1.1-tsimx6-tiwifi-\
latest.dd.bz2 | bzcat | dd bs=4M of=/dev/mmcblk2 conv=fsync

This will download it, decompress it, and write it to the eMMC drive. Reboot and boot into Android.

8.2 Android Networking

On startup android will automatically start dhcpcd on eth0, or WIFI can be configured via the Settings->Wi-Fi menu.

8.3 Android Software Development

AOSP development works exactly the same as on an Android phone, except the Google APIs associated with the store are not available. See The android documentation for getting started on development: http://developer.android.com/training/basics/firstapp/index.html

8.4 Android Manually Install APK

APKs can be installed just like on any other Android device. On the device go to settings->About Tablet and press the "build number" until the text states "You are now a developer". Go back to Settings and there is now a "Developer Options" menu. Under Debugging enable USB Debugging. You should now be able to run adb commands to install apk files.

adb install </path/to/app.apk>

9 Win EC 2013

9.1 Installing

The example Windows image for the TS-4900 (Solo (TS-4900-S-WIN-I) or Quad-core (TS-4900-Q-WIN-E)) is available from Guruce here. The download kit includes all utilities and instructions necessary to install both Windows Embedded Compact 2013 and the associated SDK for development on the TS-4900 in Visual Studio. Care should be taken to obtain the "solo" or "quad core" version appropriate for the TS-4900 device actually being used.

9.2 FPGA

The FPGA on the TS-4900 is a soft-programmable ICE40. In Linux, loading of the default FPGA image is handled by the OS bootloader. In the case of Windows, this functionality is separate. Technologic Systems provides an example of how to load this file in the git archive at the embeddedarm github. Note, GuruCE version r1100 and previous do not set up the FPGA clock pin. In this case user intervention on the serial console is required during boot. See the [#r1100_special_instructions] for information on this workaround.

9.2.1 r1100

To temporarily enable the FPGA clock on the TS-4900, break into the eBoot bootloader by pressing space bar during the first second of powerup. Press B at the eBoot menu to drop to eBoot console, then enter "s 0x020E022C 0x3" at the prompt (without the quotation marks), press enter, q, r, l, and wait for the nk.bin to load. The FPGA clock is now running and your FPGA loader can function as designed.

10 Backup / Restore

10.1 MicroSD Card

These instructions assume you have an SD card with one partition. Most SD cards ship this way by default. If the card has had its partition table modified this can be corrected with a tool like 'gparted' or 'fdisk'.

Plug the SD card into a USB reader and connect it to a linux workstation PC. Newer distributions include a utility called 'lsblk' which lists all block devices like a USB SD card reader:

lsblk
 NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
 sdY      8:0    0   400G  0 disk 
 ├─sdY1   8:1    0   398G  0 part /
 ├─sdY2   8:2    0     1K  0 part 
 └─sdY5   8:5    0     2G  0 part [SWAP]
 sr0     11:0    1  1024M  0 rom  
 sdX      8:32   1   3.9G  0 disk 
 ├─sdX1   8:33   1   7.9M  0 part 
 ├─sdX2   8:34   1     2M  0 part 
 ├─sdX3   8:35   1     2M  0 part 
 └─sdX4   8:36   1   3.8G  0 part  

In this case the SD card is 4GB, so sdX is the target device. Note that on your system, sdX will not be a real device, it could be sda, sdb, mmcblk0, etc. Technologic Systems is not responsible for any damages cause by using the improper device node for imaging an SD card.

After plugging in the device after Linux has booted you can use dmesg to print out the kernel log. When the USB drive is added it will append to the end of that file. Try running:

dmesg | tail -n 100
 scsi 54:0:0:0: Direct-Access     Generic  Storage Device   0.00 PQ: 0 ANSI: 2
 sd 54:0:0:0: Attached scsi generic sg2 type 0
 sd 54:0:0:0: [sdX] 3862528 512-byte logical blocks: (3.97 GB/3.84 GiB)

In this case, sdXc is shown as a 3.97GB card. Note that on your system, sdX will not be a real device, it could be sda, sdb, mmcblk0, etc. Technologic Systems is not responsible for any damages cause by using the improper device node for imaging an SD card.

The following commands will reformat the first partition of the SD card, and unpack the latest filesystem on there:

# Verify nothing else has this mounted
sudo umount /dev/sdX1
 
sudo mkfs.ext3 /dev/sdX1
sudo mkdir /mnt/sd
sudo mount /dev/sdX1 /mnt/sd/
wget ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7990-linux/distributions/debian/debian-armhf-jessie-latest.tar.bz2
 
sudo tar --numeric-owner -xf debian-armhf-jessie-latest.tar.bz2 -C /mnt/sd
sudo umount /mnt/sd
sync
Note: The ext4 filesystem can be used instead of ext3, but it may require additional options. U-Boot does not support the 64bit addressing added as the default behavior in recent revisions of mkfs.ext4. If using e2fsprogs 1.43 or newer, the options "-O ^64bit,^metadata_csum" must be used with ext4 for proper compatibility. Older versions of e2fsprogs do not need these options passed nor are they needed for ext3.

Once written, the files on disk can be verified to ensure they are the same as the source files in the archive. Reinsert the disk to flush the block cache completely, then run the following commands:

mount /dev/sdX1 /mnt/sd
cd /mnt/sd/
sudo md5sum --quiet -c md5sums.txt
cd -
umount /mnt/sd
sync

The md5sum command will report what differences there are, if any, and return if it passed or failed.

10.2 eMMC

Write the image:

These commands assume you are booted to the SD card, and

# Verify nothing else has this mounted
umount /dev/mmcblk2p1
 
mkfs.ext3 /dev/mmcblk2p1
mkdir /mnt/emmc
mount /dev/mmcblk2p1 /mnt/emmc
wget ftp://ftp.embeddedarm.com/ts-socket-macrocontrollers/ts-4900-linux/distributions/yocto/morty/ts-x11-image-tsimx6-latest.rootfs.tar.bz2
tar --numeric-owner -xf ts-x11-image-tsimx6-latest.rootfs.tar.bz2 -C /mnt/emmc
umount /mnt/emmc
sync
Note: The ext4 filesystem can be used instead of ext3, but it may require additional options. U-Boot does not support the 64bit addressing added as the default behavior in recent revisions of mkfs.ext4. If using e2fsprogs 1.43 or newer, the options "-O ^64bit,^metadata_csum" must be used with ext4 for proper compatibility. Older versions of e2fsprogs do not need these options passed nor are they needed for ext3.

After it is written you can verify the data was written correctly.

# Drop any block cache
echo 3 > /proc/sys/vm/drop_caches
mount /dev/mmcblk2p1 /mnt/emmc
cd /mnt/emmc/
sudo md5sum -c md5sums.txt
umount /mnt/emmc
sync

The md5sum command will report what differences there are, if any, and return if it passed or failed.

Backup the image:

First boot the board to any SD image. The SD should have enough space for the compressed image of your eMMC. From our default image this is ~500MB. To create an image to your SD card:

mkdir /mnt/sd/
mount /dev/mmcblk1p1 /mnt/sd/
cd /mnt/sd/
tar --numeric-owner -cjf /root/backup.tar.bz2 *
cd -
umount /mnt/sd/

11 Compile the Kernel

To add drivers or reduce the size of our kernel, or to write custom kernel drivers you may need to build the kernel. These steps allow you to rebuild the kernel which is compatible with most of our Linux distributions.

This board has several kernels released and available in our git depending on the branch name.

  • The "master" branch is 3.10.17 and is largely outdated and replaced with later kernels. This is used with the old Yocto Dora builds.
  • The "imx_3.10.53_1.1.0_ga" kernel is a stable branch. Use this with Yocto Dizzy, Fido, or compatible with Debian Jessie.
  • The "imx_3.14.52_1.1.0_ga" branch is compatible with Yocto Jethro, and Debian.
  • The "imx_4.1.15_1.0.0_ga" branch is compatible with Yocto Jethro, Yocto Morty and Debian. Includes recent fixes not in older branches. This is recommended for most users.

You can pick the branch below. The kernel can be rebuilt by cross compiling from an X86/X86_64 Linux. Our default kernels are rebuilt using the toolchains built by Yocto. You can download the appropriate cross toolchain for your Linux system here:

Note: Older kernels will require older toolchains. These that are listed are recommended for the 4.1.15 which is our current recommended version. Use the Yocto Fido toolchain for older kernels.
chmod a+x poky*.sh
sudo ./poky*.sh

This will ask for the install directory for the toolchain. You can choose another directory than the default, but the following instructions will assume the defaults.

This also requires several tools from your distribution. For Ubuntu/Debian:

sudo apt-get install git build-essential lzop u-boot-tools libncursesw5-dev

Once those are installed:

git clone https://github.com/embeddedarm/linux-3.10.17-imx6.git -b imx_4.1.15_1.0.0_ga linux-tsimx6 --depth 1
# If you already have it cloned out you can "git pull" to get the latest changes
 
cd linux-tsimx6
# These export commands must be run every time before any make commands
export ARCH=arm
# For 64-bit
export CROSS_COMPILE=/opt/poky/2.0.2/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-
# For 32-bit
#export CROSS_COMPILE=/opt/poky/2.0.2/sysroots/i686-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-
export LOADADDR=0x10008000
 
make ts4900_defconfig
 
## Make any changes in "make menuconfig" or driver modifications, then compile
make -j8 && make -j8 uImage

To install this to a board you would use a USB SD reader and plug in the card. You must have an image already written to the card. This will not install the root filesystem with a bootable OS, only the kernel and drivers. Assuming your Linux rootfs is all on "sdc1":

export DEV=/dev/sdc1
sudo mount "$DEV" /mnt/sd
sudo rm /mnt/sd/boot/uImage
sudo cp arch/arm/boot/uImage  /mnt/sd/boot/uImage
sudo cp arch/arm/boot/dts/imx6*ts*.dtb /mnt/sd/boot/
INSTALL_MOD_PATH="/mnt/sd" sudo -E make modules_install 
INSTALL_HDR_PATH="/mnt/sd" sudo -E make headers_install
sudo umount /mnt/sd/
sync

11.1 Change Kernel Splash Screen

The kernel splashscreen allows 224 colors. It also allows up to the full screen resolution, but for fastest boot speed it should be kept as small as possible. The image will be centered around a black background.

To convert your image, for example, "mylogo.png":

convert mylogo.png mylogo.ppm
ppmquant 224 mylogo.ppm > mylogo-224.ppm
pnmnoraw mylogo-224.ppm > logo_user_clut224.ppm
cp logo_user_clut224.ppm <kernel build sources>/drivers/video/logo/

Now recompile the kernel following the guide in the previous section.

Add the kernel cmdline "logo.nologo" in u-boot to completely disable the splash screen.

12 Production Mechanism

On startup, the TS-4900's U-Boot has the ability to locate and run a U-Boot script file named /tsinit.ub on the root of a USB drive. If this script exists, U-Boot will load and run it automatically. This is intended for the initial production of units and allows mass programming various media from a USB mass storage device.

The USB blasting image can be downloaded here. This includes a basic linux kernel and a small initramfs that will mount the USB drive at /mnt/usb/ and execute /mnt/usb/blast.sh.

Download the latest USB production image here. This is a tarball that contains a rootfs based on Buildroot. It contains the kernel and filesystem, as well as a basic script to tell U-Boot to boot to Linux on the USB drive.

This image will be written to a USB drive. Most USB drives enumerate in under a second and will work, but some USB mass storage devices like external spinning hard drives typically have long initialization around 10-15 seconds. These will not enumerate in time to work from U-Boot.

The blast image and scripts require a minimum of 50 MB. When sizing the USB drive to use, this must be taken in to account along with any images or tarballs that will reside on the USB drive as a part of the production process. The USB drive must have at least 1 partition, with the first partition being formatted ext2/3 or fat32/vfat.

Note: The ext4 filesystem can be used instead of ext3, but it may require additional options. U-Boot does not support the 64bit addressing added as the default behavior in recent revisions of mkfs.ext4. If using e2fsprogs 1.43 or newer, the options "-O ^64bit,^metadata_csum" must be used with ext4 for proper compatibility. Older versions of e2fsprogs do not need these options passed nor are they needed for ext3.
# This assumes the USB is /dev/sdc:
sudo mkfs.ext3 /dev/sdc1
sudo mkdir /mnt/sd/
sudo mount /dev/sdc1 /mnt/sd/
sudo tar --numeric-owner -xf /path/to/tsimx6_usb_blaster-latest.tar.bz2 -C /mnt/sd/
 
# Normally, customized images would be copied to the /mnt/sd/, but for
# an example these steps would write our latest Debian image:
sudo wget -O /mnt/sd/emmcimage.tar.bz2 http://ftp.embeddedarm.com/ftp/ts-socket-macrocontrollers/ts-4900-linux/distributions/debian/debian-armhf-jessie-latest.tar.bz2
# A symlink can be used to write the same image to SD
sudo ln -s /mnt/sd/emmcimage.tar.bz2 /mnt/sd/sdimage.tar.bz2
sudo umount /mnt/sd
sync

The USB drive boots into a small Buildroot environment with filesystem and partitioning tools. This can be used to format SD, eMMC, SATA, or even rewrite U-Boot and its environment. The Buildroot starts up and calls /blast.sh on the USB device. By default this script is set up to look for a number of of specific files on the USB disk and write to media on the host device. Upon completion of the script, the green or red LEDs will blink to visually indicate a pass or fail of the script. This script can be used without modification to write images from USB with these filenames:

SD Card sdimage.tar.bz2 Tar of the filesystem. This will partition the SD card to have a single ext4 partition and extract this tar to the filesystem. If the file /md5sums.txt is present in the tarball, it will be used via the md5sum command to check and verify every file on the filesystem after extraction is complete. This /md5sums.txt file is optional and can be omitted, but it must not be blank if present.
sdimage.dd.bz2 Disk image of the SD card. This will be written to /dev/mmcblk0 directly. If the file /sdimage.dd.md5 is present on the USB drive, the image written to disk will be read back and compared to the md5sum contained in the sdimage.dd.md5 file.
eMMC emmcimage.tar.bz2 Tar of the filesystem. This will repartition the eMMC to have a single ext4 partition and extract this tar to the filesystem. If the file /md5sums.txt is present in the tarball, it will be used via the md5sum command to check and verify every file on the filesystem after extraction is complete. This /md5sums.txt file is optional and can be omitted, but it must not be blank if present.
emmcimage.dd.bz2 Disk image of the eMMC. This will be written to /dev/mmcblk1 directly. If the file /emmcimage.dd.md5 is present on the USB drive, the image written to disk will be read back and compared to the md5sum contained in the emmcimage.dd.md5 file.
SATA [1] sataimage.tar.bz2 Tar of the filesystem. This will repartition the SATA drive to have a single ext4 partition and extract this tar to the filesystem. If the file /md5sums.txt is present in the tarball, it will be used via the md5sum command to check and verify every file on the filesystem after extraction is complete. This /md5sums.txt file is optional and can be omitted, but it must not be blank if present.
sataimage.dd.bz2 Disk image of the card. This will be written to /dev/sda directly. If the file /sataimage.dd.md5 is present on the USB drive, the image written to disk will be read back and compared to the md5sum contained in the sataimage.dd.md5 file.
SPI u-boot.imx This will write U-Boot on the SPI flash. The imx_type variables will be checked before writing any data to ensure the file being written is compatible with the current CPU. If the file /u-boot.imx.md5 is present on the USB drive, the image written to SPI flash will be read back and compared to the md5sum contained in the u-boot.imx.md5 file.
  1. SATA is only present on the Dual/Quad CPUs

Most users should be able to use the above script without modification, but the Buildroot sources used are available from our github repo. To build the whole setup and create a USB drive, the following commands can be used. This will wipe any data on the specified partition and replace it with an ext2 formatted filesystem. This filesystem will have all of the necessary files written to it to create a bootable USB drive. Note that this must be the first partition of the disk.

# Assuming /dev/sdc1 is the USB drive's first partition
make ts4900_defconfig && make && sudo ./make_usb_prog.sh /dev/sdc1

13 Features

13.1 Bluetooth

The WIFI option on the board also includes a bluetooth 4.0 LE module. To connect this to bluez first pulse the BT_EN pin, and then call hciattach:

# Install bluez if it is not already present
apt-get update
apt-get install bluez bluez-tools
 
# Loads firmware for the wifi+BT module
ifconfig wlan0 up
 
echo 237 > /sys/class/gpio/export
echo low > /sys/class/gpio/gpio237/direction
echo high > /sys/class/gpio/gpio237/direction
sleep .1
hciattach /dev/ttymxc1 texas 3000000
hciconfig hci0 up

Once this is loaded you can scan for devices with:

hcitool scan

This will return a list of devices such as:

	14:74:11:A1:1E:C9	BlackBerry 8530

Bluez has support for many different profiles for HID, A2DP, and many more. Refer to the Bluez documentation for more information.

13.2 CAN

The i.MX6 includes 2 CAN controllers which support the SocketCAN interface. Before proceeding with the examples, see the Kernel's CAN documentation here.

This board comes preinstalled with can-utils. These can be used to communicate over a CAN network without writing any code. The candump utility can be used to dump all data on the network

## First, set the baud rate and bring up the device:
ip link set can0 type can bitrate 250000
ip link set can0 up
 
## Dump data & errors:
candump can0 &
 
## Send the packet with:
#can_id = 0x7df
#data 0 = 0x3
#data 1 = 0x1
#data 2 = 0x0c
cansend can0 -i 0x7Df 0x3 0x1 0x0c
## Some versions of cansend use a different syntax.  If the above
## commands gives an error, try this instead:
#cansend can0 7DF#03010C

The above example packet is designed to work with the Ozen Elektronik myOByDic 1610 ECU simulator to read the RPM speed. In this case, the ECU simulator would return data from candump with:

 <0x7e8> [8] 04 41 0c 60 40 00 00 00 
 <0x7e9> [8] 04 41 0c 60 40 00 00 00 

In the output above, columns 6 and 7 are the current RPM value. This shows a simple way to prove out the communication before moving to another language.

The following example sends the same packet and parses the same response in C:

#include <stdio.h>
#include <pthread.h>
#include <net/if.h>
#include <string.h>
#include <unistd.h>
#include <net/if.h>
#include <sys/ioctl.h>
#include <assert.h>
#include <linux/can.h>
#include <linux/can/raw.h>
 
int main(void)
{
	int s;
	int nbytes;
	struct sockaddr_can addr;
	struct can_frame frame;
	struct ifreq ifr;
	struct iovec iov;
	struct msghdr msg;
	char ctrlmsg[CMSG_SPACE(sizeof(struct timeval)) + CMSG_SPACE(sizeof(__u32))];
	char *ifname = "can0";
 
	if((s = socket(PF_CAN, SOCK_RAW, CAN_RAW)) < 0) {
		perror("Error while opening socket");
		return -1;
	}
 
	strcpy(ifr.ifr_name, ifname);
	ioctl(s, SIOCGIFINDEX, &ifr);
	addr.can_family  = AF_CAN;
	addr.can_ifindex = ifr.ifr_ifindex;
 
	if(bind(s, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
		perror("socket");
		return -2;
	}
 
 	/* For the ozen myOByDic 1610 this requests the RPM guage */
	frame.can_id  = 0x7df;
	frame.can_dlc = 3;
	frame.data[0] = 3;
	frame.data[1] = 1;
	frame.data[2] = 0x0c;
 
	nbytes = write(s, &frame, sizeof(struct can_frame));
	if(nbytes < 0) {
		perror("write");
		return -3;
	}
 
	iov.iov_base = &frame;
	msg.msg_name = &addr;
	msg.msg_iov = &iov;
	msg.msg_iovlen = 1;
	msg.msg_control = &ctrlmsg;
	iov.iov_len = sizeof(frame);
	msg.msg_namelen = sizeof(struct sockaddr_can);
	msg.msg_controllen = sizeof(ctrlmsg);  
	msg.msg_flags = 0;
 
	do {
		nbytes = recvmsg(s, &msg, 0);
		if (nbytes < 0) {
			perror("read");
			return -4;
		}
 
		if (nbytes < (int)sizeof(struct can_frame)) {
			fprintf(stderr, "read: incomplete CAN frame\n");
		}
	} while(nbytes == 0);
 
	if(frame.data[0] == 0x4)
		printf("RPM at %d of 255\n", frame.data[3]);
 
	return 0;
}

See the Kernel's CAN documentation here. Other languages have bindings to access CAN such as Python using C-types, Java using JNI.

13.3 COM Ports

This board uses UARTs from both the CPU and the FPGA. The CPU UART 0 (/dev/ttymxc0) is a dedicated console for Linux and U-Boot and not suggested to be reused. The other CPU UARTs for ttymxc1 through ttymxc4 are usable for end applications. These support up to 5Mb/s UART data with DMA.

The FPGA also emulates a MAX3100 UART interface accessible at /dev/ttyMAX0-2. These UARTs support a total throughput of about 115200[1]. These UARTs include hardware that makes implementing RS-485 half duplex software extremely simple. If higher throughput is needed, the FPGA crossbar can be adjusted to use a CPU UART with TXEN support instead.

Note: Our SPI interface matches the max3100 almost entirely, except optionally a single 8-bit transaction can be sent to act as a chip select between the three uarts supported on our interface. The default FPGA supports 3 UARTs on this interface. This is handled automatically by our driver (max3100-ts).

The RS-485 half duplex direction control is built into the ttyMAX UARTs. By default, they are connected to the RS-485 ports and no code is required for the transmit enable to toggle. The CPU UARTs however do not have transmit enable built in. The FPGA provides support for transmit enable on ttymxc1/ttymxc3, but additional setup steps are required so the FPGA can properly time the transmit enable output. The FPGA needs to know the baud rate, and symbol size (data bits, parity, stop bits) that the UART will be run at

For example:

# Configure ttymxc1 and ttymxc3 as 115200, 8n1
 
stty -F /dev/ttymxc1 115200 cs8 -cstopb
tshwctl --autotxen 1
 
stty -F /dev/ttymxc3 115200 cs8 -cstopb
tshwctl --autotxen 3

The 'tshwctl' tool will read the UART settings and set up the FPGA timing for TXEN automatically. The baud rate and mode settings must be set before running the 'tshwctl' command!

When using the FPGA for either the ttyMAX UARTs or the CPU UARTs, the TXEN timing will happen well under a single bit time [2] of any baud rate possible by the hardware.

All of these UARTs are accessed using the standard /dev/ interfaces. See these resources for information on programming with UARTs in Linux.

  1. Idle periods do not count towards the total throughput limitation.
  2. This is a requirement for half duplex MODBUS
UART Level RX (or +) TX (or -)
ttymxc0 [1] RS232 COM1 Header pin 2, Expansion Header pin 3 COM1 Header pin 3, Expansion Header pin 5
ttyMAX0 RS485 COM1 Header pin 1, Expansion Header pin 16 COM1 Header pin 6, Expansion Header pin 14
ttymxc3 RS232 COM1 Header pin 8, Expansion Header pin 1 COM1 Header pin 7, Expansion Header pin 6
ttymxc4 RS232 COM2 Header pin 2, Expansion Header pin 9 COM2 Header pin 3, Expansion Header pin 12
ttyMAX1 RS485 COM2 Header pin 1, Expansion Header pin 4 COM2 Header pin 6, Expansion Header pin 2
ttyMAX2 RS232 COM2 Header pin 8, DIO Header pin 5 COM2 Header pin 7, Expansion Header pin 10
  1. Can be replaced with ttymxc2 by removing the "Console Enable" jumper

13.4 CPU

The i.MX6 is an armv7a Cortex-A9 by NXP. The CPU itself is available in 792MHz, 996MHz, and 1.2GHz with a solo, dual, or quad core processor.

Refer to NXP's documentation for in depth documentation on these CPU cores:

13.5 eMMC

This board includes a Micron eMMC module with builds that have "4096F" in the part number. Our off the shelf builds are 4GiB, but up to 64GiB are available for larger builds. The eMMC flash appears to Linux as an SD card at /dev/mmcblk2. Our default programming will include one partition programmed with our Yocto image.

The eMMC are like SD cards in that they should not be powered down during a write/erase cycle. This eMMC module includes support for setting a fuse for a "Write Reliability" mode, and a "psuedo SLC" mode. With both of these enabled then any writes will be atomic to 512B. If a sector is being written during a power loss, a block is guaranteed to have either the old or new data. This scheme is far more resilient to power loss than more traditional flash media. In cases of old 512B data fsck will still be able to recover a mountable filesystem. In cases where the corrupted file is a database it can still need a mechanism for recovery.

When this pSLC mode is turned on it will reduce the available space to under half, and reduce the write speed.

See our post on preventing filesystem corruption.

The mmc-utils package is used to enable these modes. First determine the exact size of the flash you're using:

mmc extcsd read /dev/mmcblk2 | grep MAX_ENH_SIZE_MULT -A 1
Max Enhanced Area Size [MAX_ENH_SIZE_MULT]: 0x0001cd
 i.e. 1888256 KiB

So in this case, 1888256 KiB is the max size of the enhanced partition. This number should be used for the enh_area command:

mmc write_reliability set -n 0 /dev/mmcblk2
mmc enh_area set -y 0 1888256 /dev/mmcblk2
WARNING: Setting either of those modes is permanent. Using the wrong value it is possible to brick eMMC which will not be covered by the warranty. Evaluation units with fuses set will not be accepted through returns.

After this is run, reboot the board. On all future boots the eMMC will be detected at the smaller size. Changing the enhanced area will erase the drive. After these mmc commands the disk will need to be rewritten.

13.6 Ethernet Port

The i.MX6 includes a 10/100/1000 Ethernet. In Linux this is the eth0 interface. The MAC address uses the Technologic Systems 00:d0:69:00:00:00, and the last 3 octets are assigned from our pool. The MAC address is burned into the CPU's fuses during production, and will be read back automatically by software in Linux or U-Boot. Each board is also assigned 1 additional sequential mac address which is used on some carrier boards that add a second ethernet.

Freescale has a published erratum regarding the maximum Ethernet speed. The default kernel can achieve about 400 Mb/s.

13.7 FPGA

The Lattice ICE40 FPGA provides auto TX enable for RS-485 half duplex, a few more DIO, the UART MUX, and it can generate clocks for use on a baseboard. Most of these registers are controlled using tshwctl in the ts4900-utils repository. The DIO can be accessed using the sysfs GPIOs 224 to 255 using the "ts4900gpio" driver. See the #GPIO section for more information on the recommended GPIO access. The below examples will communicate directly over i2c.

Usage: tshwctl [OPTIONS] ...
Technologic Systems i.mx6 FPGA Utility
     -m, --addr <address>   Sets up the address for a peek/poke
     -v, --poke <value>     Writes the value to the specified address
     -t, --peek             Reads from the specified address
     -i, --mode <8n1>       Used with -a, sets mode like '8n1', '7e2', etc
     -x, --baud <speed>     Used with -a, sets baud rate for auto485
     -a, --autotxen <uart>  Enables autotxen for supported CPU UARTs
                              Uses baud/mode if set or reads the current
                              configuration of that uart
     -c, --dump             Prints out the crossbar configuration
     -g, --get              Print crossbar for use in eval
     -s, --set              Read environment for crossbar changes
     -q, --showall          Print all possible FPGA inputs and outputs.
     -h, --help             This message

On every poweron the FPGA is programmed using the file in /boot/ts4900-fpga.bin. U-boot copies this into memory, and runs the "ice40" command to reprogram the FPGA. Without this file the FPGA will not do anything. This FPGA interfaces to the i.MX6 using the first CPU I2C bus. You can use the "tshwctl --addr <addr>" with the "--peek" or "--poke <val>" to access these registers.

Addr Bits Function
00 7:3 CN1_63 Crossbar
2 CN1_63 Input Data
1 CN1_63 Output Data
0 CN1_63 Output Enable
01 7:3 CN1_67 Crossbar
2 CN1_67 Input Data
1 CN1_67 Output Data
0 CN1_67 Output Enable
02 7:3 CN1_87 Crossbar
2 CN1_87 Input Data
1 CN1_87 Output Data
0 CN1_87 Output Enable
03 7:3 ttymxc3 rxd Crossbar
2 ttymxc3 rxd Input Data
1 ttymxc3 rxd Output Data
0 ttymxc3 rxd Output Enable
04 7:3 ttymxc1 CTS Crossbar
2 ttymxc1 CTS Input Data
1 ttymxc1 CTS Output Data
0 ttymxc1 CTS Output Enable
05 7:3 CN2_78 Crossbar
2 CN2_78 Input Data
1 CN2_78 Output Data
0 CN2_78 Output Enable
06 7:3 CN2_80 Crossbar
2 CN2_80 Input Data
1 CN2_80 Output Data
0 CN2_80 Output Enable
07 7:3 CN2_86 Crossbar
2 CN2_86 Input Data
1 CN2_86 Output Data
0 CN2_86 Output Enable
08 7:3 CN2_88 Crossbar
2 CN2_88 Input Data
1 CN2_88 Output Data
0 CN2_88 Output Enable
09 7:3 CN2_94 Crossbar
2 CN2_94 Input Data
1 CN2_94 Output Data
0 CN2_94 Output Enable
10 7:3 CN2_96 Crossbar
2 CN2_96 Input Data
1 CN2_96 Output Data
0 CN2_96 Output Enable
11 7:3 CN2_98 Crossbar
2 CN2_98 Input Data
1 CN2_98 Output Data
0 CN2_98 Output Enable
12 7:3 CN2_100 Crossbar
2 CN2_100 Input Data
1 CN2_100 Output Data
0 CN2_100 Output Enable
13 7:2 Reserved
1 BT_EN Output Enable
0 Reserved
14 7:2 Reserved
1 WL_EN Output Enable
0 Reserved
15 7:3 Reserved
2 BT_RTS Input value
1:0 Reserved
16 7:3 BT_CTS Crossbar
2 BT_CTS Input value
1 BT_CTS Output value
0 BT_CTS Output Enable
17 7:3 BT_RXD Crossbar
2:0 Reserved
18 7:3 ttymxc1 RXD Crossbar
2:0 Reserved
29 7:2 Reserved
1 Push sw reboot enable [1]
0 Reserved
30 7:2 Reserved
1 Reset (on 1)
0 Reserved
31 7:3 Reserved
2 Push SW Input value
1:0 Reserved
32 7:0 RS485_CNT0 bits 23:16
33 7:0 RS485_CNT0 bits 15:8
34 7:0 RS485_CNT0 bits 7:0
35 7:0 RS485_CNT1 bits 23:16
36 7:0 RS485_CNT1 bits 15:8
37 7:0 RS485_CNT1 bits 7:0
38 7:0 RS485_CNT2 bits 23:16
39 7:0 RS485_CNT2 bits 15:8
40 7:0 RS485_CNT2 bits 7:0
41 7:0 RS485_CNT3 bits 23:16
42 7:0 RS485_CNT3 bits 15:8
43 7:0 RS485_CNT3 bits 7:0
44 7:3 SPIUART0 RX Crossbar
2:0 Reserved
45 7:3 SPIUART1 RX Crossbar
2:0 Reserved
46 7:3 SPIUART2 RX Crossbar
2:0 Reserved
51 7:4 FPGA Revision
3 B1 Strapping input value
2 G1 Strapping input value
1 L14 Strapping input value
0 N14 Strapping input value
53 7:3 SPIUART0 CTS Crossbar
2:0 Reserved
54 7:3 SPIUART1 CTS Crossbar
2:0 Reserved
55 7:3 SPIUART2 CTS Crossbar
2:0 Reserved
  1. Set 1 to enable hardware reset on PUSH_SW low

The FPGA crossbar allows almost any of the FPGA pins to be rerouted on the carrier board. All of the above registers that have a crossbar mux value can be written with these values to change the output value. When using the crossbar pins that are outputs, bit 1 should also be set to allow output enables.

Crossbar Value Selected Function
0 Do not change
1 BT_RTS
2 BT_TXD
3 CN1_63
4 CN1_67
5 CN2_100
6 ttymxc1 RTS#
7 CN2_78
8 CN2_80
9 CN2_86
10 CN2_88
11 CN2_94
12 CN2_96
13 CN2_98
14 ttymxc3 TXD
15 ttymxc1 TXD
16 SPIUART0_TX
17 SPIUART0_TXEN
18 SPIUART0_RTS
19 SPIUART1_TX
20 SPIUART1_TXEN
21 SPIUART1_RTS
22 SPIUART2_TX
23 SPIUART2_TXEN
24 SPIUART2_RTS
25 ttymxc1 TXEN
26 ttymxc3 TXEN
27 12MHz clock
28 14MHz clock
29 24MHz clock
30 28.88MHz clock
31 GPIO

On startup these are the default values:

Pad Default Mapping FGPA Addr Crossbar Reset Value
CN1_63 SPIUART1_TXEN 0 0xa1
CN1_67 SPIUART0_TXEN 1 0x89
CN1_87 GPIO 226 2 0xf8
ttymxc3 RXD CN2_88 3 0x80
ttymxc1 CTS BT_RTS 4 0x8
CN2_78 SPIUART0_TXD 5 0x81
CN2_80 GPIO [1] 6 0xf8
CN2_86 ttymxc3 txd 7 0x71
CN2_88 GPIO [2] 8 0xf8
CN2_94 SPIUART1_TXD 9 0x99
CN2_96 GPIO 10 0xf8
CN2_98 SPIUART2_TXD 11 0xb1
CN2_100 GPIO [3] 12 0xf8
BT_CTS ttymxc1 RTS 16 0x31
BT_RXD ttymxc1 TXD 17 0x78
ttymxc1 RXD BT_TXD 18 0x10
SPIUART0 RX CN2_80 44 0x40
SPIUART1 RX CN2_96 45 0x60
SPIUART2 RX CN2_100 46 0x28
SPIUART0 CTS GPIO [4] 53 0xf8
SPIUART1 CTS GPIO [5] 54 0xf8
SPIUART2 CTS GPIO [6] 55 0xf8
  1. This pin is GPIO to just be used as an input for SPIUART0_RXD
  2. This pin is GPIO to just be used as an input for ttymxc3 rxd
  3. This pin is GPIO to just be used as an input for SPIUART2_RXD
  4. Route to GPIO to go nowhere
  5. Route to GPIO to go nowhere
  6. Route to GPIO to go nowhere

13.7.1 FPGA Crossbar

The FPGA crossbar allows adjusting the routing for pins without modifying the FPGA logic. This allows you reroute UARTs, and change pin functions.

List the default mappings with:

root@ts-imx6:~# tshwctl --get
CN1_63=TTYMAX1_TXEN
CN1_67=TTYMAX0_TXEN
CN1_87=GPIO
TTYMXC3_RXD=CN2_88
TTYMXC1_CTS=BT_RTS
CN2_78=TTYMAX0_TXD
CN2_80=GPIO
CN2_86=TTYMXC3_TXD
CN2_88=GPIO
CN2_94=TTYMAX1_TXD
CN2_96=GPIO
CN2_98=TTYMAX2_TXD
CN2_100=GPIO
BT_CTS=TTYMXC1_RTS
BT_RXD=TTYMXC1_TXD
TTYMXC1_RXD=BT_TXD
TTYMAX0_RXD=CN2_80
TTYMAX1_RXD=CN2_96
TTYMAX2_RXD=CN2_100
TTYMAX0_CTS=GPIO
TTYMAX1_CTS=GPIO
TTYMAX2_CTS=GPIO

The possible outputs can also be listed with "tshwctl --showall"

FPGA Outputs:
UNCHANGED
BT_RTS
BT_TXD
CN1_63
CN1_67
CN2_100
TTYMXC1_RTS
CN2_78
CN2_80
CN2_86
CN2_88
CN2_94
CN2_96
CN2_98
TTYMXC3_TXD
TTYMXC1_TXD
TTYMAX0_TXD
TTYMAX0_TXEN
TTYMAX0_RTS
TTYMAX1_TXD
TTYMAX1_TXEN
TTYMAX1_RTS
TTYMAX2_TXD
TTYMAX2_TXEN
TTYMAX2_RTS
TTYMXC1_TXEN
TTYMXC3_TXEN
CLK_12MHZ
CLK_14MHz
CLK_24MHz
CLK_28P88MHZ
GPIO

The --set option will read for any matching environment variables and make changes to the crossbar.

Route ttymxc1 from bluetooth to CN2_94-CN2_100.

export CN2_94=TTYMXC1_TXD
export TTYMXC1_RXD=CN2_96
export CN2_98=TTYMXC1_CTS
export CN2_100=TTYMXC1_RTS
tshwctl --set

Set up 24MHz clk on CN1_67:

export CN1_67=CLK_24MHz
tshwctl --set

Replace FPGA UART pins with CPU UARTs for higher throughput. For example, to switch around ttymxc1 / ttyMAX0, and ttymxc3 / ttyMAX1:

# Replace ttyMAX0 with ttymxc1 for RS485 which is BT uart by default
# leave bt uart disconnected since it cannot run with SPI uart
export CN1_67=TTYMXC1_TXEN
export TTYMXC1_RXD=CN2_80
export CN2_78=TTYMXC1_TXD
 
# Replace ttyMAX1 for second RS485 port
export CN1_63=TTYMXC3_TXEN
export TTYMXC3_RXD=CN2_96
export CN2_94=TTYMXC3_TXD
 
# Put ttyMAX1 on CN2_86/88 (replace ttymxc3)
export TTYMAX1_RXD=CN2_88
export CN2_86=TTYMAX1_TXD
 
# Apply all these changes
tshwctl --set

13.8 GPIO

The i.MX6 GPIO are available using the kernel's sysfs. See the kernel's documentation here for more detail. This interface provides a set of files and directories for interacting with GPIO. This allows GPIO to be accessed from any language that can write files. For example to toggle CN1_89/EIM_A22 the kernel maps this to GPIO 48. See the table below for the full IO listing.

Note: It is possible to use GPIO registers as documented in the CPU reference manual to control GPIO. If this is needed keep in mind the kernel may attempt to access the same GPIO banks for various drivers. Be aware of the other IO in the same bank or use a read/modify/write.

To interact with this pin, first export it to userspace:

echo "48" > /sys/class/gpio/export

If you receive a permission denied on a pin that means it is claimed by another kernel driver. If it succeeds you will have a /sys/class/gpio/gpio48/ directory. The relevant files in this directory are:

 direction - "in", "high", "low", or "out".  Out is equivalent to low
 value - write "1" or "0", or read "1" or "0" if direction is in
 edge - write with "rising", "falling", or "none"
# Set GPIO 48 high
echo "out" > /sys/class/gpio/gpio48/direction
echo "1" > /sys/class/gpio/gpio48/value
# Set GPIO 48 low
echo "0" > /sys/class/gpio/gpio48/value
 
# Read the value of GPIO 48
echo "in" > /sys/class/gpio/gpio48/direction
cat /sys/class/gpio/gpio48/value

As an output, the in can be written to 0 for low (GND), or 1 for high (3.3V). As an input the GPIO will have a 100k pullup. The GPIO pins off of the i.MX6 processor support an absolute maximum of -0.5 to 3.6V. It possible to use any processor GPIO as an interrupt. This is done by writing the edge value, and using select() or poll() on the value file for changes. See the #Interrupts section for more details.

The GPIO numbers in the table below are relevant to how the Linux references these numbers. The CPU documentation refers to bank and IO while Linux flattens this out to one number space.

CPU PAD [1] GPIO Number Location
N/A (FPGA IO) 255 IN_1 (Input only)
EIM_A21 49 IN_0 (Input only)
EIM_A20 50 IN_4 (Input only)
N/A (FPGA IO) 226 IN_3 (Input only)
EIM_A22 48 OUT_2 (Output only)
EIM_A23 166 OUT_1 (Output only)
EIM_A24 132 OUT_0 (Output only)
EIM_WAIT 128 IN_2 (Input only)
EIM_EB1 61 OUT_3 (Output only)
EIM_DA9 73 OUT_7 (Output only)
EIM_DA8 72 OUT_6 (Output only)
EIM_LBA 59 OUT_5 (Output only)
EIM_CS0 55 OUT_4 (Output only)
CSI0_DAT17 163 IN_6 (Input only)
SD4_DAT7 47 IN_11 (Input only)
SD3_RST 200 IN_9 (Input only)
GPIO_16 203 IN_10 (Input only)
GPIO_17 204 IN_8 (Input only)
CSI0_DAT13 159 SPI_CS2#
GPIO_19 101 IN_5 (Input only)
CSI0_MCLK 147 OUT_8
CSI0_PIXCLK 146 IN_7 (Input only)

13.9 Interrupts

The i.MX6 CPU GPIO are also able to function as interrupts on rising and falling edges. This is accessible from the kernel as well as userspace. Userspace IRQs are exposed through the sysfs gpio mechanism. This example will trigger on a falling edge for GPIO 48:

echo "48" > /sys/class/gpio/export
echo "in" > /sys/class/gpio/gpio48/direction
echo "falling" > /sys/class/gpio/gpio48/edge

From here, you would need to use a lower level language to poll() or select() on /sys/class/gpio/gpio48/value.

#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/select.h>
#include <sys/stat.h>
#include <unistd.h>
 
int main(int argc, char **argv)
{
	char gpio_irq[64];
	int ret, irqfd = 0, i = 0;
	fd_set fds;
	FD_ZERO(&fds);
	int buf;
 
	if(argc < 2) {
		printf("Usage: %s <gpio number>\n", argv[0]);
		return 1;
	}
 
	snprintf(gpio_irq, sizeof(gpio_irq), "/sys/class/gpio/gpio%d/value", atoi(argv[1]));
	irqfd = open(gpio_irq, O_RDONLY, S_IREAD);
 
	if(irqfd == -1) {
		printf("Could not open IRQ %s\n", argv[1]);
		printf("Make sure the GPIO is already exported", argv[1]);
		return 1;
	}
 
	// Read first since there is always an initial status
	ret = read(irqfd, &buf, sizeof(buf));
 
	while(1) {
		FD_SET(irqfd, &fds);
		// See if the IRQ has any data available to read
		ret = select(irqfd + 1, NULL, NULL, &fds, NULL);
 
		if(FD_ISSET(irqfd, &fds))
		{
			FD_CLR(irqfd, &fds);  //Remove the filedes from set
			printf("IRQ detected %d\n", i);
			fflush(stdout);
			i++;
 
			/* The return value includes the actual GPIO register value */
			read(irqfd, &buf, sizeof(buf));
			lseek(irqfd, 0, SEEK_SET);
		}
 
		//Sleep, or do any other processing here
		usleep(100000);
	}
 
	return 0;
}

This example can be run as "./irqtest 48" which will echo every time the pin changes, but will otherwise take no cpu time.

13.10 LEDs

The kernel provides access to control the LEDs using the sysfs:

# Set Red led on
echo 1 > /sys/class/leds/red-led/brightness
# Set Red led off
echo 0 > /sys/class/leds/red-led/brightness
 
# Set Green led on
echo 1 > /sys/class/leds/green-led/brightness
# Set Green led off
echo 0 > /sys/class/leds/green-led/brightness

The kernel provides various triggers that can be useful for debugging purposes. The trigger for a given LED is in its directory:

echo "heartbeat" > /sys/class/leds/red-led/trigger
Trigger value LED toggles on
none Default, no action
mmc0 MicroSD card activity
mmc1 eMMC activity
mmc2 WIFI SDIO activity
timer 2hz blink
oneshot Blinks after delay. [2]
heartbeat Similar to timer, but varies the period based on system load
backlight Toggles on FB_BLANK
gpio Toggle based on a specified gpio. [3]
cpu0 Blink on CPU core 0 activity
cpu1 Blink on CPU core 1 activity
cpu2 Blink on CPU core 2 activity
cpu3 Blink on CPU core 3 activity
default-on Only turns on by default. Only useful for device tree.
transient Specify on/off with time to turn off. [4]
flash/torch Toggle on Camera activation. Not currently used.
  1. The pad name does not often correspond with the functionality of the IO we use, but can be used to reference the pad in the CPU manual.
  2. See the Kernel documentation for more details
  3. When this trigger is set, a "gpio" file appears in the same directory which can be used to specify what GPIO to follow when it blinks
  4. See the Kernel documentation for more details

13.11 MicroSD Card Interface

The i.MX6 SDHCI driver supports MicroSD (0-2GB), MicroSDHC (4-32GB), and MicroSDXC(64GB-2TB). The cards available on our website on average support up to 16MB/s read, and 22MB/s write using this interface. The linux driver provides access to this socket at /dev/mmcblk1 as a standard Linux block device.

This graph shows our SD write endurance test for 40x TS-7553 boards. These boards are running a doublestore stress test on 4GB Sandisk MicroSD cards. A failure is marked on the graph for a card once a single bit of corruption is found.

See chapter 67 of the IMX6 reference manual for more information on this mmc controller.

We have performed compatibility testing on the Sandisk MicroSD cards we provide. We do not suggest switching brands/models without your own qualification testing. While SD cards specifications are standardized, in practice cards behave very differently. We do not recommend ATP or Transcend MicroSD cards due to known compatibility issues.

Our testing has shown that on average microSD cards will last between 6-12TB. After this cards can begin to experience corruption, or stop being recognized by the host pc. This may be enough storage for many applications to write for years without problems. For more reliable storage consider using the eMMC. Our endurance testing showed a write lifetime on average of about 123TiB.

MicroSD cards should not have power removed during a write or they will have disk corruption. Keep the filesystem mounted read only if this is a possibility. It is not always possible for fsck to recover from the types of failures that will be seen with SD power loss. Consider using the eMMC for storage instead which is far more resilient to power loss.

13.12 NVRAM

The RTC includes 128 bytes of NVRAM which can be used for custom applications. There is a utility, nvramctl which can be used to read/write the NVRAM.

ts4900-utils github.

The utility reads/writes a byte at a time, and returns the value in hex.

nvramctl --addr 10 --set 0x40
nvramctl --addr 10 --get
# Returns "nvram10=0x40".
# This can also be used with eval
eval $(nvramctl --addr 10 --get)
echo $nvram10
# Returns "0x40"

The NVRAM code can be included in your application by using these two files:

13.13 Onboard SPI Flash

This board includes 8MiB of SPI flash using a Micron N25Q064A13ESE40F. The CPU uses this for the initial boot to load u-boot, as well as the u-boot environment. In Linux this is accessed with the /dev/mtdblock devices.

Bytes Size Description
0-0x3ff 1KB Unused
0x400-0xfffff 0.999MiB U-boot
0x100000-0x101fff 8KiB U-boot environment
0x102000-0x700000 5.992MiB Unused

13.14 Power Consumption

The TS-4900's power consumption can vary a lot depending on the build and activity of the board. Most of the power savings happens automatically when the cpu and gpu are idle, but it is also possible to disable the Ethernet PHY for additional savings. The backlight on the TS-8390 can be changed for significant power savings. No savings were observed putting eMMC or the ICE40 in reset.

# Put ETH PHY in reset
echo "116" > /sys/class/gpio/export
echo "high" > /sys/class/gpio/gpio116/direction
 
# Lower backlight to 50%
echo 4 > /sys/class/backlight/backlight_lcd.27/brightness
 
# Disable backlight
echo 0 > /sys/class/backlight/backlight_lcd.27/brightness

Ethernet is not connected unless otherwise specified, and serial is disconnected during the measurement. The CPU test is 5x processes of "openssl speed", and the GPU test is Qt5CinematicExperience in the Yocto image.

This test is using the TS-4900 800MHz industrial solo with eMMC and RTC.

TS-4900-1024-4096F-S8S-RTC-I + TS-8390
Test Max (W) Average (W)
CPU 100% + GPU loaded (LCD 100%) 9.36 (0.780 A) 6.98 (0.582 A)
CPU 100% (LCD 100%) 8.54 (0.712 A) 7.00 (0.583 A)
CPU Idle (LCD 100%) 7.89 (0.657 A) 6.66 (0.555 A)
CPU Idle (LCD 50%) 6.12 (0.510 A) 4.48 (0.373 A)
CPU Idle (LCD 0%) 4.79 (0.399 A) 3.48 (0.290 A)
CPU Idle (LCD 0%), LCD 3.3V off 3.98 (0.332 A) 2.92 (0.243 A)
CPU Idle (LCD 0%), LCD 3.3V off, Ethernet PHY in reset 3.76 (0.313 A) 2.52 (0.210 A)
CPU Idle (LCD 100%) + CPU Ethernet 8.1 (0.675 A) 6.79 (0.566 A)
CPU Idle (LCD 100%) + USB Ethernet 8.78 (0.731 A) 6.95 (0.579 A)

This test is using the TS-4900 1000MHz Quad core with eMMC, RTC, and WIFI.

TS-4900-2048-4096F-Q10S-RTC-WIFI-E + TS-8390
Test Max (W) Average (W)
CPU 100% + GPU loaded (LCD 100%) 13.49 (1.124 A) 10.75 (0.896 A)
CPU 100% (LCD 100%) 12.30 (1.025 A) 9.88 (0.823 A)
CPU Idle (LCD 100%) 8.26 (0.688 A) 6.50 (0.542 A)
CPU Idle (LCD 50%) 6.05 (0.504 A) 4.48 (0.373 A)
CPU Idle (LCD 0%) 5.01 (0.424 A) 3.48 (0.290 A)
CPU Idle (LCD 0%), LCD 3.3V off 4.64 (0.387 A) 2.95 (0.246 A)
CPU Idle (LCD 0%), LCD 3.3V off, Ethernet PHY in reset 4.20 (0.350 A) 2.56 (0.213 A)
CPU Idle (LCD 100%) + Hosting WIFI AP (0 clients) 9.06 (0.755 A) 7.07 (0.589 A)
CPU Idle (LCD 100%) + CPU Ethernet 8.54 (0.712 A) 6.58 (0.548 A)
CPU Idle (LCD 100%) + USB Ethernet 8.47 (0.706 A) 7.07 (0.589 A)

13.15 RTC

We include the Intersil ISL12020 RTC onboard. This provides a long RTC battery life, as well as a built in temperature sensor to provide +- 5ppm across -40 to 85C. This is /dev/rtc0 in our images, and is accessed using the standard hwclock command.

13.16 USB

13.16.1 USB OTG

Depending on which baseboard the TS-4900 is used with, the OTG port may be usable as host, or it may be brought out to a MicroAB port allowing it to be host or device. Several devices are compiled into the default kernel. Additional devices can be compiled into the kernel by following the section here.

USB Serial

modprobe g_serial use_acm=1

This will create a /dev/ttyGS0. See the kernel documentation for more information:

USB Ethernet

modprobe g_ether

This provides a usb0 network interface which simulates an ethernet network connection between the host pc and the i.MX6.

13.16.2 USB Host

The TS-4900 provides a standard USB 2.0 host supporting 480Mb/s. Typically this is interfaced with by using standard Linux drivers, but low level USB communication is possible using libusb.

Many of our off the shelf baseboards provide a GPIO to toggle power to USB devices. This can be used to save power, or to reset USB devices that get stuck in a bad state.

# Power disabled
echo 1 > /sys/class/leds/en-usb-5v/brightness
sleep 2 # let any devices reset
# Enable power
echo 0 > /sys/class/leds/en-usb-5v/brightness
Note: The USB OTG which can act as a host does not always use the same controllable 5V supply. Refer to the schematic's EN_USB_5V/USB_5V for more information on this control.

13.17 SPI

The CPU has 2 SPI controllers which are accessible through either specific kernel drivers, or userspace using the /dev/spi interface. To utilize SPI, most projects will end up with a customized device tree, so setting up the kernel build environment will be necessary. See the kernel compile guide here for more details.

Open the baseboard dts from arch/arm/boot/dts/imx6qdl-ts4900-<baseboardid>.dtsi, or the generic imx6qdl-ts4900.dtsi. The kernel requires a spidev device be added to the relevant ECSPI controller. For example:

&ecspi2 {
	fsl,spi-num-chipselects = <2>;
	cs-gpios = <&gpio6 2 0>, <&gpio5 29 0>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_ecspi2>;
	status = "okay";
 
	serial1: max3100-1@0 {
		compatible = "max3100-ts";
		reg = <0>;
		interrupt-parent = <&gpio1>;
		interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
		spi-max-frequency = <10000000>;
		loopback = <0>;
		crystal = <1>;
		poll-time = <100>;
	};
 
	spidev: spi@1 {
		compatible = "spidev";
		reg = <1>;
		spi-max-frequency = <25000000>;
	};
};

In this case ecspi2 is configured with a spidev at 25MHz which will be available at /dev/spidev1.1 (<bus counting from 0>.<chipselect>). This example adds the spidev device for the offboard chip select. You can add any CPU GPIO as chip selects, but they should have a pullup added so they are not asserted by default. See the "pinctrl_ecspi2" definition which sets up the other pins as 0x100b1. The line "reg = <1>;" must be declared to select which chip select in the "cs-gpios" array will be asserted when communicating to your device. After this is configured rebuild the kernel and install your new device tree.

Once you have a /dev/spidev device, you can open this file and use the standard Linux SPI API. For more information see the documentation and sample code:

13.18 TWI

The i.MX6 supports standard I2C at 100khz, or using fast mode for 400khz operation. The CPU has 2 I2C buses used on the TS-4900.

I2C 1 is internal to the TS-4900 and connects to the RTC and FPGA.

Address Device
0x28-0x2f #FPGA
0x57 #NVRAM
0x6f #RTC

The second I2C bus is brought out on CN2_28 (SCL) and CN2_30 (SDA). This bus has no devices except those added by the baseboard.

Note: It is also possible to request the kernel to bitbang additional I2C buses as needed. See an example here.

The kernel makes the I2C available at /dev/i2c-#. You can use the i2c-tools (i2cdetect, i2cget, i2cset), or you can write your own client.

13.19 Watchdog

The kernel provides an interface to the watchdog driver at /dev/watchdog. Refer to the kernel documentation for more information:

13.20 WIFI

This board includes a TiWi-BLE SDIO module that uses the Texas Instruments WL1271L Transceiver. Linux provides support for this using the wl12xx driver. See the LSR site for detailed product information.

Summary Features:

  • IEEE 802.11 b/g/n
  • 2.4GHz
  • Linux drivers include support for client and AP mode
  • Industrial temp, -40 to 85C
  • Certifications
    • FCC Bluetooth® Grant
    • FCC WLAN Grant
    • IC
    • CE
    • SAR Testing
    • SAR Testing EU

Linux uses the "wireless-tools", "wpa-supplicant", and "hostapd" packages to support most of the functionality in this module. Refer to the distribution support for #Yocto, #Debian, or #Android for more information.

14 External Interfaces

14.1 7-inch Display

The 7" display is an Okaya RV800480T-7X0WP-A3 (datasheet). Features include:

  • 800x480 Resolution
  • 800nits Brightness
  • Integrated Resistive Touch

The Linux operating systems we provide includes drivers for the framebuffer device and X11 support. See the #QT Creator Hello World section for a simple example of creating a graphical interface.

14.1.1 Backlight

The backlight is controlled through the sysfs in /sys/class/backlight/backlight_lcd.27/. This allows 8 levels of brightness:

# Turn off backlight
echo 0 > /sys/class/backlight/backlight_lcd.27/brightness
 
# Backlight on low intensity
echo 3 > /sys/class/backlight/backlight_lcd.27/brightness
 
# Backlight on full intensity
echo 8 > /sys/class/backlight/backlight_lcd.27/brightness

14.1.2 Touchscreen

The touchscreen uses the TI ADS7843 resistive touch controller. The driver provides a /dev/input/event* device which evdev can use from X11 in the default distribution, or lower level apis like SDL or DirectFB can interact with directly. The default Yocto distribution ships with X11 calibration data already in /etc/pointercal or /usr/share/X11/xorg.conf.d/99-calibration.conf for other distributions.

14.2 ADC Header

The Microchip MCP3428 analog to digital converter consists of a 4-channel 16 bit sigma-delta converter and two, 2-channel analog switches. The ADC can be configured to 240hz 12-bit, 60hz 14-bit, or 15hz 16-bit samples. These are configured to allow input and conversion on two differential channels and 4 single ended channels. The 6-channel Analog to Digital signals are contained on connector HD5 which is a 16 pin (2x8) 0.1" spacing header. The connector layout and the signals carried by each pin are defined below. The input range for the differential input channels is 0- 2 VDC, and the input range on the single-ended channel is nominally 0-10 VDC.

Pinout Header
Pin Type Signal
1 Single ended Channel 6
2 N/A GND
3 Single ended Channel 5
4 N/A GND
5 Single ended Channel 4
6 N/A GND
7 Single ended Channel 3
8 N/A GND
9 N/A Not connected
10 N/A GND
11 Differential Channel 2-
12 Differential Channel 2+
13 N/A GND
14 Differential Channel 1-
15 Differential Channel 1+
16 N/A GND
TS-8390-ADC.png

The TS-4900 has example code for reading the ADC in the ts4900-utils git. https://github.com/embeddedarm/ts4900-utils/blob/master/src/adc8390.c

This command will configure the ADC to 16-bit samples (15sps) and dump all of the channels:

# adc8390 -r
adc0=409
adc1=52
adc2=0.000
adc3=0.000
adc4=3.360
adc5=2.742

14.3 Expansion Header

The Expansion header is a 0.1" pitch 2x10 header.

DIO Header Pinout
Pin Description
1 ttymxc3 RS232 RX
2 ttyMAX1 RS485-
3 ttymxc0 RS232 RX [1]
4 ttyMAX1 RS485+
5 ttymxc0 RS232 TX [1]
6 ttymxc3 RS232 TX
7 CAN2_H
8 CAN2_L
9 ttymxc4 RS232 RX
10 ttyMAX2 RS232 TX
11 Not supported with the TS-4900
12 ttymxc4 RS232 TX
13 Not supported with the TS-4900
14 ttyMAX RS485-
15 5V
16 ttyMAX0 RS485+
17 CAN_H
18 CAN_L
19 VIN
20 VIN
TS-8390-Expansion.png
  1. 1.0 1.1 If the console enable jumper is on, this is console (ttymxc0). IF the jumper is off, this is ttymxc2

14.4 DIO Header

The DIO header is a 0.1" pitch 2x40 header.

DIO Header Pinout
Pin Description
1 NC
2 NC
3 Ground
4 NC
5 /dev/ttyMAX2_RXD (RS232)
6 NC
7 TTL ttymxc0
8 TTL ttymxc0
9 ECSPI2 MISO
10 3.3V Supply
11 ECSPI2 CS2#
12 ECSPI2 MOSI
13 ECSPI2 CS1#
14 ECSPI2 CLK#
15 5V
16 EXT_RESET# [1]
17 GPIO 147 (CSI0_MCLK) Output only
18 Ground
19 GPIO 73 (EIM_DA9) Output only
20 GPIO 59 (EIM_LBA) Output only
21 GPIO 49 (EIM_A21) Input only
22 GPIO 55 (EIM_CS0) Output only
23 GPIO 255 (FPGA CN1-73) Input only
24 GPIO 61 (EIM_EB1) Output only
25 GPIO 128 (EIM_WAIT) Input only
26 GPIO 48 (EIM_A22) Output only
27 GPIO 226 (FPGA CN1-87) Input only
28 GPIO 166 (EIM_A23) Output only
29 GPIO 50 (EIM_A20) Input only
30 GPIO 132 (EIM_A24) Output only
31 GPIO 101 (GPIO_19) Input only
32 GPIO 47 (SD4_DAT7) Input only
33 GPIO 163 (CSI0_DAT17) Input only
34 GPIO 203 (GPIO_16) Input only
35 GPIO 72 (EIM_DA8) Output only
36 GPIO 200 (SD3_RST) Input only
37 I2C2_DAT
38 GPIO 204 (GPIO_17) Input only
39 I2C2_CLK
40 GPIO 146 (CSI0_PIXCLK) Input only
TS-8390-DIO.png
  1. Pull low to reset the CPU. Do not drive high (use open drain).

14.5 Ethernet Ports

The TS-8390 includes 2x 10/100 Ethernet ports. The CPU #Ethernet (eth0) is next to the 3.5mm Audio Port. The second ethernet (eth1) is added through the USB SMSC LAN9514 chip using the smsc95xx driver. See the #Configuring the Network section for more information on using these ports in Linux.

TS-8390 Ethernet.jpg

14.6 3.5mm Audio

The TS-8390 includes a 3.5mm audio jack which can be used instead of the speaker by turning off the speaker GPIO.

# Use 3.5mm output and disable speaker
echo 0 > /sys/class/leds/en-speaker/brightness
 
# Use the speaker and disable 3.5mm output
echo 255 > /sys/class/leds/en-speaker/brightness

14.7 Speaker

The TS-8390 includes a small speaker capable of 82dBA (100mW). This is accessed in most typical applications using the alsa software interface.

14.8 USB Ports

The TS-TPC-8390 includes 2 USB Type A ports on the edge of the board labelled J8. There are also 2 standard 5-pin USB headers. These can be connected to USB adapters such as the CB-USB-AF5P which allow for simple mounting in custom enclosures.

CB-USB-AF5P
Signals Pin Layout
Pin Signal
1 5V
2 USB -
3 USB +
4 GND
5 Frame

TS-8390-USB.png

14.9 COM1 Header

The COM1 header is a 2x5 0.1" pitch header with RS232, RS485, and CAN. These follow a different pin layout which corresponds with a standard 10 pin header standard for UARTs. The RC-DB9 is available to convert these ports to a DB9.

Pin Description
1 ttyMAX0 RS485+
2 ttymxc0 RS232 RX
3 ttymxc0 RS232 TX
4 CAN_H
5 Ground
6 ttyMAX0 RS485-
7 ttymxc3 RS232 TX
8 ttymxc3 RS232 RX
9 CAN_L
10 Not connected
TS-8390-COM1.png
Note: ttymxc2 can be replaced with the console ttymxc0 by setting the "Console Enable" jumper.

14.10 COM2 Header

The COM2 header is a 2x5 0.1" pitch header with RS232 and RS485. These follow a different pin layout which corresponds with a standard 10 pin header standard for UARTs. The RC-DB9 is available to convert these ports to a DB9.

Pin Description
1 ttyMAX1 RS485+
2 ttymxc4 RS232 RX
3 ttymxc4 RS232 TX
4 Not supported on the TS-4900
5 Ground
6 ttyMAX1 RS485-
7 ttyMAX2 RS232 TXD
8 ttyMAX2 RS232 RXD
9 Not supported on the TS-4900
10 Not connected
TS-8390-COM2.png

14.11 Power Connector

This board uses a 2 pin removable terminal block for power. The board will ship with this terminal block installed, but the mating part is from OST "OSTTH020100".

15 Revisions and Changes

15.1 TS-4900 Errata

Errata Description Fix/workaround.
PHY violates IEEE specification for jitter

The TS-4900 PHY's published errata here includes items added on 07-26-16 for "1000BASE-T Transmitter Jitter fails to meet IEEE compliance specification" and "1000BASE-T Transmitter Distortion fails to meet IEEE compliance specification". Both errata can cause linking issues, and the Jitter related errata can cause packet loss with some link partners at 1000Base-T.

Change out the link partner on the other end of the network cable. If the PHY in the linked device meets or exceeds the IEEE specs it will compensate for the errata of the PHY on the TS-4900. Alternatively reducing the ethernet speed to 100BASE-T should resolve the issue.

15.2 TS-4900 PCB Revisions

Revision Changes
A
  • Initial Release
B Not released
C
  • Parts moved away from mounting holes
  • U4-K23(EIM_EB1) and U4 H21(DIO_10) swapped for offboard EIM Bus.
  • 5 LVDS pairs added to CN2 in reserved pins
  • CPU JTAG removed from CN2 for LVDS pairs
    • Available on testpoints
  • Audio MCLK changed to CN2-54
  • Add PU resistor on PHY reset
  • FET clamp for 3.3V
  • FET switch for RTC power
  • Added bias resister for PCIe clock
  • CN2 DIO same as REV A except:
    • CN2_56 is CSI0_DAT17, REV A was GPIO_5
    • CN2_58 is SD4_DAT7, REV A was GPIO_6
    • CN2_60 is SD3_RST, REV A was GPIO_9
  • CPU pin A20 (SD4_DAT3) is strapped low to indicate new revision.
  • CTS/RTS both connected to FPGA so a uart with full control signals can be routed to bluetooth.
D
  • Moved components to create a clearance of 4.2mm around the CPU for the heatsink
  • Changed eMMC to 153 ball version to fit larger eMMC disks
  • Added EIM Byte Enable signal to CN1 pin 22 based on build option.
  • FPGA ball P4 is now used to enable SD card 3.3V power.
  • Allow FPGA_SPI_CS# to be biased with new resistor for OTP modes
  • FPGA_SPI_CS# is now brought out to CN2_34 which was previously a no connect.
  • i.MX6 ball L6 is connected to ground to detect the new revision. U-boot includes the PCB revision as a variable.

15.3 TS-8390 PCB Revisions

Revision Changes
A
  • Initial Release
B
C
  • Fix for SGTL5000 VCC ramp rate which can lead to rare i2c latchup condition. A mod is available for older boards to prevent this as well.
D
  • Added gigabit capable ethernet port for CPU ethernet. This is intended for the TS-4900/TS-47470 and will not affect 10/100 only capable CPUs.
  • USB OTG under speaker populated by default

15.4 U-Boot Changelog

U-boot release date Changes
Jul-22-2014
  • Initial Release
Sep-24-2014
  • Instead of pressing any key during startup, now it requires Ctrl+C. This is to prevent any serial noise from stopping the board in u-boot.
  • The board will now attempt to load /boot/boot.ub before continuing. This is intended for booting environments like QNX, android, and more that cannot use the standard boot arguments.
Nov-06-2014
  • Updated ddr calibration for new build (TS-4900 solo 800MHz industrial temp 1GB RAM)
  • Enabled usb 5V by default for usb boot mechanism
Nov-19-2014
  • Updated to U-boot 2014.10 (from 2013.10)
    • Functionally the same
    • Included android boot image support
    • Included fastboot support
    • SATA boot fixes
Dec-01-2014
  • Added bbdetect command to 2014.10
Dec-05-2014
  • Ignored RPCERRORs from the UMNTALL RPC call after an NFS transaction. Not all nfs servers implement this and it should not invalidate the file transfer since it is just for state tracking on the server.
Jan-26-2014
  • Fixed USB 5V reset timing for boards with hubs. USB 5V is now disabled 500ms after OFF_BD_RESET is disabled. On older revs USB may not detect some peripherals if the USB 5V comes up before the hub is out of reset.
  • Added "rcause" variable. This lets u-boot scripts make use of the reset cause in scripts. For example, if rcause is "POR" in the field, it may have experienced a brownout and an alternate kernel/os could be booted instead. If rcause is "WDOG" then either a reset or watchdog condition caused the reset.
  • New "model" variable with "4900" or "7970", etc. This is so common usb blasters can be used and determine the model.
  • new "rev" variable including "A" or "C". This is also now printed at startup.
Jan-29-2014
  • Included updates for REV C boards
    • If I2C locks up, reset RTC FET for rare lockup.
  • U-boot networking speed limited to 100Mb/s by default. Gigabit requires about 5 seconds to autonegotiate. 10/100Mb/s requires ~500ms. The common case being NFS booting which requires a 3-4MB kernel, 300kb of device tree, 100kb of fpga binary, gigabit only slows down booting. This does not disable gigabit for Linux.
Mar-12-2014
  • Fixed typo in RTC FET workaround
  • Added EXT4 and FAT write support for Ubuntu Snappy Core
Jul-27-2015
  • Added fix for PCIe hang in Linux. Some of the GPR1 regs were not being reset after a reboot. U-boot will now reset these before going into Linux. This hang was not present on all CPUs, usually solo, and only if PCIe is enabled in the kernel.
Oct-07-2015
  • Corrected ice40 SPI MODE used during programming
Oct-14-2015
  • Added eth1addr mac address variable
    • Added smsc95xx.macaddr=${eth1addr} to the default cmdline
    • To use the new MAC address for the USB Ethernet on some carrier boards you need the latest kernel as of today to include this patch.
  • Added sataboot command in default environment. Must be called manually or put in bootcmd to be used.
Dec-14-2015
  • Offboard SPI chip select is no longer asserted during FPGA programming.
Dec-21-2015
  • Increased drive strength for the Ethernet signals
  • Removed smsx95xx parameter and switched to u-boot's device tree fixup to set mac for the second ethernet. This requires this u-boot and at least this kernel revision.
Mar-08-2016
  • Added REV D detection (not required for REV D support, just reporting).
  • Improved I2C lockup recovery on startup.
Apr-05-2016
  • Added bmode command
May-18-2016
  • Improved FPGA programming reliability on new chips
  • Shortened NFS timeout
  • Made the nfs command not care about nfs mount/umount errors. This is optional in NFS and should not matter in u-boot. On our test servers (solaris and linux) this makes NFS much faster since we don't wait for a timeout after every single nfs command blocking on a nonexistent mount reply.
Oct-19-2016
  • Added simple POST test. This is not enabled by default so there is no behavior change unless the "post" command is called.
Apr-27-2017
  • Fixed USB OTG port's host mode
Mar-26-2017
  • Add support for SST26VF064BA, and IS25LP064A spi flashes

15.5 FPGA Changelog

The FPGA is stored in /boot/ts4900-fpga.bin on most images. The latest software releases will include the latest FPGA, but older images can be updated if the md5sum matches an outdated bitstream.

Release md5sum Changes
ts4900-fpga-20140924.bin d400e6c7806998e0f1b6cceb0fec022b
  • Initial Release
ts4900-fpga-20150326.bin 630a108d8c1af527101ee6559949b761
  • Register map changed significantly
    • GPIO are the same
    • specific registers for redirecting certain pins have been removed in favor of the crossbar
  • Added crossbar so most FPGA pins can be mapped to almost any other FPGA pin.
  • implemented MAX3100 SPI uart in the FPGA to add one more uart.
  • Updated mapping for REV C boards.
ts4900-fpga-20150603.bin 75d5ef9653662dca96e2813de2804387
  • Includes 3 MAX3100 based UARTs
  • Fixed ttymxc3 RXD crossbar value
    • Work around this with older bitstreams by running "tshwctl --addr 3 --poke 0x50"
ts4900-fpga-20150930.bin bf93c03ef914cf008287c8cd60781cc8
  • Corrected CTS/RTS polarity in the MAX3100 UART
  • Corrected flipped CTS/RTS on the CPU uart for bluetooth
ts4900-fpga-20170510.bin 86c7c3d7fb9c607af1ef55e1222b4416
  • Fixed TXEN on CPU UARTs not correctly asserting in some multi-byte transmits

15.6 Software Images

15.6.1 Yocto Changelog

Quad/Dual Image Solo/Duallite Image Changes
ts-x11-image-ts4900-quad-20140905235640.rootfs.tar.bz2 ts-x11-image-ts4900-solo-20140908160116.rootfs.tar.bz2
  • Initial Release
ts-x11-image-ts4900-quad-20141119190447.rootfs.tar.bz2 ts-x11-image-ts4900-solo-20141119204157.rootfs.tar.bz2
  • Systemd default
  • Added /usr/lib/openssh/sftp-server (Fixes QtCreator/Eclipse deploy)
  • Added QtQuick
  • Added Sqlite to QT
  • Added early TS-7970 support.
  • Updated kernel with significant fixes, see github for more information.
ts-x11-image-ts4900-quad-20141224171440.rootfs.tar.bz2 ts-x11-image-ts4900-solo-20141224175107.rootfs.tar.bz2
  • Updated Kernel
    • Fixed ISL RTC errors hardware builds that omit the RTC
    • Fixed I2C bus for 8390 ADC
    • Added small pop fix for sgtl5000 on the 8390
  • Updated ts4900-utils
    • New util 8390adc for reading the low speed MCP ADC
    • Fixed tshwctl to support auto TX-EN RS485 on ttymxc1
ts-x11-image-ts4900-quad-20150331224909.rootfs.tar.bz2 ts-x11-image-ts4900-solo-20150401003538.rootfs.tar.bz2
  • Updated to 3.10.53 kernel
    • Significant fixes to GPU, UARTs, CAN and more.
    • Added TS-TPC-8950 support
    • Fixed 7" twinkling pixels on TS-8390 w/solo
    • Included splash screen
  • Updated to Yocto Dizzy for new freescale GPU support
  • Added Chromium to default image (google-chrome)
  • Updated toolchain to match dizzy image
  • Included gstreamer in the image
  • Updated FPGA with crossbar, max3100 based spi uart, bluetooth fixes (REV C only)
ts-x11-image-ts4900-quad-20150527173205.rootfs.tar.bz2 ts-x11-image-ts4900-solo-20150528210615.rootfs.tar.bz2
  • Fixed networkd
  • Enabled PCIe in default kernel
    • Added I210 support for TS-7970
ts-x11-image-ts4900-quad-20150620060219.rootfs.tar.bz2 ts-x11-image-ts4900-solo-20150622150127.rootfs.tar.bz2
  • Added TS-7970 support
ts-x11-image-tsimx6-20150821190815.rootfs.tar.bz2
  • Updated to Yocto Fido
    • Removed GTK3 packages to reduce image size (GTK2 still available)
    • Removed distcc from default environment
    • Includes QT 5.4.3
    • Included qtmultimedia, xcursor-transparent theme
  • Updated Kernel
    • Includes fix for rare screen flip issues
ts-x11-image-tsimx6-20150821190815.rootfs.tar.bz2
  • Included significantly fixed support for the TS-7970
    • I210 support is fixed, but some prototype boards will need to be RMA'd to get MACs assigned.
    • All UARTs are now working
    • Included tsmicroctl for reading the silabs ADC (p10-12 4-20mA included)
    • Included load_fpga for software reloading fpgas later after boot
  • Updated TS-4900 FPGA to have CTS/RTS fixed for bluetooth, and corrected CTS/RTS polarity on the max3100s
ts-x11-image-tsimx6-20151014183028.rootfs.tar.bz2
  • Corrected defconfig used in kernel
    • Fixed WIFI and other modules
  • If used with the u-boot release from 10-14-2015 this fixes the mac address for the smsc95xx
ts-x11-image-tsimx6-20151221232637.rootfs.tar.bz2
  • Fixed MAC address to use device tree as well as parameter for the latest u-boot support.
  • Fixed tsgpio driver which was causing some incorrect DIO sets.
    • The WIFI driver uses tsgpio for toggling the enable which also corrects the behavior of ifdown/ifup wlan0.
  • Added rsync and lighttpd-cgi support
ts-x11-image-tsimx6-20160512161729.rootfs.tar.bz2
  • Added 100kohm pullups to the onboard/offboard SPI chip selects.
ts-x11-image-tsimx6-20161116215413.rootfs.tar.bz2
  • Updated to Yocto Jethro
  • Updates to QT 5.5
  • Updated to 4.1.15 based on Freescale/NXP's imx_4.1.15_1.0.0_ga.
  • Added improved support for TS-TPC-7990
  • New tshwctl with crossbar support.
ts-x11-image-tsimx6-20170301225516.rootfs.tar.bz2
  • Updated to Yocto Morty 2.2.1 with the same imx_4.1.15_1.0.0_ga kernel
  • Includes QT 5.7.1
  • Included additional alsa utilities
ts-x11-image-tsimx6-20170731205110.rootfs.tar.bz2
  • Updated to Morty 2.2.2
  • Included QT Quick 1.x/2.x support
  • Added support for TS-TPC-7990 REV C in kernel and ts4900-utils
  • Updated kernel
    • Fixed issue with ttyMAX* UARTs losing data or requiring the user to transmit before it continues to receive again
    • Fixed issue with ttyMAX* loopbacks dropping the first character
    • Added wilc3000 support for TS-TPC-7990 REV C WIFI
ts-x11-image-tsimx6-20180502184622.rootfs.tar.bz2
  • Updated to Yocto Morty 2.2.3
  • Add support for SST26VF064BA, and IS25LP064A spi flashes
  • Fixed TS-TPC-7990 REV C WIFI
ts-x11-image-tsimx6-20180608232731.rootfs.tar.bz2
  • Added support for accelerated gstreamer playback

15.6.2 Android Changelog

Image Changes
android-4.4.3-20150428.dd.bz2
  • Initial Release
android-4.4.3-20150629.dd.bz2
  • Fixed Bluetooth
  • Fixed WIFI
  • Added udhcpc on both ethernet ports
  • Image ships rooted
  • Update to 7.1.1
  • Added support for TS-7970, TS-TPC-7990
  • Split into two images, one for TI WIFI (TS-4900/TS-7970), one for Atmel WIFI (TS-TPC-7990)
android-7.1.1-tsimx6-tiwifi-20170831.dd.bz2
  • Fixed TS-TPC-8950 carrier board touchscreen calibration

15.6.3 Debian Changelog

Image Changes
debian-armhf-wheezy-20140929.tar.bz2
  • Initial Release
debian-armhf-wheezy-20141125.tar.bz2
  • Updated kernel with significant fixes, see github for more information.
  • Included first TS-7970 FPGA
debian-armhf-jessie-20160825.tar.bz2
  • New kernel - 3.10.53 (from freescale's 3.10.53_1.1.0_ga) instead of 3.10.17.
    • Fixed CAN dropped frames (just under 1% of frames were dropped on 3.10.17)
    • Fixed reported UART RX fifo overflows
    • GPU fixes
    • Kernel includes compiled in splash screen for quick graphical response on boot
  • TS-TPC-8950 support added
  • New FPGA (crossbar added, bluetooth fixed, and max3100 implemented)
  • Added bluez, wireless-tools, usbutils, nfs-common, and pciutils into the image.
  • Added Openssh server (generates on first boot)
debian-armhf-jessie-20150526.tar.bz2
  • First update to Debian Jessie
debian-armhf-jessie-20151008.tar.bz2
  • Included kernel support for TS-7970 REV A
  • Updated to latest TS-4900 FPGA (20150603)
  • Included openssh, generates keys on first boot. Remove /etc/ssh/*key* to regenerate.
  • Included latest ts4900-utils with TS-7970 support.
debian-armhf-jessie-20160512.tar.bz2
  • Fixed TS-7970 ttyMAX uarts (requires FPGA update)
  • Fixed resolv.conf symlink to use resolvd
  • Updated to 3.14.52 kernel
  • Corrected TS-TPC-8950 calibration
debian-armhf-jessie-20160512.tar.bz2
  • Moved to 4.1.15 kernel
  • Updated Debian to latest Jessie changes
  • Added latest ts4900-utils with improved TS-TPC-7990 support.
debian-armhf-jessie-20170123.tar.bz2
  • Added support for TS-7970 REV D hardware
  • Added support for TS-7990 REV B hardware
debian-armhf-jessie-20170306.tar.bz2
  • Fixed resolv.conf symlink
  • Added nfs-common
  • Cleaned up old temporary files
debian-armhf-jessie-20170327.tar.bz2
  • Fixed regression in TS-TPC-8950 support
  • Adds root.version to list image date
debian-armhf-jessie-20170419.tar.bz2
  • Fixed issue of missing U-boot splash screen disabling the backlight on REV B boards.
  • Fixed potential issue with WIFI not being recognized.
  • Added support for #TS-DC799-SILO board.
debian-armhf-jessie-20170731.tar.bz2
  • Added support for TS-TPC-7990 REV C in kernel and ts4900-utils
  • Updated kernel
    • Fixed issue with ttyMAX* UARTs losing data or requiring the user to transmit before it continues to receive again
    • Fixed issue with ttyMAX* loopbacks dropping the first character
    • Added wilc3000 support for TS-TPC-7990 REV C WIFI
debian-armhf-stretch-20180412.tar.bz2
  • Add support for SST26VF064BA, and IS25LP064A spi flashes
  • Initial port to Debian Stretch
debian-armhf-stretch-20180501.tar.bz2
  • Added support for TS-MINI-ADC
debian-armhf-stretch-20181016.tar.bz2
  • Updated kernel to support the offboard SPI Chip select on TS-7990 REV C.

15.6.4 Arch Linux Changelog

Image Changes
arch-armhf-20140929.tar.gz Initial Release

15.7 Product Change Notices

15.7.1 SPI Flash Vendor Change

Due to an EOL the SPI flash on this product is changing. The old part is a Micron N25Q064A13ESE40F. Two new parts were qualified to reduce the impact of any potential EOL in the future. The new parts are the Microchip's SST26VF064BA, and ISSI's IS25LP064A.

Most applications will not be affected by this change unless they are manually accessing /dev/mtdblock0 or creating a custom U-Boot. In those cases some updates will be required.

Linux Kernel Changes

Rebuilding the latest kernel in our git will include these changes, but the specific commits for our various kernel branches are:

U-Boot Changes

These two patches are required for the new flash:

Images with support

Any of our Linux images after March 7th, 2018 include support for this new SPI flash.

16 Product Notes

16.1 FCC Advisory

This equipment generates, uses, and can radiate radio frequency energy and if not installed and used properly (that is, in strict accordance with the manufacturer's instructions), may cause interference to radio and television reception. It has been type tested and found to comply with the limits for a Class A digital device in accordance with the specifications in Part 15 of FCC Rules, which are designed to provide reasonable protection against such interference when operated in a commercial environment. Operation of this equipment in a residential area is likely to cause interference, in which case the owner will be required to correct the interference at his own expense.

If this equipment does cause interference, which can be determined by turning the unit on and off, the user is encouraged to try the following measures to correct the interference:

Reorient the receiving antenna. Relocate the unit with respect to the receiver. Plug the unit into a different outlet so that the unit and receiver are on different branch circuits. Ensure that mounting screws and connector attachment screws are tightly secured. Ensure that good quality, shielded, and grounded cables are used for all data communications. If necessary, the user should consult the dealer or an experienced radio/television technician for additional suggestions. The following booklets prepared by the Federal Communications Commission (FCC) may also prove helpful:

How to Identify and Resolve Radio-TV Interference Problems (Stock No. 004-000-000345-4) Interface Handbook (Stock No. 004-000-004505-7) These booklets may be purchased from the Superintendent of Documents, U.S. Government Printing Office, Washington, DC 20402.

16.2 Limited Warranty

Technologic Systems warrants this product to be free of defects in material and workmanship for a period of one year from date of purchase. During this warranty period Technologic Systems will repair or replace the defective unit in accordance with the following process:

A copy of the original invoice must be included when returning the defective unit to Technologic Systems, Inc. This limited warranty does not cover damages resulting from lightning or other power surges, misuse, abuse, abnormal conditions of operation, or attempts to alter or modify the function of the product.

This warranty is limited to the repair or replacement of the defective unit. In no event shall Technologic Systems be liable or responsible for any loss or damages, including but not limited to any lost profits, incidental or consequential damages, loss of business, or anticipatory profits arising from the use or inability to use this product.

Repairs made after the expiration of the warranty period are subject to a repair charge and the cost of return shipping. Please, contact Technologic Systems to arrange for any repair service and to obtain repair charge information.