Documente Academic
Documente Profesional
Documente Cultură
Reference: WM_DEV_OAT_APN_005
Revision: 001
Date: February 26, 2007
Open AT® Application Compilation Tips
Open AT® v3.0x
WM_DEV_OAT_APN_005-001
Author: Wavecom Support Consultant Date: 03th August 2006
NOT E
Wireless CPU Q2400A 9 Q2406A 9 Q2406B 9 Q2426B 9 Q2501B 9
Compatibility Quik (GSM): GR64 GS64 Q2686H Q2687H
Q24 Classic Q24 Plus Q24 Extended Q24 Auto
Wireless Microprocessor WMP100 WMP150
APPLICATION
1 VERSION
Application Notes may be updated over their lifetime. To ensure you
design with the correct version, please check the application notes
page in the support section for www.wavecom.com.
2 INTRODUCTION
This document describes some tips which will prevent generally
®
encountered problems related to Open AT application compilation.
NOT E
wizards which enable the user to easily view and modify these
settings.
®
Graphical wizards could be used when the Open AT project is
compiled/linked using Visual C++ environment.
APPLICATION
For backward compatibility with application creation and compilation,
®
Open AT v3.0x also supports direct project creation and compilation
using Cygwin. This document also elucidates some of the commonly
encountered problems when Cygwin is used to create/build a project
along with the reasons and solution. As indicated by the error message, the cause of the error is missing
“xsltproc” package. This package is required by Cygwin to create a
®
3 Prerequisite: Proper Open AT new project.
This problem is a result of missing cygwin packages and this
Installation condition occurs when all the cygwin packages are not selected and
®
®
Correct and complete installation of Open AT will avoid some of installed during Open AT installation.
common errors and issues faced while creating and compiling Open Cygwin setup, by default does not install all the packages (including
®
AT applications. “xsltproc”) on the system. This is indicated by “Default” selection for
®
While installing Open AT all the associated tools and packages like “Select package” dialog box during installation. The following
Cygwin, SGT etc need to be selected and installed. Issues while screenshot shows this default setting.
NOT E
®
creating and compiling Open AT applications might occur if the
associated tools (Cygwin, SGT etc) are not installed correctly and
completely.
In case, all the Cygwin packages are not installed, problems will be
faced while creating new projects. A commonly encountered error is:
“Wmnew script error 5([wmsync] xsltproc package is not
installed on the system”.
This error message is encountered when a new project is to be
®
created using Open AT project wizard. The Wizard fails to create a
new project after receiving this error message. The following
screenshot pictorially describes the above scenario:
complete installation for all the packages should be done. This can
be done by selecting “ALL-Install” Option for “Select Packages”
dialog box.
NOT E
APPLICATION
®
In such cases, check if the path indicated by the “Open AT Settings
Wizard” exists or not. If it does not exist, it means that the
component is not installed. Hence, the corresponding component
should be reinstalled. (Select the corresponding component in the
®
Open AT Setup).
As a general rule, SGT and Add-on Libraries (like TCP/IP) must be
®
installed with each Open AT installation irrespective of whether they
This step while Installing Cygwin will prevent error due to missing are already installed in the system. This is because each version of
packages. ®
Open AT will have some changes incorporated in these modules
and problems might arise if previous versions of these modules
3.2 Problems due to missing Open AT® (SGT, TCP/IP etc) are made to run with the newer version of Open
NOT E
®
AT .
components
If some components (SGT etc) are not installed, problems will occur The screen below displays the setup screen and the options selected
while creating new project. In such scenarios, no project workspace during a first installation:
will be created. The screen below depicts the problem that occurs in
APPLICATION
this scenario (after creating a new project and launching
®
development environment with Open AT Wizard).
NOT E
APPLICATION
NOT E
problems
®
Sometimes, the user experiences problems in compiling Open AT
application. Various kinds of errors might appear while trying to
®
compile an Open AT application. These errors fall under the
APPLICATION
following categories and due to the reasons explained as follows:
NOT E
executed in the target mode. In this case too, the environment has to
be provided with the location of include and library files. The
4.2 Compilation problems due to wrong compiler following image depicts one such scenario in which the user has not
options: specified the include files.
The usage of wrong memory options (32 or 16) for A-type modules
APPLICATION
(16/2 MBits) or B-type modules (32/4 MBits) gives memory related
errors during program execution. In such cases, the module will reset
after giving AT+WOPEN=1 command and will give ARM exception
1xx.
To solve such problem correct memory option must be specified in
®
Open AT settings as displayed in the screen below.
NOT E
APPLICATION
NOT E
Visual C++) uninstalled on different drives on the computer, the contents of some
• Open the file “project_name.scs” corresponding to the internal files of Cygwin (group and passwd) might become invalid. In
current project (by double clicking the file). such cases, despite of having correct path settings and Cygwin
• Add or modify the options “wmnew script additional Packages, errors will be experienced. The following screenshot
options” shows one such error which is encountered due to incorrect contents
APPLICATION
• Click on OK to validate the modification, then the makefiles of group and passwd file.
will be updated automatically.
NOT E
APPLICATION
In order to get rid of such problems follow the following steps:
1. Delete the old Cygwin folder (with all its contents) and make the
complete installation of Cygwin (By selecting “Install” option for all
the packages).
2. Delete “passwd” and “group” files from “etc” folder of in newly
It can be noticed that for a target mode application, the library name created Cygwin directory. Also delete the “home” folder if present in
corresponding to the compiler type is not specified. In this case, the Cygwin directory.
application will link itself to the arm_xxx.lib or gcc_xxx.lib (where xxx 3. Open the Cygwin window (Or Cygwin.bat file from Cygwin
is the library name) in the library path depending upon the compiler directory) and execute the command
®
to be used. The compiler option is set using by Open AT Settings. “mkgroup –l > /etc/group. “
NOT E
(in the field “Default compiler”) Then execute the command
“mkpasswd –l > /etc/passwd.”
These commands will recreate “passwd” and “group” files in the “etc”
folder of “Cygwin” directory. Close the Cygwin window.
4. Now open the “group” file present in the “etc” directory in “Cygwin”
APPLICATION
folder
NOT E
and 4 MBits RAM size (ex : Q2406B)
For A-type modules GCC/ADS compiler -16 option must be used and
for B-type modules GCC/ADS compiler -32 option must be used.
APPLICATION
7 Examples: Commonly Encountered
Problems while using Cygwin
The first step for tackling any project creation and compilation issues
in Cygwin should be to find the cause of error. This can be done as
follows
Use “wmcheck” command to see the errors.
NOT E
folder. This file will contain some entries starting with
VUSR_computername (for example VUSR_wavecom-regis4,
VUSR_wavecom-regis3 etc).
6. Edit one such line by replacing VUSR_computername (in
complete line) by the user login name. (For example replace
APPLICATION
VUSR_wavecom-regis4 by rma). Save and close the file.
NOT E
7.1 Problem due to missing Cygwin packages
A problem can be the result of missing cygwin packages and this
condition occurs when all the cygwin packages are not selected and
7. Close any open Cygwin Shell Window. ®
installed during Open AT installation. Cygwin setup, by default does
8. Reopen the Cygwin windows (“By clicking on the Cygwin.bat file”) not install all the packages (including “xsltproc”) on the system. This
APPLICATION
and execute the command: is indicated by “Default” selection for “Select package” dialog box
“wmsetup” during installation.
This command will recreate a new “Home” folder in the “Cygwin”
Directory and will solve the problem. Solution:
The solution consists in reinstalling cygwin taking care of :
There is one more way to solve this problem. ®
1. Select the Cygwin component in the Open AT setup. The
Open Cygwin and type screen shot is shown below.
“cp .bashrc .bashrc_profile”
NOT E
APPLICATION
2. “ALL-Install” Option should be selected in “Select
Packages” dialog box. (see screen shot below)
NOT E
APPLICATION
The contents of
<compilerUsed>_<ApplicationName>_<MemoryOption>_err_lnk.tmp
(for instance gcc_appli_16_err_lnk.tmp) file showing the cause of
error is as follows:
It may happen that the “wmcheck” command does not show any
error but still the problems exist in project creation. In this case check
for two things:
1. Check Path settings using Export command. All paths
should be checked and set right.
2. Check the project name. There should not be any blank
space in it
NOT E
If the problem still exists then reinstall Cygwin.
Solution:
There are two ways to solve this problem:
1. The best and advised way: Create a new project
workspace with a “src” folder that contains all the source
files to be included. Then, follow the normal project
NOT E
APPLICATION
NOT E
There are two ways to solve this problem:
APPLICATION
1. The best and advised way: Set the correct value for the
7.3 Problems due to incorrect compiler options ®
environment variables with “Open AT settings”, as it is
If wrong compiler options (32 or 16) for A-type modules (16/2 MBits) shown in the screen shot below.
or B-type modules (32/4 MBits) are used, it leads to memory related When the environment variables are set correctly, the
errors during compilation. compiling option shouldn’t be taped systematically under
This option must be correctly settled especially while linking ed.lib Cygwin environment.
library during project creation. Line command to execute:
If not, the compiler gives error stating “RAM_MAP full”. wmmake appli
The errors can be seen by opening
<compilerUsed>_<ApplicationName>_<MemoryOption>_err_lnk.tmp
(for instance gcc_appli_16_err_lnk.tmp) file in the “out” folder of the
project (project\gcc\out).
The following example shows the error in case GCC-16/2 option is
used by error while compiling a project and linking ed.lib library.
NOT E
APPLICATION
Note: the above example uses gcc compiler. Same steps apply if
ARM compiler is used.
7.4 Problems related to linking of add-on libraries The add-on libraries path and C include files path must be specified
using various wmnew-options such as –otherlib,-extlib,-samplelib,
etc.
7.4.1 Under Cygwin environment
Sometimes the issues occur due to missing add-on libraries path and There are many ways to solve this problem:
®
C include files path. The compiler is not able to link the required add- 1. The best and advised way: Open the Open AT Project
on libraries and gives error. A screen shot depicting error due to Wizard file (“*.scs”) associated to the project and add the
missing C include files is shown below. compilation/linking options in “wmnew script additional
options” section. (as It is shown in the screen shot below).
The makefiles will be automatically modified and the whole
NOT E
project workspace (for target and remote mode) will be
completely synchronized.
Then, compile under Cygwin environment using wmmake
command line.
APPLICATION
NOT E
APPLICATION
2. The second way: Under Cygwin environment, tape the
The screen shot of
command line wmnew with all the linking options.
<compilerUsed>_<ApplicationName>_<MemoryOption>_err_lnk.tmp
(i.e. gcc_appli_32_err_lnk.tmp)gcc_appli_16_err_lnk.tmp file
wmnew –name appli –otherlibs < add-on used library list
depicting the error due to missing add-on libraries path is shown
(as TCP/IP library, for example)>
below.
For example,to add TCPIP libraries path, write :
wmnew –name appli –otherlibs TCPIP/v3.00
Similarly to include any other add-on library, the user can
specify the path of the specified add-on library in the
wmnew command options.
NOT E
3. Another way: Modify directly the makefiles. But with this
way, the project workspace (for target and remote mode)
will not be synchronized.
NOT E
APPLICATION
NOT E
The compiler is unable to open the include file “ed_common.h”.
Similar errors can be easily avoided by providing correct path
settings for including and library files.
APPLICATION
There are two ways to solve this problem:
®
1. The best and advised way: Open the Open AT Project
Wizard file (“*.scs”) associated to the project and add the
compilation/linking options in “wmnew script additional
Note: options” section. The makefiles will be automatically
If the include files path is provided but add-on libraries (Otherlibs or modified with the right paths and the whole project
Extlibs) path is still missing then project.o file is not generated and workspace (for target and remote mode) will be completely
the following error occurs: synchronized.
NOT E
APPLICATION
NOT E
APPLICATION
In the same way, if the application is using some other libraries (like
TCP/IP library), then the VC6/VC7 development environment must
be provided with the paths and names of such libraries. This is
because the linker needs to resolve all the referenced symbols which
are defined in the library file.
If not done properly, errors are displayed :
Along with the library name, the library path should also be specified
so that the VC6/VC7 development environment can conveniently
NOT E
locate the library. This name should be specified in the Options
Dialog box. (“Tools->Options->Directories”).
APPLICATION
NOT E
To resolve this problem, the VC6/VC7 environment has to be
provided with the name of library file along with the path where this
library file is stored. The library name should be specified using the
Link Tab in the Project Settings Dialog Box (Press ALT+F7 to get
Project Settings window).
APPLICATION
Step1: : Set the correct value for the environment variables with
®
“Open AT settings”. Select the right “Synchronized Workspaces”.
NOT E
APPLICATION
®
Step2: Use “Open AT Project Wizard” to create the project.
® ®
Select the menu Start> Wavecom > Open AT > Open AT Project
®
Wizard shortcut to launch the Open AT Project Wizard.
Set the options desired.
Select “Launch development environment” with Visual C++.Net to 8.2 Settings required before Executing the Open
launch Visual environment.
®
AT® application in remote mode
The Open AT project is created with the workspace settings file
(“*.sln file”) in the following folder “project_name\project_name.sln”. Step1: Set the project in remote mode as active project.
NOT E
APPLICATION
Step 3: Click on the “Browse” option which will appear in the combo
box as shown below.
Explorer as shown below. It will show the File View in right side of
window.
Select as active project: the project in target mode (project_name) or
the project in remote mode (“project_name_rte”)
Step 4: Select the “kernel.exe” file from the “rte” folder in the
workspace as shown below.
10 SUPPORT
For direct clients: contact your Wavecom FAE
For distributor clients: contact your distributor FAE
For distributors: contact your Wavecom FAE
11 DOCUMENT HISTORY
Level Date History Author
001 03/08/2006 Creation Wavecom Support Consultant
NOT E
12 LEGAL NOTICE
LICENCE RIGHTS
APPLICATION
Wavecom Asia Pacific Ltd hereby grant licence to users of their Open AT® development environment to use the source code in this
electronic file for the sole use of developing GSM, GSM/GPRS or GSM/GPRS/GPS cellular applications compatible with Wavecom
products. The source code may be modified by any Open AT® developer providing the application is not intended to be malicious or
detrimental to cellular operators or consumers of the application in any way. The licence also grants permission to copy and distribute this
source code so long as this licence header is maintained in all source code files. You hereby undertake to use the Software for your
interim development purposes only and under no circumstances shall you use the Software for commercial purposes. For the avoidance
of doubt, the Software may not be sold for a fee on diskette or CD-ROM, either alone or as part of a collection with other products without
prior written consent from Wavecom.
DISCLAIMER OF WARRANTY
This Software is provided free of charge on an 'as is' basis. No warranty whether expressed or implied is given by Wavecom in relation to
the Software of the uses to which it may be put by you, the user, or its performance or merchantability, fitness or suitability for any
particular purpose or conditions; and/or that the use of the Software and all documentation relating thereto (the “Documentation”) by the
Step 5: The following dialog box is displayed once the executable Licensee will not infringe any third party copyright or other intellectual property rights. Wavecom shall furthermore be under no obligation
to provide support of any nature for the Software and the Documentation.
file name is provided in the above box. Click on “OK”. LIMIT OF LIABILITY
In no event shall Wavecom be liable for any loss or damages whatsoever or howsoever caused arising directly or indirectly in connection
with this licence, the Software, its use or otherwise irrespective of whether Wavecom has had advance notice of the possibility of such
damages or not by your use of the Software. Notwithstanding the generality of the foregoing, Wavecom expressly excludes liability for
indirect, special, incidental or consequential loss or damage which may arise in respect of the Software or its use, or in respect of other
equipment or property, or for loss of profit, business, revenue, goodwill or anticipated savings.
INTELLECTUAL PROPERTY
For the avoidance of doubt, no right, title or interest in any intellectual property right in respect of the Software shall pass to you. Any and
all intellectual property rights in respect of the Software and Documentation shall at all times remain the sole and exclusive property of
Wavecom. The licence grant shall not include Intellectual Property not wholly owned by Wavecom and the customer shall exercise due
diligence to ensure that the use of the information in this document does not infringe any patents in the country of origin.
NOT E
APPLICATION
Step 6: Now you can execute the application or debug the
application by setting breakpoints as shown below.
NOT E
APPLICATION
Page: 1/1