|
The SymbianOS SDK is built to run on a WIN32
system. It consists of 2 toolchains. One for building the code for the
Epoc32-Emulator on Windows (called the WINS target) using one of the
commercial C++ compilers from Borland, Metrowerks or Microsoft.A second
one, using gcc for the so called MARM target which is the phone itself
(e.g Nokia 6600 or SE P910). Symbian released the modified gcc source
together with the source for 4 important tools, which makes it possible
to build C++ programs without a Windows emulator.
Alternatives:
It is possible to get the second chain running on Unix. There are more
alternatives, which are different in how the makefiles are built: The
one described in this document, where you use makefiles directly.
Bulding console C/C++ programs (.exe), shared libraries (.dll) or C++
applications (.app) is supported. There are even builtin rules to build
a complete sis file (i.e. installation file), so you do not need to
fight with the .pkg file syntax. GnuPOC, which takes the "Symbian" way,
using makmake to generate makefiles from "makmake project" files
(.mmp).
Symbian SDK on Unix HOWTO
for developing programs for symbian OS based mobiles.
{mosgoogle}
Version 1.5a from 2005-04-12
New in 1.5a:
- Adapted the 3 working series60ex makefiles to the new makefile syntax.
New in 1.5:
- Supporting current SDK's
- Unified the 3 Howtos (crystal/UIQ/series60)
- Common GCC support for multiple SDK's (Thanks to Simon Woodside
for suggesting it)
See the Makefile changes section
if you are upgrading from the 1.4 SDK
- Native versions of the Symbian toolchain, no wine is required
- Removed EpocR5 / psion support. See version 1.4 in the Older releases section for EpocR5 support.
Supported SDK's:
- Series 60 SDK 2.1 (Thanks to Simon Woodside)
Series 60 SDK Feature pack 2
Devices e.g. Nokia 7650, 6600, 6630, Siemens SX1
- Series 80 SDK 2.0
Devices e.g. Nokia Communicator 9500, 9300
Note: Some features of the 92x0 are not supported by the 2.0 SDK, e.g.
the PLP library
- UIQ SDK 2.1
Devices e.g. Sony Ericsson P800/P900/P910
Background
The SymbianOS SDK is built to run on a WIN32 system. It consists of
2 toolchains:
- one for building the code for the Epoc32-Emulator on Windows
(called the WINS target) using one of the commercial C++
compilers from Borland, Metrowerks or Microsoft.
- a second one, using gcc for the so called MARM target which is the
phone itself (e.g Nokia 6600 or SE P910).
Symbian released the modified gcc source together with the source for 4
important tools, which makes it possible to build C++ programs without a
Windows emulator.
Alternatives:
It is possible to get the second chain running on Unix. There are more
alternatives, which are different in how the makefiles are built:
- The one described in this document, where you use makefiles
directly.
Bulding console C/C++ programs (.exe), shared libraries (.dll) or
C++ applications (.app) is supported.
There are even builtin rules to build a complete sis file (i.e.
installation file), so you do not need to fight with the .pkg file
syntax.
- GnuPOC, which
takes the "Symbian" way, using makmake to generate makefiles from
"makmake project" files (.mmp).
Pros and Cons:
Pros:
- Using your favorite OS
- Stable and proven development environment used by at least a
major commercial project.
- Running multiple Symbian SDK's at once without problems.
A single make (calling architecture specific makefiles) can build the
binaries for all architectures.
- Use the well-known gmake for building projects instead of the strange
and limited makmake.
- Simple two-command installation of the SDK: one for compiling and
installing GCC, and one for copying and fixing the SDK files.
Cons:
- No emulator support, which means that debugging is sometimes
slower or more complicated. On the other hand avoiding the emulator
has its advantages too :-) :
- no issues with code which is running on the emulator
but not on the target
- the developer directly gets the feeling for hardware
(different input capabilities, speed, etc
Prerequisites:
- A decent UNIX like system
I tested it on my i386 computer with a current Arch Linux distribution.
- The GCC Source code.
- The SDK. This version supports (was explicitely tested with):
- Series 60 SDK 2.1 for Symbian OS, Nokia Edition
- Series 60 SDK 2nd Edition SDK for Symbian OS,
Supporting Feature pack 2, For C++
- Series 80 Developer Platform 2 SDK for Symbian OS
- UIQ 2.1 SDK for Symbian OS (Borland version)
You can download these SDK's here.
- The glue and morph stuff from this site: sdk2unix-1.5a.tar.gz.
- For unpacking some of the SDK's a DOS-Emulator is needed.
wine works fine and comes
installed with most Linux distributions.
{mosgoogle}
Installation:
Note, the whole stuff is easier then it looks, consisting of three
shell commands (well 4 if you count 1 cd):
- Unpack the glue stuff
- Compile gcc
- Install your SDK
- Unpack sdk2unix-1.5a.tar.gz in a directory where you have some spare place (ca 1GB), we will
compile GCC and unpack the SDK archives here.
Then change your current directory to it.
$ gzip -dc sdk2unix-1.5a.tar.gz | tar xvf -
$ cd sdk2unix-1.5
- Install gcc. You can install it separately (to share it with more SDK's)
or in the same directory as the SDK:
$ bin/install_gcc539 <path-to-gcc-src.zip> <target-directory>
e.g. (using a separate gcc directory):
$ bin/install_gcc539 /tmp/gcc539src.zip /local/gcc-2.9-psion-98r2
After a short while you have gcc installed, configured for cross-compiling.
- The next step depends on your SDK, because Symbian makes fun of packaging
each SDK in a completely different way, so I was not able to use a common
conversion method.
- Series 60 SDK 2.1 for Symbian OS, Nokia Edition
This one uses an InstallShield variant, which can be handled by
the cabextract Program. Please install this one first, and put it into your
path. The unpacking magic was contributed by Simon Woodside.
$ bin/install_series60_sdk_21 <path-to-sdk.zip>
<target-dir> [gcc-dir]
e.g. using a separate gcc directory (command is one line):
$ bin/install_series60_sdk_21 /tmp/S60_SDK_2_1_NET.zip
/local/symbian_sdk_series60_21 /local/gcc-2.9-psion-98r2
- Series 60 SDK 2nd Edition SDK for Symbian OS,
Supporting Feature pack 2, For C++
This one uses an InstallShield variant, which the (supplied)
program called i6comp.exe can handle (wine needed):
$ bin/install_series60_sdk_fp2 <path-to-sdk.zip>
<target-dir> [gcc-dir]
e.g. using a separate gcc directory (command is one line):
$ bin/install_series60_sdk_fp2 /tmp/S60_2nd_fp2_sdk_msb.zip
/local/symbian_sdk_series60_fp2 /local/gcc-2.9-psion-98r2
- Series 80 Developer Platform 2 SDK for Symbian OS
This one uses i6comp.exe again (see above):
$ bin/install_series80_sdk_20 <path-to-sdk.zip>
<target-dir> [gcc-dir]
e.g. using a separate gcc directory (command is one line):
$ bin/install_series80_sdk_20 /tmp/S80_DP_2_0_SDK.zip
/local/symbian_sdk_series80_20 /local/gcc-2.9-psion-98r2
- UIQ 2.1 SDK for Symbian OS
This one uses unzip twice.
$ bin/install_UIQ_sdk_21 <path-to-sdk.zip> <target-dir>
[gcc-dir]
e.g. using a separate gcc directory (command is one line):
$ bin/install_UIQ_sdk_21 /tmp/S80_DP_2_0_SDK.zip
/local/symbian_sdk_series80_20 /local/gcc-2.9-psion-98r2
Example projects
- For series60 the examples form, editor and graphics.
These examples can be found after installation in the series60ex
subdirectory. The README in this directory contains a brief description of
the other examples.
- The p3nfs client
- Mut (Tetris clone)
- Switcher (TaskList)
Additional tools:
Installing the SDK this way you also get:
- genaif to generate .aif files, which
contain the program description and icons for the Epoc runtime. Type
genaif without options to get a short usage.
- xmakesis.pl, built by Andrew de Quincey for Epoc R5. He doesn't seem to
support xmakesis.pl any more. The version you get is capable of building
(compressed) sis packages for Symbian 6.0 and 6.1.
Note: The default setting for package building is still
makesis.exe . Edit lib/makerules/epoc.general to change it. Exchanging data with the target device:
- p3nfs (via infrared or bluetooth)
- irobex_palm3 and its relatives from the openobex project.
Debugging:
For debugging I use the debugline function (see debugline.c and debugline.h
in the etc subfolder) and DEBUGMEM. These functions write the file C:\debug,
which you can read easily if the device is mounted e.g. via p3nfs.
Makefile changes from the version 1.4 of the SDK:
- As we can use a common gcc for multiple SDK's, I choose not to put the
standard include path into the spec file, so it has to be specified in the
CFLAGS or CPPFLAGS variable. This is done in the standard epoc.general file,
but if you modify these variables, then the best way is to append them to the
old one. E.g.:
CFLAGS += -DMyDefine -IMyInclude
or
CFLAGS := -DMyDefine -IMyInclude $(CFLAGS)
- If you use the builtin .SIS generator, put following
lines into your Makefile, else you get a silly question on the phone
when installing the .SIS file:
- Series 60
PKG_ADDON='(0x101F6F88),0,0,0,{"Series60ProductID"}'
- UIQ
PKG_ADDON='(0x101F617B),2,0,0,{"UIQ20ProductID"}'
Using the Windows based post-processing tools
If you would like to use the windows version of the programs petran,
makesis, rcomp, bmvconv, then execute
$ bin/install_windows_petran Now put the file <target-directory>/Tools/UIDCRC.EXE into the
Wine path, e.g. by symlinking the file UIDCRC.EXE into the C:\windows\system
directory of your Wine installation. Look into the ~/.wine/config file to find
the drive C.
Older releases:
Thank's to Rudi's check his homepage
Trackback(0)
Technorati Tags:
|