ts-7000
[Top] [All Lists]

[ts-7000] TS-7300 tips and tricks

To:
Subject: [ts-7000] TS-7300 tips and tricks
From: "mario.huizar" <>
Date: Mon, 26 Jul 2010 15:08:46 -0000
Hello everyone.

I just finished configuring my TS-7300 with Ubuntu and I created a wiki page 
where I describe all the steps I had to follow. I just wanted to share it, 
maybe one of you can find it useful...

Ciao!
Mario

My wiki is in:
http://code.google.com/p/lifebridge/wiki/TS7300TipsAndTricks

Here is a copy paste of the wiki:


TS-7300 Tips and Tricks
The following pages shows how to configure the TS-7300 for the most common 
tasks, such as setting the development environment or configuring the SD cards. 
It is a compilation of many hours of surfing through forums, linux tutorials 
and doing trial and error until it worked.
Installing ethernet (static IP) address in TS-7300
http://www.yolinux.com/TUTORIALS/LinuxTutorialNetworking.html
in file /etc/resolv.conf
search ts-local.net
nameserver 10.156.33.53
nameserver 129.187.5.1
nameserver 192.168.0.11
in file /etc/network/interfaces
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.
auto lo
iface lo inet loopback
auto eth0
#iface eth0 inet dhcp
#iface eth0 inet static
#       address 192.168.1.138
#       network 192.168.1.0
#       netmask 255.255.255.0
#       broadcast 192.168.1.255
iface eth0 inet static
        address 129.187.74.226
        network 129.187.0.0
        netmask 255.255.0.0
        broadcast 129.187.74.255
        gateway 129.187.74.254
         
iface eth1 inet dhcp
iface wlan0 inet static
        address 192.168.0.138
        network 192.168.0.0
        netmask 255.255.255.0
        broadcast 192.168.0.255
