EPOC32 SDK on Linux/Unix quick HOWTO
The EPOC32 sdk from Symbian is
built to run on a WIN32 (Win95/Win98/WinNT) system. It consists of 2
toolchains:
- one for building the code for the Wins target, i.e. the
Epoc32-Emulator on Windows (Using the MS VC environment).
- a second one, using gcc for the so called MARM target which is the
Psion 5 itself.
I managed to get part of the second toolchain working on Linux, with following
drawbacks:
- No emulator on the development (i.e.: linux) machine.
- No makmake for makefile generation. (A pure Makefile is better anyway :-)
- No debugger.
The good news is that you can compile faster than under Win95 :-).
I'm not sure that I got everything right, but it seems to work for a lot of the
examples in the SDK and for a quite big project with a lot of EIKON stuff and the GNU XML library. Mail me,
if you can correct or enhance this description.
If you are still interested,
then read on:
- You'll need the following SDK parts from the symbian homepage:
CPPER5two.zip (1MB, Epoc32Ex examples)
CPPER5three.zip (10MB, sysdoc)
CPPER5four.zip (36MB, gcc + other source code)
CPPER5six.zip (10MB, include + needed exe files)
CPPER5seven.zip (6MB, marm libraries)
The rest contains (just for completeness, you DONT need them):
CPPER5one.zip (3.5MB, additional examples & source code)
CPPER5five.zip (2MB, setup, VC patch)
CPPER5eight.zip (5MB, WINC libraries)
CPPER5nine.zip (20MB, WINS libraries)
- In this step we get all native tools compiled and installed.
First unpack CCPERFfour.zip, and then again the gcc_113.zip in it.
This is a Cygnus development environment, consisting of gcc, binutils
and much more. Go into the GCC_113/src directory, and configure the
whole stuff for arm-pe:
$ sh configure --prefix=/usr/local/epoc32 --target=arm-pe
arm is the psion5 processor, and pe is the microsoft executable format.
Try to "make" here:
$ make
It compiles for a while stuff like libiberty, bfd,
flex, binutils, tcl(!?) but it stops in tcl... Anyway we don't need it,
so we proceed to build it one by one.
$ cd gas; make; make install
$ cd ../ld; make; make install
Now put /usr/local/epoc32/bin in your path and proceed to gcc.
$ PATH=/usr/local/epoc32/bin:$PATH
$ export $PATH
$ cd ../gcc
$ make LANGUAGES="c c++"
$ make LANGUAGES="c c++" install;
I now made a symlink of all of the arm-pe-* tools in
/usr/local/epoc32/bin to their proper counterparts, i.e from arm-pe-c++
to c++ and so on.
- In this step we install the headerfiles/libs from the SDK.
I've copied the following directories from the distribution to
/usr/local/epoc32:
sysdoc.
Epoc32Ex
epoc32/include to include
epoc32/tools/*.exe to the winpgm directory. We make some wrappers later.
epoc32/Release to Release. You only need the marm subdirectory.
As the epoc developers were careless with capital/non-capital
letters, it makes probably sense to put the data on a vfat drive, or
to fix the improper capitalization as it occurs. Up till now I had
such problems with some headerfile-includes and references to gif
files from the documentation.
- Now get a fairly new wine release and install it (990815 works for me).
No development stuff is needed, just the wine executable. Mine works
best if I just feed him with an empty windows/system directory and
disable trace/debug flags.
- And now we need some glue stuff :-)
Make some wrapper code:
$ cd /usr/local/epoc32/bin
$ ln -s .winpgm bmconv
$ ln -s .winpgm cjpeg
$ ln -s .winpgm defmake
$ ln -s .winpgm deftool
$ ln -s .winpgm etouch
$ ln -s .winpgm fc4bat
$ ln -s .winpgm fnttran
$ ln -s .winpgm fontcomp
$ ln -s .winpgm makesis
$ ln -s .winpgm pdrtran
$ ln -s .winpgm pediff
$ ln -s .winpgm petran
$ ln -s .winpgm rcomp
$ ln -s .winpgm rtf2ptml
$ cat >> .winpgm << EOF
#!/bin/sh
PGM=`basename $0`
ROOT=/usr/local/epoc32/winpgm
wine "$ROOT/$PGM $*"
EOF
Now we should be ready to go. The only problem is that we do not have any Makefiles yet, and the compile process is quite complicated. Unpack this file in /usr/local/epoc32, and you get some makefiles for
some of the Epoc32ex examples.
Note: I put some of the needed gcc flags into the specs file itself, so please
replace /usr/local/epoc32/lib/gcc-lib/arm-pe/cygnus-2.7.2-960323/specs with
this file.
I compared all the examples with their win95 built counterparts (pediff -e32),
and they were identical up to the timestamp.
I've run the Graphics example, and it worked (you get a SIS file, which you
have to install). NOTE: It has a submenu, which freezes up my 5mxPro.
I had to modify the eikecho example (by throwing out E32Dll from echoeng.cpp),
as my make chain can't yet link against a self made dll.
If you want to generate the AIF file too, then get the
source for genaif. I had to write this program, as aiftool uses
the Epoc emulator, which was too much for wine, as the emulator is not even
running under Windows on my notebook :-).
Here you find the description of the AIF
and MBM fileformats, as far as I could understand it.
If you want to build help files, just take your trusty S5, fire up data, write
the help file :-), and name it .hlp (after you finished writing).
I still have to figure out how to start help from the program.
Last change: Thu Aug 10 16:42:43 CEST 2000