Use of the "devices" command

Keywords:

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).

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
-  ...

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.

List all installed SDKs

Just typing devices at a DOS prompt will bring you the list of installed and properly configured SDKs.

Here is the result of the command for my system:

C:\>devices
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 <kit name>:<device name>

This string is called device-identifier or DeviceID in the documentation. You can also give each SDK a shorter name or alias.

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)

Notice the "- default" tag behind the UIQ v2.1 line: this means that the UIQ SDK will be used unless you specify otherwise.

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 @<sdk-identifier>

Where the sdk-identifier is the device-identifier string or the alias corresponding to the SDK to use.

Example:

devices -setdefault @Series60_v21_CW:com.nokia.series60
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:

C:\>devices
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.

Fortunately enough, you can override the default setting for the current shell by defining a EPOCDEVICE environment variable :

set EPOCDEVICE=<sdk-identifier>
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 @<sdk-identifier> at the end of any Symbian command. To launch the Series 60 v2.1 emulator regardless of the default or session settings:

epoc @s60v21
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:

devices -setalias <alias> @<device-identifier>

Example:

devices -setalias uiq21 @UIQ_21:com.symbian.UIQ
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.

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:

devices -add C:\symbian\6.0\nokiacpp\ C:\symbian\6.0\shared\ @Series80_v10:com.nokia.series80
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):

C:\>devices -info @uiq21
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:

C:\>devices -help
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


devices problem

im just getting this error when ever i try to add / set a device

C:\Symbian>devices -add C:\Symbian\A1000SDK C:\Symbian\A1000SDK @A1000:com.motorola.A1000
devices takes no arguments without a switch argument.

Syntax: devices -switch [arguments ...] [@device]
Use devices -help for more help.

but im using "-add" is that not the switch ?