And finally you need to restart the network on your ARM
/etc/init.d/networking restart
#test your system with a ping to your own...
ping 129.187.74.225
#and with other machine...
ping 129.187.74.225
#You could also use ifconfig to make sure that the setup was correctly installed
ifconfig
#expected output:
eth0      Link encap:Ethernet  HWaddr 00:D0:69:42:7E:05  
          inet addr:129.187.74.226  Bcast:129.187.74.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2693 errors:0 dropped:0 overruns:0 frame:0
          TX packets:96 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:39
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:14 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1064 (1.0 KiB)  TX bytes:1064 (1.0 KiB)
Installing SSH server in TS-7300
Run the following commands on the TS-7300:
#key generation
ssh-keygen -b 1024 -t rsa
#save in /root/key when prompted
cd /etc/ssh
#rename file for backup purposes
mv ssh_host_rsa_key.pub ssh_host_rsa_key.pub.old
mv /root/key ./ssh_host_rsa_key
mv /root/key.pub ./ssh_host_rsa_key.pub
#ready to start server
/etc/init.d/ssh start
#if asked you will need to generate your DSA keys also
ssh-keygen -t dsa -b 1024
Run this in Ubuntu, but adapt the adress:
Places->connect to server...
Service type: SSH
Server: 129.187.74.226
User Name: root
You can also use the command line and have access to the shell in the TS-7300 
from your PC
#ssh connection 
ssh 
Removing not needed programs from startup
More info at: http://www.debuntu.org/how-to-manage-services-with-update-rc.d
Run this command on TS-7300:
#remove apache
update-rc.d -f apache-ssl remove
#remove internet superserver
update-rc.d -f inetd remove
Making the SD card from 521MB to 2GB and installing 2nd SD Card
For making bigger the SD card go and follow this tutorial:
http://www.seiner.com/mediawiki/index.php/Copying_boot_sdcard
These commands are executed with the existing SD card in the default location 
(CPU Side) and the new SD card in the second slot (Altera FPGA side).
Here is the output I got from following the tutorial:
:/# dd if=/dev/sdcard0/disc0/disc of=/dev/sdcard1/disc0/disc bs=1M
dd: writing `/dev/sdcard1/disc0/disc': No space left on device
1887+0 records in
1886+0 records out
1977614336 bytes transferred in 2525.870000 seconds (782944 bytes/sec)
:/# mount
/dev/sdcard0/disc0/part3 on / type ext2 (rw,noatime)
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
:/# fdisk -l
Disk /dev/sdcard1/disc0/disc: 1977 MB, 1977614336 bytes
16 heads, 32 sectors/track, 7544 cylinders
Units = cylinders of 512 * 512 = 262144 bytes
                  Device Boot      Start         End      Blocks   Id  System
/dev/sdcard1/disc0/part1               1           6        1520   da  Non-FS 
data
Partition 1 does not end on cylinder boundary.
/dev/sdcard1/disc0/part2   *           7          10        1024   da  Non-FS 
data
Partition 2 does not end on cylinder boundary.
/dev/sdcard1/disc0/part3              20        1935      490496   83  Linux
Partition 3 does not end on cylinder boundary.
Disk /dev/sdcard1/disc0/part1: 1974 MB, 1974034944 bytes
16 heads, 32 sectors/track, 7530 cylinders
Units = cylinders of 512 * 512 = 262144 bytes
Disk /dev/sdcard1/disc0/part1 doesn't contain a valid partition table
Disk /dev/sdcard0/disc0/disc: 2045 MB, 2045247488 bytes
16 heads, 32 sectors/track, 7802 cylinders
Units = cylinders of 512 * 512 = 262144 bytes
                  Device Boot      Start         End      Blocks   Id  System
/dev/sdcard0/disc0/part1               1           6        1520   da  Non-FS 
data
Partition 1 does not end on cylinder boundary.
/dev/sdcard0/disc0/part2   *           7          10        1024   da  Non-FS 
data
Partition 2 does not end on cylinder boundary.
/dev/sdcard0/disc0/part3              20        1935      490496   83  Linux
Partition 3 does not end on cylinder boundary.
Disk /dev/sdcard0/disc0/part1: 1 MB, 1556480 bytes
16 heads, 32 sectors/track, 5 cylinders
Units = cylinders of 512 * 512 = 262144 bytes
Disk /dev/sdcard0/disc0/part1 doesn't contain a valid partition table
Disk /dev/sdcard0/disc0/part2: 1 MB, 1048576 bytes
16 heads, 32 sectors/track, 4 cylinders
Units = cylinders of 512 * 512 = 262144 bytes
Disk /dev/sdcard0/disc0/part2 doesn't contain a valid partition table
Disk /dev/sdcard0/disc0/part3: 502 MB, 502267904 bytes
16 heads, 32 sectors/track, 1916 cylinders
Units = cylinders of 512 * 512 = 262144 bytes
Disk /dev/sdcard0/disc0/part3 doesn't contain a valid partition table
:/# fdisk /dev/sdcard1/disc0/disc
The number of cylinders for this disk is set to 7544.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/sdcard1/disc0/disc: 1977 MB, 1977614336 bytes
16 heads, 32 sectors/track, 7544 cylinders
Units = cylinders of 512 * 512 = 262144 bytes
                  Device Boot      Start         End      Blocks   Id  System
/dev/sdcard1/disc0/part1               1           6        1520   da  Non-FS 
data
Partition 1 does not end on cylinder boundary.
/dev/sdcard1/disc0/part2   *           7          10        1024   da  Non-FS 
data
Partition 2 does not end on cylinder boundary.
/dev/sdcard1/disc0/part3              20        1935      490496   83  Linux
Partition 3 does not end on cylinder boundary.
Command (m for help): d
Partition number (1-4): 3
Command (m for help): p
Disk /dev/sdcard1/disc0/disc: 1977 MB, 1977614336 bytes
16 heads, 32 sectors/track, 7544 cylinders
Units = cylinders of 512 * 512 = 262144 bytes
                  Device Boot      Start         End      Blocks   Id  System
/dev/sdcard1/disc0/part1               1           6        1520   da  Non-FS 
data
Partition 1 does not end on cylinder boundary.
/dev/sdcard1/disc0/part2   *           7          10        1024   da  Non-FS 
data
Partition 2 does not end on cylinder boundary.
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (11-7544, default 11): 20
Last cylinder or +size or +sizeM or +sizeK (20-7544, default 7544):
Using default value 7544
Command (m for help): p
Disk /dev/sdcard1/disc0/disc: 1977 MB, 1977614336 bytes
16 heads, 32 sectors/track, 7544 cylinders
Units = cylinders of 512 * 512 = 262144 bytes
                  Device Boot      Start         End      Blocks   Id  System
/dev/sdcard1/disc0/part1               1           6        1520   da  Non-FS 
data
Partition 1 does not end on cylinder boundary.
/dev/sdcard1/disc0/part2   *           7          10        1024   da  Non-FS 
data
Partition 2 does not end on cylinder boundary.
/dev/sdcard1/disc0/part3              20        7544     1926400   83  Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
:/# shutdown -r now
Broadcast message from root (pts/0) (Thu Jan  1 01:51:45 1970):
....
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
:root# e2fsck -f /dev/sdcard1/disc0/part3
e2fsck 1.37 (21-Mar-2005)
Pass 1: Checking inodes, blocks, and sizes
Inode 14027, i_blocks is 16, should be 2.  Fix<y>? yes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Block bitmap differences:  -(96919--96925)
Fix<y>? yes
Free blocks count wrong for group #11 (108, counted=115).
Fix<y>? yes
Free blocks count wrong (120519, counted=120526).
Fix<y>? yes
/dev/sdcard1/disc0/part3: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sdcard1/disc0/part3: 15799/120000 files (0.7% non-contiguous), 
369970/490496 blocks
:root# resize2fs /dev/sdcard1/disc0/part3
resize2fs 1.37 (21-Mar-2005)
Resizing the filesystem on /dev/sdcard1/disc0/part3 to 1926400 (1k) blocks.
The filesystem on /dev/sdcard1/disc0/part3 is now 1926400 blocks long.
Installing the Crosscompiler in Ubuntu
go to ftp.embeddedarm.com in the folder 
/ts-arm-sbc/ts-7300-linux/cross-toolchains/ download 
crosstool-linux-gcc-3.3.4-glibc-2.3.2-0.28rc39.tar.bz2 and untar (You could 
also download a more updated gcc-glibc combination but you will need to update 
the linux kernel to 2.6)
For more information about crosstool: http://www.kegel.com/crosstool/
Then (as root) create the directory /opt/crosstool and make it writable by you
sudo mkdir /opt/crosstool
#instead of $USER you should write the name of your user
sudo chown $USER /opt/crosstool
>From the unzipped files copy the folder
../opt/crosstool/gcc-3.3.4-glibc-2.3.2 (the location where you unzipped the 
file)
to /opt/crosstool/ in your filesystem
to test crosstool: see arm-linux-ts72xx.pdf page 35:
This is a mostly a copy paste:
1) Create hello-world.c This can be done with any editor (gedit hello.c)
#include <stdio.h>
int main (void)
{
printf ("Hello World!\n");
return 0;
}
2) Ensure that the Crosstool binaries are in your systems path:
export PATH=$PATH:/opt/crosstool/gcc-3.3.4-glibc-2.3.2/bin
3) Create the hello executable:
arm-linux-gcc -Wall -o hello hello.c
4) Verify that the resulting hello binary is an ARM binary file, using the file 
command:
file hello
5) Run inetd on the SBC: (You could also use SSH to transfer the file to your 
SBC)
inetd
6) Copy over the hello binary to the SBC via ftp:
ftp 192.168.0.50 (be sure to use the IP that matches your setup)
#Log in with user root with no password
#enter "binary" to ensure binary transfers
#enter "put hello"
7) On the SBC, change the permissions of the hello binary to become executable:
cd /root
chmod +x ./hello
8) Run the binary
./hello
Integrating Eclipse with TS7300
For more information: Doug Abbot, Embedded Linux Development Using Eclipse, 
November 2008, Newnes, UK page page 95-103
1.You need to stablish a SSH connection (see above for instructions).
2.You need also to mount your workspace in the TS-7300 with NFS
In order to do that you need first to install a NFS server in Ubuntu
For more information see: http://ubuntuforums.org/showthread.php?t=249889
install the packets: nfs-kernel-server nfs-common portmap. At the terminal type:
sudo apt-get install nfs-kernel-server nfs-common portmap
#When configuring portmap do =not= bind loopback. If you do you can either edit 
#/etc/default/portmap by hand or run:
sudo dpkg-reconfigure portmap
sudo /etc/init.d/portmap restart
Editing /etc/exports
the /etc/exports file is used for creating a share on the NFS server.
sudo gedit /etc/exports
# /etc/exports: the access control list for filesystems which may be exported
#               to NFS clients.  See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes       hostname1(rw,sync,no_subtree_check) 
hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
#
#Here instead of /home/mario/TS7300workspace put the folder where your 
workspace is.
/home/mario/TS7300workspace/TS7300 
*(rw,no_root_squash,no_all_squash,sync,no_subtree_check)
To be sure that the NFS server is working type:
/etc/init.d/nfs-kernel-server status
#after modifying the exports file restart the server:
sudo /etc/init.d/nfs-kernel-server restart
sudo exportfs -a
On the TS-7300 in order to mount the shared folder in a directory:
#mount the workspace folder to /home
mount 129.187.74.225:/home/mario/TS7300workspace/TS7300 /home
If everything went ok, all the contents of your workspace will be reflected on 
the /home directory on the TS7300.
Using gdb and gdbserver to remotely debug
In order to establish a remote debug you need to use gdb and gdbserver. The 
TS-7300 comes already with the gdbserver 6.3 as default. So what we did was a 
sort of crosscompile gdb 6.3 in Ubuntu for an arm-linux target. What you need 
to do is:
1.Download gdb6.3 from gnu: http://www.gnu.org/software/gdb/download/
2.Compile gdb6.3 for an arm-linux target. More info at the readme file of 
gdb6.3 and 
at: http://cplusadd.blogspot.com/2009/05/compiling-and-using-gdb-for-arm-linux.html?showComment=1268154806167_AIe9_BHKHIh43n4Hk3SzmVZAlUgTIgmWwRHWDyGevTm-9VA2ndU1VZFTFzAzj0Yrf72X6XJecCZi-41fisrj2QcWt_MdnFEBpfMZlip0GgL7hIoWbTBdvVhBYWC8yT0rnA94pPxpfUUQfVYMchCObVA6swi8_oy3z_b1TkYJ8WFqMvnTfNvfFGpWw1WZyimN_ri92Fjka5YZ6iQIV5sBNL0LVTvLRZstCS4pIfevrU9oimT14kTP_8HYdZ5TAdx44VDP3A3nCXvB#c1367182892360842713
When you unpack the gdb-6.3.tar.gz file, you'll find a directory
called `gdb-6.3', which contains:
  COPYING       config-ml.in  gdb          ltcf-gcj.sh     readline
  COPYING.LIB   config.guess  gettext.m4   ltconfig        sim
  Makefile.def  config.if     include      ltmain.sh       src-release
  Makefile.in   config.sub    install-sh   md5.sum         symlink-tree
  Makefile.tpl  configure     libiberty    missing         texinfo
  README        configure.in  libtool.m4   mkinstalldirs   ylwrap
  bfd           djunpack.bat  ltcf-c.sh    move-if-change
  config        etc           ltcf-cxx.sh  opcodes
