Unit 1.2: The Symbian Platform

Transcription

Unit 1.2: The Symbian Platform
ICE503 Operating Sytems
Symbian OS Introduction
Company, phones and architecture
Project
#
Group
Assigned Phone
1
KANG JongGu
KIM Eunjo
YUN Donghui
Nokia Communicator 9500
2
PARK JongMin
KIM Byounoh
KIM Sungil
Nokia Communicator 9500
3
JIN HyunSeok
CHOI ChangBae
HAN JuYeun
Nokia 7710
4
KIM GwangHun
Lee ChangHwan
Nokia 7710
5
CHONG PohKit
WHANG SeungHyun
DAO Yuan
Nokia 7710
6
JANG SeongHun
PARK Taesoo
KIM JeongDae
Nokia 7710
7
YOON JunHo
YOO HyunJae
N-Gage QD
8
YOON SungJune
KIM JangSeong
KIM Daehyun
2 x N-Gage QD
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
2
What is Symbian
Symbian is an independent, for-profit company
whose mission is to establish Symbian OS as the
world standard for mobile digital data systems,
primarily for use in cellular telecoms
Symbian is a software licensing company that
develops and supplies the advanced, open,
standard operating system – Symbian OS – for
data-enabled mobile phones.
Symbian was established as a private
independent company in June 1998
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
3
Owners of Symbian Ltd.
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
4
Licensees
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
5
World Mobile OS market
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
6
Psion Computers, Series 5 MX
16MB RAM
36MHz ARM 710T
640 by 240 mono screen
Java soft loaded
One month on 2AA batteries
CF card slot
Introduced 2000
OS EPOC32 (currently Symbian OS)
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
7
Ericsson R380s
Smart Phone
Size of a mobile phone
Built in PDA
Touchscreen
WAP browser
Voice notes
Speaker phone
Introduced 2001
Symbian OS v5
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
8
Nokia 9210 Communicator
Size of a mobile
phone
Full colour screen
Email messaging
Web/WAP browser
Built in PDA
Keyboard
Speaker phone
Introduced 2001
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
9
Nokia 7650
First v6.1 Symbian OS phone
Open platform
Digital Camera & MMS
GPRS, Bluetooth & IR
Colour 1/4 VGA
5 way joystick selector
Nokia’s Series 60 v0.9
Reference Design
Introduced 2002
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
10
Today – a wide range of phones
http://www.symbian.com/phones/index.html
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
11
Symbian OS Overview
Highly optimised, pre-emptive, multitasking,
operating system
redesigned from scratch in 1994 as a 32-bit OS
>95% written in C++, some C & assembler
client-server architecture
More than just an OS
class framework
suite of organising and communicating
applications
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
12
Symbian OS versions
OS versions
EPOC (v5).
OS was renamed to Symbian after that version.
Symbian
Symbian
Symbian
Symbian
OS
OS
OS
OS
6.0, 6.1
7.0
8.0, 8.1
9.1
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
13
Generic Technologies
EPOC Release 5
HTML
Java
PC Connectivity
IrDA
SMS
Symbian OS v
6.0
WAP
JavaPhone API
Introduction to...
Symbian OS v 6.1
Bluetooth & GPRS
Java MIDP
In-Target App Debugging
Enhanced text manipulation
Symbian OS v 7.0 / 7.0s
Multimode ETel
ECOM
HW acceleration
IPv6
Transport Framework for both
HTTP & WAP
Test UI called TechView
CodeWarrior IDE supported
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
14
Symbian OS v 8.0
Audio and video support for recording, playback and
streaming; image conversion
Significant upgrade to Java including CLDC 1.1
(Connected Limited Device Configuration) and
multimedia
Support of multiple displays and scalable UIs
better PAN support: Bluetooth 1.1, USB 1.1
Security improvements
Software development
J2ME MIDP 2.0 supported by all mainstream Java tools
C++
Metrowerks CodeWarrior
Borland C++ BuilderX
MS Visual Studio
PC emulation environment
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
15
Symbian OS v9.1 – Future of
Symbian OS
New Features:
RTP (Realtime Transfer Protocol) stack.
Bluetooth
support for Bluetooth eSCO and Bluetooth Stereo
headset profiles
Platform Security
Introduce certificates for applications to perform
sensible operations
Developing for Symbian OS – native system and
application development in C++
CodeWarrior and (from 2005H2) Eclipse-based
IDEs.
Java MIDP 2.0 supported by all mainstream Java
tools.
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
16
Symbian OS Architecture
Phone UI
Design
Phone UI
Design
Phone UI
Design
Phone UI
Design
Symbian OS
Symbian Application Engines
20%
20%
Symbian Middleware
(System Libraries & System Servers)
>55%
Symbian Base
<5%
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
17
Component Architecture
Agenda
Engines
Middleware:
Java
MIDP
Contacts
Java Phone
Office
Messaging
Messaging
SMS
XVM / Personal Java
POP3
Application Framework
GUI framework
Text
Personal Area
Networking BlueTooth
Multimedia
Base
Graphics
Comms
TCP
Telephony
IR
Image Sound
USB
Video
Browsing
GSM
Security
s/w install
File Server
User Library
Kernel Process
Kernel Executive
IP
MMS
IMAP4
Fax
HTTP
WAP
GPRS
CDMA
cryptography
certificate management
Device Drivers
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
18
Application UIs
App UI
& Views
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
19
Desktop Views
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
20
App UI is constructed from controls
in GUI
GUI system:
GUI
Uikon core +
Qikon on UIQ,
Avkon on Series 60
or Ckon on Series 80
App UI
& Views
Controls
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
21
GUI is constructed from graphics
library
GUI
App UI
& Views
Graphics
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
22
Data management
GUI
App UI
& Views
Graphics
Application
Engine
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
23
Support libraries
GUI
App UI
& Views
Graphics
Application
Engine
Engine
Support
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
24
Base provides interface with
hardware
GUI
App UI
& Views
Graphics
Application
Engine
Engine
Support
Base
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
25
Comms
GUI
App UI
& Views
Graphics
Engine
Support
Comms
Application
Engine
Application
Comms
Base
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
26
Java
Java App
GUI
Midp/CLDC
Classes
App UI
& Views
Graphics
KVM
Engine
Support
Comms
Application
Engine
Application
Comms
Base
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
27
Nokia Software Platforms
•Series 30 is the lowest-cost
platform, designed for entrylevel mobile phones that
feature voice and basic
messaging functionalities
•Series 40 is a versatile,
efficient and highly costeffective feature phone
platform, particularly suited
for the mobile phone product
range
•S60 platform is the world's
leading rich smartphone
software platform, available
for OEM licensing
Introduction to...
•Series 80 is a high-end
software platform optimized
for enterprise Communicators
and smartphones, enabling a
two-hand operated QWERTY
keyboard and a wide screen
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
28
ICE503 Operating Sytems
Symbian OS Introduction
Tools and Building System
Series 60
Tools
Tools for development
Software Development Kit (SDK)
Emulator
Integrated Development environment (IDE)
Eclipse (Carbide.c++)
Visual Studio .NET 2003 (Carbide.vs)
CodeWarrior for Symbian OS
Communication for in-device installation
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
30
Installation Steps
For example, Carbide.c++, Series 60
Download & Install Carbide.c++ Express Edition 1.0
http://www.forum.nokia.com/main/0,,034-1001,00.html
Download & Install Symbian Series 60 SDK
http://www.forum.nokia.com/main/0,,034-4,00.html
Download & Install ActivePerl-5.6.1.xxx
http://www.activestate.com/Products/Download/Download.plex?id=ActivePerl
Install Symbian Connect Software
Provided with the phone
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
31
SDK - Directory Overview
Symbian
8.0a
%EPOCROOT%
S60_2nd_FP2_CW
examples for Techview
S60 documentation
examples for s60
Extra tools
Emulator, headers and libraries
Examples
Series60Doc
Series60Ex
Series60Tools
epoc32
build
Introduction to...
build files
data
emulator configuration files
gcc
cross compiler
include
system include files
release
emulator and other binaries
tools
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
32
SDK - The Emulator
What do we use the emulator
for?
Program development and
testing with built-in debugging
facilities (e.g. heap failure
tool)
Bluetooth, camera and
Ethernet can be added as
plug-in
C:\> epoc -rel
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
33
SDK - Files & Programs
Phone Drives:
• z: used for ROM
• c: used for Internal storage (RAM)
• d:, e:... : Other drives (CF)
Drive mapping
c: to \epoc32\winscw\c (and other drives)
z: to \epoc32\release\winscw\variant\z
This prevents interference between debug
and non-debug emulator variants
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
34
Target Binaries
Target Variants
WINSCW
CW_IDE
ARM4
ARMI
Thumb
udeb
urel
ARM4
Projects can be built for the ARM platform in
three modes: ARM4 (32-bit), ARMI and
THUMB (16-bit)
Phone manufactures specify what ABI to use for
a phone
ARMI instruction set runs on both THUMB and
ARM4 => best option for 3rd parties
ARMI
THUMB
ARM
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
35
Building “Hello World”
Remember %EPOCROOT%
Let's say C:\Symbian\7.0s\S60_v21_CW\
Directory
%EPOCROOT%\Series60Ex\helloworldbasic\
bld.inf (in group)
helloworld.cpp (and others, in src)
helloworld.mmp (in group)
Enter the group and type:
bldmake bldfiles
abld build winscw udeb
epoc
(if working with Code Warrior)
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
36
Building “Hello World”
bld.inf: This is the build manifest. It simply
contains a list of the .mmp files associated
with this project. All projects have a bld.inf.
PRJ_MMPFILES
HelloWorldBasic.mmp
helloworld.cpp: Source code
helloworld.mmp: This is the meta-make file.
Symbian has its own build tools and doesn’t
use make. Instead using bldmake
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
37
Building “Hello World”
The Building Process
Create the project definition files .mmp
Create the component description file bld.inf
Run the bldmake bldfiles command
Run the abld build command
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
38
Building “Hello World”
invoke
.inf
bldmake
abld.bat
invoke
.mmp
makmake
.mcp
abld
calls
.wins
CodeWarrior
.arm4
.armi
.thumb
Command line /
emulator
Target
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
39
Building “Hello World”
helloworldbasic.mmp
TARGET
TARGETTYPE
UID
TARGETPATH
HelloWorldBasic.app
app
0x100039CE 0x10005B91
\system\apps\helloworldbasic
SOURCEPATH
SOURCE
SOURCE
SOURCE
SOURCE
SOURCE
..\src
HelloWorldBasic.cpp
HelloWorldBasicApplication.cpp
HelloWorldBasicAppView.cpp
HelloWorldBasicAppUi.cpp
HelloWorldBasicDocument.cpp
SOURCEPATH
RESOURCE
..\group
HelloWorldBasic.rss
USERINCLUDE
..\inc
SYSTEMINCLUDE
\epoc32\include
LIBRARY
euser.lib apparc.lib cone.lib eikcore.lib avkon.lib
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
40
Building “Hello World”
TARGET is simply the name of the resulting app.
TARGETTYPE states that we want to build a GUI app. Other options
are DLL, etc.
Every app has a unique UID. All GUI apps share the UID 0x100039CE
and then have a second unique UID.
The TARGETPATH simply tells the make program where to put the
resulting app. It must be a sub directory of \system\apps\.
The rest of the file lists the SOURCES and includes for the project.
As we saw, the .mmp file will live in a directory called “group”. Just a
Symbian convention.
helloworld.hrh and helloworld.rss: these are a so-called RESOURCE
files. They allow to define the menus and strings for the program
without writing actual GUI code.
The rest of the files are includes and library files.
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
41
Building “Hello World”
Object files:
C:\Symbian\7.0s\Series60_
v21_CW\Epoc32\BUILD\SY
MBIAN\7.0S\SERIES60_V21
_CW\SERIES60EX\HELLOW
ORLDBASIC\GROUP\HELLO
WORLDBASIC\WINSCW\UD
EB
Application file:
C:\Symbian\7.0s\Series60_
v21_CW\Epoc32\release\wi
nscw\udeb\z\system\apps\
HELLOWORLDBASIC
•
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
42
Building “Hello World”
bldmake bldfiles
abld makefile cw_ide
For Code Warrior IDE
For ARMI
bldmake bldfiles
abld build armi urel
abld clean winscw udeb
Remove Build
abld reallyclean winscw
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
43
Building an Application (.app)
.bmp
.hrh
.cpp
.h
.rh
.rss
bmconv
cl
.rsg
epocrc
.mbm
.rss
.obj
link
.app
%EPOCROOT%\
epoc32\include
..\z\system\app\appname
aiftool
.rsc
.aif
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
44
Building an application (.app)
Sis folder includes .pkg file which is used when
generating an installation package (.sis file) for
target device.
The .sis file is very simple to generate. Just open
DOS prompt, open the install –folder and type
makesis my_application_name.pkg
The command generates the .sis file which can be
sent to the target device e.g. via Bluetooth, Infrared
or over the internet. The target device takes care of
the rest of the installation process.
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
45
Building an application (.app)
SISAR
AIF Builder
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
46
ICE503 Operating Sytems
Symbian OS Introduction
Software Basics
OS Components
Process Boundaries
Server
Server
Application
Application
Application
Engine
Engine
DLL
Boundary
Privilege
Boundary
Kernel
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
48
OS Components
Kernel manages the machine hardware such as
RAM and hardware devices
Uses hardware-supported privileged mode
Other user-mode programs can only access system
resources through kernel API
Applications are programs with UI
Run in separate processes
Own virtual address space
Servers are programs without user interface
Provide APIs for the clients (clients or other servers)
Server-client = Kernel mode-user mode
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
49
OS Components
An engine is a part of an application that
manipulates its data (opposing to user interaction)
Has sense for complex enough applications
Objective is good software design
Separate source module, DLL or DLLs
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
50
Processes
Processes are composed of threads
Process virtual address space is translated by the MMU
Threads share the same address space in the same
process
Threads are preemptively scheduled by the kernel
The kernel is the highest priority thread.
When switching execution from one thread to another
is called Context Switching (very expensive)
Normal applications have only one thread
Closely related servers maybe use one process
More than one client? How? --> Active Objects
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
51
Executables
Application Engine
Server API
Server
.exe
Application UI
.app
.dll
.dll
System Libs: cone.lib, wserv.lib, estor.lib
euser.lib
User Library: euser.dll
Kernel: ekern.exe
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
52
Executables
Code is packaged in different ways
.exe programs has a single entry point. When
launched, new process and main thread are
created.
DLL has potentially main entry points. Is loaded in
the context of an existing thread
Shared libraries (generally .dll)
Polymorphic DLL. Implement an abstract API (such
drivers) or EIKON applications (.app, .prn, .prt)
Executables in ROM are directly loaded.
Executables somewhere else, need to be loaded
in RAM first.
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
53
Executables
Kernel has to two main parts:
Kernel executive (ekern.exe) runs privileged code
of threads that usually execute in user-mode (so
can be preempted)
Kernel server is the main thread of its own
process and runs always privileged (no
preemption)
Euser.dll is the user library. Is the lowest level
user-mode code
LIB files are static libraries. Programs need to
be linked against them to use its DLLs
functionalities
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
54
Executables
Application
Function call
.exe
DLL
two types
Static interface DLL
.h
.lib
.dll
Polymorphic interface DLL
.h
.app
.ldd plug-in
.pdd
...
Introduction to...
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
55
Executables
IMPORT_C void Fn1()
X.h
IMPORT_C void Fn4()
code
.
#include
"x.h"
.
.
Fn1()
.
.
.
Fn4()
.
.
.
Introduction to...
Client
executable
X.lib
1
2
3
4
5
6
.
.
.
exports
table
1
2
3
4
5
6
.
.
.
code
EXPORT_C void Fn1()
EXPORT_C void Fn4()
X.dll
Tomas Sanchez, 2006 (Original slide set: Kari Salo)
56