The devices command allows you to specify which Symbian OS device to develop for, and configures the required environment settings according. The command was introduced with Symbian v7.0 SDKs (but can be used to manage older ones like the Series 60 v1 SDK which is based on OS v6.1). 字串4
The devices command has the following functions:
list all installed/configured SDKs
configure a SDK so that it can be recognized by the command (necessary for pre-7.0 SDKs).
specify the SDK to use
specify an alias for a SDK
... 字串8
The use of this command is normally not required if you are using Metrowerks Codewarrior and compile from the IDE. But its use is mandatory for user of Visual Studio or command line build. 字串6
List all installed SDKs
Just typing devices at a DOS prompt will bring you the list of installed and properly configured SDKs. 字串4
Here is the result of the command for my system:
字串4
UIQ_21:com.symbian.UIQ-runtime
UIQ_21:com.symbian.UIQ (alias uiq21) - default
Series60_v2fp2_CW:com.nokia.series60 (alias s60fp2)
Series60_v21_CW:com.nokia.series60 (alias s60v21)
Series60_v20_CW:com.nokia.series60 (alias s60v20)
Series80_v20_CW:com.nokia.series80 (alias s80)
Series60_v12_CW:com.nokia.series60 (alias s60v12)
Series90_v10_CW:com.nokia.series90 (alias s90)
Series60_2nd_FP1:com.nokia.series60
Each SDK is identified by a string of the form
This string is called device-identifier or DeviceID in the documentation. You can also give each SDK a shorter name or alias.
字串5
From the above, you can deduct that I have the following SDKs installed:
UIQ v2.1 SDK
Nokia Series 60 v1.2, v2.0, v2.1 and v2.6 (Series 60 2nd Edition with Feature Pack 2) (those are for Codewarrior)
Nokia Series 60 v2.1 (Series 60 2nd Edition with Feature Pack 1) (for Microsoft/Borland)
Nokia Series 80 and Nokia Series 90 SDKs (for Codewarrior)
字串1
Notice the "- default" tag behind the UIQ v2.1 line: this means that the UIQ SDK will be used unless you specify otherwise. 字串7
Note: The result of this command will probably differ on your system as a reconfigured all the SDKs manually to have coherent naming across all those Nokia SDKs... which is not the case by default!
Switching between SDKs
To switch SDKs, use the following command:
devices -setdefault @
字串6
Where the sdk-identifier is the device-identifier string or the alias corresponding to the SDK to use.
Example:
devices -setdefault @s60v21
The both command above are equivalent (but the alias version is much nicer to use!) and the result can be confirmed by entering devices again:
UIQ_21:com.symbian.UIQ-runtime
UIQ_21:com.symbian.UIQ (alias uiq21)
Series60_v2fp2_CW:com.nokia.series60 (alias s60fp2)
Series60_v21_CW:com.nokia.series60 (alias s60v21) - default
Series60_v20_CW:com.nokia.series60 (alias s60v20)
Series80_v20_CW:com.nokia.series80 (alias s80)
Series60_v12_CW:com.nokia.series60 (alias s60v12)
Series90_v10_CW:com.nokia.series90 (alias s90)
Series60_2nd_FP1:com.nokia.series60
Switching SDKs using the devices -setdefault command globally affects your system: the new SDK becomes immediatly active in all your DOS shells which may not be twhat you want to achieve if you need to work with several SDK simultaneously.
字串6
Fortunately enough, you can override the default setting for the current shell by defining a EPOCDEVICE environment variable :
set EPOCDEVICE=s60v21
set EPOCDEVICE=Series60_v21_CW:com.nokia.series60
You can even use a per command override of the two above by adding @
字串4
epoc @Series60_v21_CW:com.nokia.series60
Defining an alias for a SDK
Using the alias name rather than the full device-identifier is a lot simpler but aliases are not created automatically for you. It is not a big task however and you just need to do this once after the SDK installation: 字串2
devices -setalias
Example:
devices -setalias s80 @Series80_v20_CW:com.nokia.series80
Adding a SDK
Only v7.0 and later kits automatically update the device list when they are installed. If you also want to use the devices command to manage earlier kits, you can add them to the list yourself using the command devices -add, specifying the location of the kit’s epoc32\ (the directory that contains the release\ sub-directory) and epoc32\tools\ directories.
字串9
For example, the following commands add a v6.0 SDK which has its epoc32 tree at C:\symbian\6.0\nokiacpp\, and its epoc32\tools tree at C:\symbian\6.0\shared\ and create a s80v10 alias for it: 字串6
devices -setalias s80v10 @Series80_v10:com.nokia.series80
Getting information on a SDK
Use devices -info to retrieve a few information on a specific SDK (useful to check that you did not make a mistake when manually configuring your SDK):
字串5
Device: UIQ_21:com.symbian.UIQ (alias uiq21):
Root is C:\Symbian\7.0\UIQ_21\
Tools path is C:\Symbian\7.0\UIQ_21\
Getting help on the devices command
Enter devices -help to get a short summary usage:
字串4
Syntax: devices -info @deviceID Displays detailed device information
devices -default Displays the default device information
devices -setdefault @deviceID Sets the default device
devices -setalias new_alias @deviceID Sets the alias for a device
devices -add device_path tools_path @deviceID
devices -remove @deviceID
devices -help Displays this help
where deviceID is a device identifier (of the form 'kit:name') or
device alias, preceded by '@'
new_alias is a new device alias
device_path is the location of the main epoc32 directory
tools_path is the location of the epoc32\tools directory
Note: When using -setalias or -add, the device may not be referred to by
an alias.
With no arguments or switches, devices lists all device names and aliases
![我要研发网[www.51dev.com]](/templets/images/toplogo.gif)