You can build GDB right in the source directory:
      cd gdb-6.3
      ./configure
      make
      cp gdb/gdb /usr/local/bin/gdb     (or wherever you want)
However, we recommend that an empty directory be used instead. This way you do 
not clutter your source tree with binary files and will be able to create 
different builds with different configuration options.
You can build GDB in any empty build directory:
      mkdir build
      cd build
      <full path to your sources>/gdb-6.3/configure
      make
      cp gdb/gdb /usr/local/bin/gdb     (or wherever you want)
Hints: In my case I also needed to install the following packages:
#More info at:http://ubuntuforums.org/showthread.php?t=241707
sudo apt-get install ncurses-base ncurses-bin ncurses-term bison flex 
libncurses5-dev
and I also had to apply a patch to sim/arm/iwmmxt.c file because it was 
displaying some warnings. More info 
at: http://sources.redhat.com/ml/gdb-patches/2005-04/msg00193.html
So this is what I did to compile gdb (PC) ./configure file to set as target an 
arm-linux:
#It is also a good idea to compile the gdb6.3 in a different folder than the 
sources
#see the readme file from gdb6.3 for more information 
(....../gdb-6.3/gdb/Readme)
#First go to the folder where you installed gdb
cd ~/gdb-6.3
#create a subfolder
mkdir ../gdb-arm
cd ../gdb-arm
#more info: http://tech.groups.yahoo.com/group/ts-7000/message/12459
../gdb-6.3/configure --target=arm-linux
make
Now it is a good time to test your gdbserver gdb connection:
#First the server should be started in the  **arm processor** by issuing 
something like:
gdbserver host:10000 hello
#gdbserver host:1234 _executable_
#Where _executable_ is the application that is going to be debugged and 
host:1234 tells
#gdbserver to listen for connections to port 1234.
#To run gdb just type this in a **PC** shell:
#you have to change the location to your gdb in your PC...
#<path>/gdb --se=_executable_
/home/mario/Documents/gdb6.3/gdb-arm/gdb/gdb --se=hello
#To resume execution type 'continue'.
Important: in order to debug you have to be sure to compile your sources with 
the -g option, in the linking and in the compiling phase!!
Setting up Eclipse
Install Eclipse with the CDT plugin (This should not be a problem:D)
Create a new C++ make project with the --Other Toolchain-- option.
Then you have to modify the makefile to fit your project. You can use my 
makefile (you have to change the paths and sources variables):
#CCFLAGS =      -O2 -Wall -g -fmessage-length=0
CCFLAGS =       -Wall -g -o
SOURCES =       hello.c
OBJS =          hello.o
LIBS =
TARGET =        TS7300
CXX := /opt/crosstool/gcc-3.3.4-glibc-2.3.2/bin/arm-linux-g++
CC := /opt/crosstool/gcc-3.3.4-glibc-2.3.2/bin/arm-linux-gcc
$(TARGET):      $(OBJS)
        $(CC) $(CCFLAGS) $(TARGET) $(SOURCES) $(LIBS)
