Progress on the EPOC (Symbian) port of Squeak

Edward P Luwish eluwish at uswest.com
Mon May 15 21:41:59 UTC 2000


It has been quite a while since I have written on this topic, since very
little has been done.  I am attempting to port Squeak to devices running
Symbian Ltd.'s EPOC operating system, which today includes the Psion
Series 5, Series 5mx, Series 7, Revo and Netbook mini-portable
computers, as well as a number of advanced wireless devices made by
Ericsson, Nokia, Motorola and Matsushita.

EPOC is a high-performance object-oriented operating system with
pre-emptive multitasking.  It is hardware-independent, although it
currently is available only for ARM processors (X86 support on the
way).  It is fully ROMable and has full support for any GUI one cares to
craft, with a default GUI called EIKON, optimized for small screens with
digitizers (i.e., touchscreens).  In my first attempt at EPOC support, I
will use EIKON - there may be faster and more Squeak-like interfaces at
lower levels, but EIKON will save me the trouble of dealing with input
events, scrollable viewports and byte sex until I know what I'm doing.

EPOC development is entirely in C++, the language EPOC is written in.
It expects programs to be written as DLLs which are linked into the OS
shell at runtime.  This permits multiple threads of the same code (great
for small memories and ROM), but the cost is the inability to have
read-write data in the program image.  This would be a very difficult
way to port the Squeak interpreter - all static variables would have to
be eliminated and replaced with a huge struct allocated from the heap.
This is the problem that bogged me down for almost a year.  Although
there is an alternate method of coding, designed for porting purposes,
of writing the application as an EXE with read-write data - this was
designed only for console or headless programs, with no provision for
making callouts to EPOC's graphics capabilities.

A book, "Professional Symbian Programming", was published in early 2000,
and tells how to invoke EPOC services (graphics, networking, file I/O,
etc.) from a ported C program - if not solving my problem, at least
pointing the way.  I did not want to alter interp.c in any way.  This
meant my only obstacle was the nature of the development process itself.

You see, all Symbian programming tools are organized around a process of
debugging on a simulator, then cross-compiling and downloading the
finished code to the EPOC device.  Symbian wrote an EPOC simulator for
Windows, which uses the existing Microsoft VC++ IDE for coding and
debugging.  They packaged gcc (with an ARM back end) running under
cygwin, and some translation tools to create DLLs and EXEs in the
compact EPOC format.  This instantly created three problems for me: 1) I
had to get accustomed to the Microsoft IDE, 2) My screens were too small
for the simulator, 3) Windows 95 has a problem with cygwin that causes
gcc to hang the computer.  I'll just have to live with 1 and 2 (and
admittedly, will have to learn C++, which I do not look forward to).
The third problem I solved by installing Windows 98 on Virtual PC 3.0 on
my Mac.  This solution had the additional benefits of increased
performance (over my 486 laptop) and the psychological boost of using a
Mac, which even in an emulated environment, is a superior, more stable
platform.

Now that the woes are over, the work begins.  First I did some example
program builds to get used to the Byzantine development process.  This
week I will be compiling the Squeak 2.7 interpreter and the "MacMinimal"
platform-specific module, with the goal of popping up a Transcript in a
console window on EPOC, using a fully shrunken image.  The next stage is
encapsulating the whole thing as an EIKON application using direct
window graphics.  This will all be done under simulation, so I will not
really know how good or bad the performance and "feel" will be until I
attempt to cross-compile and download the code to my Psion 5.  When I
have done all I can for the Series 5, I will try to obtain a Netbook or
Series 7, which is a high-performance [VGA-size] color EPOC
sub-notebook, and I think the absolutely ideal Squeak machine.  The fun
will really start then.  I have dreams of replacing all the existing
EPOC PIM, internet and office applications with a Squeak-based
integrated system (most of the work has already been done) that will
also be a Dynabook and everything else Squeak has to offer.  Then I can
get a real job doing what I love.

I will keep the list informed of further progress and problems.  One
problem I can already foresee is this:  in order to ensure that the
native ARM code is functionally identical to the simulated code, the SDK
imposes a limit on compilation warnings - there are currently over 1000
when compiling interp.c under VC++ 5.  I will fix these in the c code
for now, but would like to modify the Slang-to-C translator to avoid
producing them in the first place.

Of course, after it's all done, I will sign on as permanent maintainer
of the EPOC VM, at least until another EPOC developer surfaces.

Ed





More information about the Squeak-dev mailing list