Contents:
1. Preface
2. Install
3. Remove
4. Setup environment
5. Test the toolchain and sdk
6. PC/phone connection
7. User directory on EZX phone
8. Download and run application
9. Remote debuging
10. Package application
11. QT documents
12. EZX sdk documents
13. Inside the EZX sdk & toolchain
14. FAQ
15. Reference
16. Authors
17. History
-----------------------
1. Preface
If you are expert on developing qt application on Linux box and know how to do cross-developing, you can skip this chapter. If you can't make sure, please read it carefully.
This document is about the basic knowledge of developing application for EZX phone. Since it's not "everything about EZX development", skill and knowledge below is required before you decide to go on.
What's EZX phone?(must have)
If you have no idea of that, please firstly go to http://www.motorola.com.cn.
What's Linux?(must have)
Since EZX is a pda phone based on linux, so linux knowledge is required. In detail, you should know:
a. basic operation in linux shell environment such as ls, file, mkdir.
b. basic knowledge in developing application on linux. You should know gcc/g++, make and Makefile. Knowledge about setting environment and running application is must.
c. Shell script is not a must. However, you'd better have some idea of that.
d. Debug and remote debuging using gdb is not a must. However, you should grasp that if you want to make ezx application for read world.
What's QT?(nice to have)
a. basic knowledge about developing QT based application. You should know how to write ".pro" file and use qmake.
http://www.trolltech.com is qt knowledge base
What's cross-developing.(nice to have)
In short, it's that you develop and build an application in one platform while run it on another platform. For more, please go to google.com
What's else?
Oh, of course you must have a Linux box run Redhat Linux(TM) 7.2. (Why RedHat 7.2? Go to faqbelow)
You must have root account. Maybe in the future, you needn't root account, but now you must have to install toolchain.
OK, now we can begin our sailing in EZX world.
2. Install
First get the package named package.tar.gz.
Put it in any proper directory, supposing /home/frank
$tar zxvf package.tar.gz
$cd package
$su
//note: you must change to root here
#./ezx-install.sh --install
The whole install will take about several minutes and the whole toolchain/sdk will be installed in "/opt". The "/opt" is the default path for toolchain and sdk. Surely you can change to other path. Using "./ezx-install.sh --help" for detail. However, I HIGHLY recommend that you use default path. That will save you a lot of effort in later stage.
For more internals about package.tar.gz, please go to chapter 13 "Inside the EZX sdk & toolchain". After you get more detail about package.tar.gz, you will have more freedom and more power.
After successfully install, you will get following directories and files
-----------------------------------------------
ezx-xscale-env.sh : the script for seting environment
ezx : the directory which holds all ezx sdk files(header files, libraries,and documents
hardhat : the directory which holds MontaVista(TM) cross development toolchain
qt-2.3.6 : the directory which holds all necessary QT files
test : the directory which holds simple applications, with which you can test the toolchain and sdk
-----------------------------------------------
3. Remove
Below contents only cover the case in which you install all files in the default path "/opt"
The removing takes less time than install.
//note, you also need root account
#cd package
#./ezx-install.sh --remove
//note, you should manually remove the "/opt" directories and all files inside it. For why not "automate remove", please go to FAQ
#rm /opt -rf
4. Setup environment
It's a normal case in Linux that before anything, you should firstly setup the proper environment for later compiling/linking and other activities.
To make things much more simple, we've created a script named "ezx-xscale-env.sh" which located in the root path of EZX sdk. It's "/opt" in default.
#cd /opt
#. ezx-xscale-env.sh
// note: there is a SPACE character between "." and "ezx-xscale-env.sh", not slash "/"
5. test the toolchain and sdk
When install finish, how can you make sure everything is OK and ready for use?
Firstly, cd "/opt" and list all files and directories. Make sure it's the same with what I've mentioned in chapter 2.
Then, you have another way to verify what you have installed.
Of course, you should setup environment before go on(See "4. Setup environment")
#cd /opt/test
#ls
You will see four directories here. They are
-----------------------------------------------
c : for testing gcc(here is xscale_le-gcc) on c code
cpp : for testing g++(here is xscale_le-g++) on cpp code
qt : for testing building of qt based code
ezx : for testing building of EZX sdk based code
-----------------------------------------------
There is "README" files in each directories. There are detail description on how to building these applications.
If everything is OK, congratulations! You've have installed all necessary files. You can build EZX application.
Of course, if you have full confidence, you can skip the first 3 tests and test ezx code directly. It will save you time if you are lucky enough. However, if you meet any problems, it will waste you more. So I recommend you process all 4 tests step by step. It's also helpful for later stage.
6. PC/phone connection
Since you have built EZX applications, you must want to run it on phone as soon as possible. Take it easy, we are talking about all related things in following chapters.
Before you can download or send anything from PC to phone, you should make a particular connection between them. Of course, you can use wireless way such as Irda or bluetooth. However, the best method is to connect them with usbnet. In short, usbnet make it possible to build Ethernet connection between phone and PC over USB. For more about usbnet, please refer to ???
Since it's an important and a bit complicated thing, we have another article on it. You can get it and other related stuff in doc/usbnet. You have guide, you have linux and windows drivers there.
The documents named "usbnet-faq.txt" and related files can be found at tools/usbnet
After you read the article and make usbnet connection. You have samba service and telnet service available on the phone.
If you connect phone with windows box, you must have known that the phone's IP is a fixed "169.254.142.2". In this case, your PC's IP is "169.254.142.1".
***IMPORTANT***
For linux, things are different.Please see below summaries:
=======================================
OS PC IP EZX phone IP
windows 169.254.142.1 169.254.142.2
Linux 192.168.1.2 192.168.1.1
=======================================
In below context, you will meet with both cases. Please be careful.
Keep in mind that your PC and EZX phone now build a small LAN.
What's samba? In short, it's a file sharing/transfering protocol. For detail, please refer to ???. With samba, you can transfer files between phone and PC. With telnet, you can login the phone and run application just like in a little Linux box.
Keep in mind you should always use "ezx" to login. There is no password at all. Login with this account, you have all proper run-time environment setting ready. It will save lots of your effort.
Of course, you can also use "root". Also no password. But be very very careful when you are login as "root".
7. User directory on EZX phone
When you login the phone with telnet, you must know the exact possition of "mystuff". Mystuff is the user file manager. All the files you send to phone are located under mystuff. This information will save you from loss in the complicated linux directory tree.
Things are different between A760 and A768
For A760
Mystuff is located in /ezxlocal/download/mystuff
For A768
Mystuff is located in /diska/download/mystuff
Once you find the mystuff in the linux shell windows, you can find the files you just send from PC.
Supposing you send a file named "hello" to //169.254.142.2/home, you can get it from
/ezxlocal/download/mystuff for A760 phone or
/diska/ezxlocal/download/mystuff for A768 phone.
8. Download and run application
It's almost the simplest thing among these steps. For windows box(windows 2000 & windows XP), you just need click the small "motorola" icon on the windows task bar. You can access the EZX phone just like a local directory.
It a little bit different in Linux box. You are now in command shell environment. Using "smbclient" to send file.
$smbclient //169.254.142.2/home -U ezx
when prompting for password, a "enter" key is enough.
use "put" to send file to ezx phone
For more commands, just enter a question mark - '?'
Once you send files to EZX phone, you can run it.
Supposing you send a application named "hello" to the root path of mystuff. you can get it from
/ezxlocal/download/mystuff for A760 phone or
/diska/ezxlocal/download/mystuff for A768 phone.
To make it more simple, we just talk about A760 in following contents. It's no different in A768.
$cd /ezxlocal/download/mystuff
$./hello
If everything is OK, you can see what you expect from the command line or screen of phone(for EZX or QT application)
9. Remote debuging(To be verified!)
Remote debuging is a little bit advanced topic here. However, without that, it's hard to make a real world application.
If you are expert on developing ezx application and cross-developing, you can skip this chapter. Otherwise, please also read it carefully.
Have a copy of the program which you want to debug and put it onto the target system - ezx phone, as gdbserver doesn't care about symbols. All symbol handling is processed by gdb running on the host system - PC.
Please note that arguments passing to the program must be entered on the command line when starting gdbserver. Using the "set args" command in the Linux workstation gdb program will have no affect on the remotely executing program.
example : the program named helloworld
TCP/IP
1. host> xscale_le-gdb
2. host> gdb:file helloworld
3. host> gdb:target extended-remote 192.168.1.2:2345
Note : 192.168.1.2 is IP of EZX phone
4. target> gdbserver 192.168.1.1:2345 helloworld
Note : 192.168.1.1 is IP of Linux PC
5. host> gdb:list/break/run ......
gdb related files can be found at tools/debug
10. Package application
Since you can't expect the end user use telnet to run applications, it's time we make a package. Once you build a package, your application is ready for release, sharing or selling.
please refer to the document named "Mpkg-howto" at tools/mpkg. There is also a real case you can learn from.
11. QT documents
Now that EZX is based on the QT framework, QT document is a must. You can find it on '/opt/qt-2.3.6/doc'. For other information on QT, you should go to http://www.trolltech.com
12. EZX sdk documents
All EZX SDK API documents are here: ezx/doc/html. You can get detail information on each EZX specific class and module.
13. Inside the EZX sdk & toolchain
The package for developing EZX application actually include following parts
a. cross toolchain
binutils - linker and other tools
compiler - gcc
linux header file
glibc
other necessary libs
b. QT package
QT libraries
QT header files
QT documents
QT tools such as qmake, uic.
others
c. EZX sdk
EZX sdk header files
EZX sdk libraries
EZX sdk documents
d. test code
c/c++ test code
qt/ezx sdk test code
e. scripts
for installing
for seting environment
If you want even more, please read the "ezx-install.sh" for every detail.
14. FAQ
TBD
15. Reference
TBD
16. Authors
Name, role/responsibility
Zhang Hui, write most parts of this documents
Zhao Liang, write usbnet part
Lv YunZhuo, write remote debuging part
Zhao Bingqi, write mpkg part
17. History
Date, Comment, Person
2004/02/12/ Draft for the first version Zhang Hui
2004/02/13/ Many fixed from WangKe's test Zhang Hui
Bookmark
Email this
Hits: 3869
Comments (0)

Write comment