all:    $(TARGET)
clean:
        rm -f $(OBJS) $(TARGET)
Also in Project->Properties->C/C++Build (Discover Option) in the compiler 
invocation command field place your crosscompiler path (in my case):
/opt/crosstool/gcc-3.3.4-glibc-2.3.2/bin/arm-linux-g++
You will be able now to crosscompile in Eclipse.
Now to debug what you need to do is:With the target project selected in the 
Project Explorer view, select Run ?> Debug Configurations . . . and double 
click to create a new C/C++ App configuration
On the Main drop-down menu you have to take care that in the textfield "C/C++ 
Application" is the name of your executable file. In my case:
/home/mario/TS7300workspace/TS7300/hello
Open the Debugger drop-down menu and select gdbserver Debugger. Enter the name 
of your cross gdb in the GDB debugger field.
Click the Connection tab under Debugger Options. Select TCP from the Type 
drop-down and enter the IP address of your target in the Host name or IP 
address field. Click Apply and then Close. GDB is now configured to talk to 
your target board over the network.
Before running the Debug command in eclipse you have to run the command:
gdbserver host:10000 hello
in the TS-7300 board.
And thats it! :D
Note: In order to have a better control of what is happening. It is highly 
advisable to turn on the option of "verbose console mode". You can do this by 
selecting your project, than in the menu choose Run->Debug configurations... Go 
to the Debugger tab, and within this tab go to Debugger options tab, and in the 
Main subtab you will find the "verbose console mode" checkbox.
TIP: If in the console output GDBdebugger complains that cannot find a shared 
library, than what it happens is that you have a library in your TS-73000 but 
in your PC not. Or at least eclipse doesn't know where to find it. So you have 
to tell Eclipse. The way you can do this is by going to Run->Debug 
configurations... Go to the Debugger tab, and within this tab go to Debugger 
options tab, and in the Shared Libraries subtab you have to tell Eclipse where 
your shared libraries are.
Embedded QT
Go to the ftp site of technologic and download QT
m("ftp.embeddedarm.com/ts-arm-sbc/ts-7300-linux/binaries/qt-embedded-free-3.3.4-compiled-full.tar.gz","//anonymous");">ftp:
untar to any folder.
copy the 
~/qt-embedded-free-3.3.4-compiled-full/usr/local/qt-embedded-free-3.3.4 from 
your PC
To your file system in the TS-7300 at /usr/local/qt-embedded-free-3.3.4
After that, setup QT variables and run the examples as follows in your SBC
#go to qt-embedded-free-3.3.4 folder
cd /usr/local/qt-embedded-free-3.3.4
#run the examples as follows:
cd /examples
./hello.run
#Alternatively you could first
#export the variables needed by QT
export QTDIR=/usr/local/qt-embedded-free-3.3.4
export LD_LIBRARY_PATH=/usr/local/qt-embedded-free-3.3.4/lib:$LD_LIBRARY_PATH
#and then run the example
./hello -qws
Crosscompiling QT
More info at: http://tech.groups.yahoo.com/group/ts-7000/message/4286
Download the qt-embedded-free-3.3.4 source from Trolltech web 
site: ftp://ftp.trolltech.no/pub/qt/source/
untar it in your PC. In my case I did it on: 
/home/mario/Apps/Qt/qt-embedded-free-3.3.4
In order to crosscompile you need to first compile QT for your system, the 
reason is because certain tools such as uic run on the host machine and 
therefore have to be built natively. To compile QT for your own system:
enable framebuffer for Ubuntu9.10. Info 
at: http://lab.frontseed.com/tags/framebuffer
Install QT3 (the easiest way is to go to Synaptic and install QT). We have then 
to copy the uic file (it is usually stored at /usr/bin/uic) to the bin folder 
of our qt-embedded-free-3.3.4 source from Trolltech web site at 
~/qt-embedded-free-3.3.4/bin. In another words copy /usr/bin/uic to 
~/qt-embedded-free-3.3.4/bin/uic
Once we copied this file we crosscompile the sources:
cd ~/qt-embedded-free-3.3.4
export QTDIR=~/qt-embedded-free-3.3.4
export LD_LIBRARY_PATH=~/qt-embedded-free-3.3.4/lib:$LD_LIBRARY_PATH
#You may also need to add to your PATH variable the arm-gnu-g++ compiler...
export PATH=$PATH:/opt/crosstool/gcc-3.3.4-glibc-2.3.2/bin
#type ./configure --help to know more info about customization
#-no-cups means no print support
#-DQT_QLOCALE_USES_FCVT is very important!! QT handles float points in a
#way that the ARM doesnt understand, you have to use this define to avoid
#some nasty bugs with functions which use float in QT (richtexts and so on)
./configure -embedded arm -no-ipv6 -no-largefile -no-cups -thread -debug 
-depths 1,4,8,16,32 -DQT_QLOCALE_USES_FCVT
#type yes to accept GNU license
make
#wait between 20 and 30min
Because we are compiling with thread support and this is not a default 
configuration we need to copy our crosscompiled library to our TS-7300. Just 
replace the folders ~/qt-embedded-free-3.3.4/lib and 
~/qt-embedded-free-3.3.4/plugins from your PC to the folder 
/usr/local/qt-embedded-free-3.3.4/lib and 
/usr/local/qt-embedded-free-3.3.4/plugins respectively at your TS-7300.
Now to test your crosscompiler:
1. Create the following hello.cpp file:
#include <qapplication.h>
#include <qlabel.h>
int main(int argc, char *argv[])
{
        QApplication app(argc, argv);
        QLabel *label = new QLabel("Hellasdfasdfo Qt!", 0);
        app.setMainWidget(label);
        label->show();
       
        return app.exec();
}
You will also need to save it in a directory called hello.
>From a command prompt, change directory to hello, then type
qmake -project
to create a platform-independent project file (hello.pro), then type
qmake -spec qws/linux-arm-g++ hello.pro
compile the file with make.
#Remember that you have to have defined the QTDIR directories as follow:
export  PATH=$PATH:/opt/crosstool/gcc-3.3.4-glibc-2.3.2/bin
export  QTDIR=/home/mario/Apps/Qt/qt-embedded-free-3.3.4
export 
 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/mario/Apps/Qt/qt-embedded-free-3.3.4/lib
make
#Note: In order to make your variables persistent you should edit the 
/etc/environment
#file in Ubuntu. More info at: 
https://help.ubuntu.com/community/EnvironmentVariables
it should produce an executable file. You can execute this file in your 
TS-7300. Dont forget to set your QTDIR and LD_LIBRARY_PATH properly before 
running your QT programm!
export QTDIR=/usr/local/qt-embedded-free-3.3.4
export LD_LIBRARY_PATH=/usr/local/qt-embedded-free-3.3.4/lib:$LD_LIBRARY_PATH
./hello -qws
CAN on TS-ENC730
There is a CAN controller implemented on the FPGA (SJA1000 from Philips). The 
physical layer is implemented on the TS-732 board.
References: ts-enc730-manual.pdf, ts-can1-manual (version jun 2009)
Go to the ftp site of technologic 
(m("ftp.embeddedarm.com/pc104-peripherals/ts-can1/ts-72xx-linuxr24","//anonymous");">ftp:)
 and download oceralincan_arm.tar.gz and lincan_arm.tar.gz
We need to donwload also the lincan driver for the ts-732 at the ftp site 
(m("ftp.embeddedarm.com/ts-arm-sbc/ts-7200-linux/binaries/ts-modules/lincan-732-ts11.o","//anonymous");">ftp:)
We need to extract the files at / directory and also copy our lincan-732-ts11 
module.
tar zxvf oceralincan_arm.tar.gz -C /
tar zxvf lincan_arm.tar.gz -C /
#in the /usr/lincan/modules we have to copy the lincan-732-ts11 module
#that we downloaded from the ftp you can do that via ssh
In order to test the driver :
#go where the kernel module is
cd /usr/lincan/modules/
#insert kernel module
#Lifebridge uses a baudrate of 125Kbps
insmod -f lincan-732-ts11.o hw=ts732 baudrate=125
#We connect lifebridge to the COM2/CAN
#start read messages
./readcan /dev/can0



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
    
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
  • [ts-7000] TS-7300 tips and tricks, mario.huizar <=
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU