symbian os introduction - tomas-sanchez.comtomas-sanchez.com/material/symbian_introduction.pdf ·...
TRANSCRIPT
ICE503 Operating Sytems
Symbian OS IntroductionSymbian OS IntroductionCompany, phones and architectureCompany, phones and architecture
2Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
ProjectProject
# Group Assigned Phone
1KANG JongGuKIM EunjoYUN Donghui
Nokia Communicator 9500
2PARK JongMinKIM ByounohKIM Sungil
Nokia Communicator 9500
3JIN HyunSeokCHOI ChangBaeHAN JuYeun
Nokia 7710
4 KIM GwangHunLee ChangHwan
Nokia 7710
5CHONG PohKitWHANG SeungHyunDAO Yuan
Nokia 7710
6JANG SeongHunPARK TaesooKIM JeongDae
Nokia 7710
7 YOON JunHoYOO HyunJae
N-Gage QD
8YOON SungJuneKIM JangSeongKIM Daehyun
2 x N-Gage QD
3Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
What is SymbianWhat 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
7Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Psion Computers, Series 5 MXPsion Computers, Series 5 MX
16MB RAM36MHz ARM 710T640 by 240 mono screen Java soft loadedOne month on 2AA batteriesCF card slotIntroduced 2000OS EPOC32 (currently Symbian OS)
8Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Ericsson R380sEricsson R380s
Smart PhoneSize of a mobile phoneBuilt in PDATouchscreenWAP browserVoice notesSpeaker phoneIntroduced 2001Symbian OS v5
9Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Size of a mobile phoneFull colour screenEmail messagingWeb/WAP browserBuilt in PDAKeyboardSpeaker phoneIntroduced 2001
Nokia 9210 CommunicatorNokia 9210 Communicator
10Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Nokia 7650Nokia 7650
First v6.1 Symbian OS phoneOpen platformDigital Camera & MMSGPRS, Bluetooth & IRColour 1/4 VGA5 way joystick selectorNokia’s Series 60 v0.9 Reference DesignIntroduced 2002
11Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Today – a wide range of phonesToday – a wide range of phones
http://www.symbian.com/phones/index.html
12Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Symbian OS OverviewSymbian 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 & assemblerclient-server architecture
More than just an OSclass frameworksuite of organising and communicating applications
13Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Symbian OS versionsSymbian OS versions
OS versionsEPOC (v5).
OS was renamed to Symbian after that version.Symbian OS 6.0, 6.1Symbian OS 7.0Symbian OS 8.0, 8.1Symbian OS 9.1
14Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Generic TechnologiesGeneric Technologies
EPOC Release 5HTMLJavaPC ConnectivityIrDASMS
Symbian OS v 6.0
WAPJavaPhone API
Symbian OS v 6.1Bluetooth & GPRSJava MIDPIn-Target App DebuggingEnhanced text manipulation
Symbian OS v 7.0 / 7.0sMultimode ETelECOMHW accelerationIPv6Transport Framework for both HTTP & WAPTest UI called TechViewCodeWarrior IDE supported
15Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Symbian OS v 8.0Symbian OS v 8.0
Audio and video support for recording, playback and streaming; image conversionSignificant upgrade to Java including CLDC 1.1 (Connected Limited Device Configuration) and multimediaSupport of multiple displays and scalable UIsbetter PAN support: Bluetooth 1.1, USB 1.1Security improvementsSoftware development
J2ME MIDP 2.0 supported by all mainstream Java tools C++
Metrowerks CodeWarriorBorland C++ BuilderX MS Visual Studio
PC emulation environment
16Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Symbian OS v9.1 – Future of Symbian OS v9.1 – Future of Symbian OSSymbian 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.
17Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Symbian OS ArchitectureSymbian OS Architecture
Symbian Base
Symbian Middleware(System Libraries & System Servers)
Symbian Application Engines
Sym
bia
n O
S
<5%
>55%
20%
Phone UIDesign
Phone UIDesign
Phone UIDesign
Phone UIDesign
20%
18Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Component ArchitectureComponent Architecture
Middle-ware:
BaseKernel ExecutiveKernel Process
User Library
Device Drivers
File Server
Engines ContactsAgenda BrowsingMessagingOffice
Messaging
Application Framework
MultimediaSecurity
Telephony
Comms
Personal Area Networking
Java
s/w install
GSM
TCP
SMS
Image
BlueTooth
GUI framework
certificate management
cryptography
GPRS CDMA
IP HTTP WAP
MMS
POP3 IMAP4 Fax
Sound Video
IR USB
Text Graphics
XVM / Personal Java
MIDP Java Phone
19Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
App UI & Views
Application UIsApplication UIs
21Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
GUI
App UI & Views
GUI system:Uikon core +Qikon on UIQ,
Avkon on Series 60or Ckon on Series 80
App UI is constructed from controls App UI is constructed from controls in GUIin GUI
Controls
22Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Graphics
GUI
App UI & Views
GUI is constructed from graphics GUI is constructed from graphics librarylibrary
23Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
ApplicationEngine
Graphics
GUI
App UI & Views
Data managementData management
24Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
ApplicationEngine
EngineSupport
Graphics
GUI
App UI & Views
Support librariesSupport libraries
25Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
ApplicationEngine
Base
EngineSupport
Graphics
GUI
App UI & Views
Base provides interface with Base provides interface with hardwarehardware
26Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Comms
Base
EngineSupport
Graphics
GUI
App UI & Views
ApplicationComms
CommsComms
ApplicationEngine
27Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Comms
ApplicationEngine
Base
EngineSupport
Graphics
GUI
App UI & Views
KVM
Midp/CLDCClasses
Java App
ApplicationComms
JavaJava
28Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Nokia Software PlatformsNokia Software Platforms
•Series 30 is the lowest-cost platform, designed for entry-level mobile phones that feature voice and basic messaging functionalities
•Series 40 is a versatile, efficient and highly cost-effective 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
•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
ICE503 Operating Sytems
Symbian OS IntroductionSymbian OS IntroductionTools and Building SystemTools and Building System
Series 60
30Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
ToolsTools
Tools for developmentSoftware Development Kit (SDK)
EmulatorIntegrated Development environment (IDE)
Eclipse (Carbide.c++)Visual Studio .NET 2003 (Carbide.vs)CodeWarrior for Symbian OS
Communication for in-device installation
31Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Installation StepsInstallation Steps
For example, Carbide.c++, Series 60
Download & Install Carbide.c++ Express Edition 1.0http://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 SoftwareProvided with the phone
32Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
SDK - Directory OverviewSDK - Directory Overview
8.0a
epoc32Emulator, headers and libraries
examples for s60
S60_2nd_FP2_CW
Examples
Series60Doc
Series60Ex
Series60Tools
build
release
tools
include
data
S60 documentation
gcc cross compiler
emulator configuration files
build files
system include files
emulator and other binaries
Symbian
examples for Techview
Extra tools
%EPOCROOT%
33Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
SDK - The EmulatorSDK - 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
34Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
SDK - Files & ProgramsSDK - 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 debugand non-debug emulator variants
35Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Target BinariesTarget Binaries
Target VariantsWINSCWCW_IDEARM4ARMIThumb
udeb
urel
ARM
ARM4 ARMI THUMB
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
36Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Building “Hello World”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 bldfilesabld build winscw udeb (if working with Code Warrior)
epoc
37Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Building “Hello World”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.
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
PRJ_MMPFILESHelloWorldBasic.mmp
38Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Building “Hello World”Building “Hello World”
Run the abld build command
Run the bldmake bldfiles command
Create the project definition files .mmp
Create the component description file bld.inf
The Building Process
39Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Building “Hello World”Building “Hello World”
makmakeabld
bldmake.inf
.mmp
abld.bat
.mcp.wins
.arm4
.armi
.thumbCodeWarrior
Command line / emulator Target
invoke
invoke
invoke
calls
40Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Building “Hello World”Building “Hello World”
TARGET HelloWorldBasic.appTARGETTYPE appUID 0x100039CE 0x10005B91TARGETPATH \system\apps\helloworldbasic
SOURCEPATH ..\srcSOURCE HelloWorldBasic.cppSOURCE HelloWorldBasicApplication.cpp SOURCE HelloWorldBasicAppView.cppSOURCE HelloWorldBasicAppUi.cppSOURCE HelloWorldBasicDocument.cpp
SOURCEPATH ..\groupRESOURCE HelloWorldBasic.rss
USERINCLUDE ..\inc
SYSTEMINCLUDE \epoc32\include
LIBRARY euser.lib apparc.lib cone.lib eikcore.lib avkon.lib
helloworldbasic.mmp
41Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Building “Hello World”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.
42Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Building “Hello World”Building “Hello World”
Object files: C:\Symbian\7.0s\Series60_v21_CW\Epoc32\BUILD\SYMBIAN\7.0S\SERIES60_V21_CW\SERIES60EX\HELLOWORLDBASIC\GROUP\HELLOWORLDBASIC\WINSCW\UDEB
Application file: C:\Symbian\7.0s\Series60_v21_CW\Epoc32\release\winscw\udeb\z\system\apps\HELLOWORLDBASIC
•
43Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Building “Hello World”Building “Hello World”
bldmake bldfilesabld makefile cw_ide
bldmake bldfiles abld build armi urel
abld clean winscw udeb
abld reallyclean winscw
For Code Warrior IDE
For ARMI
Remove Build
44Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Building an Application (.app)Building an Application (.app)
.cpp
cl
link
.obj
.h .rh
.hrh
.rss
epocrc.rsg
.app .rsc
.bmp
bmconv
.mbm .rss
aiftool
.aif
%EPOCROOT%\epoc32\include
..\z\system\app\appname
45Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Building an application (.app)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
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.
makesis my_application_name.pkg
46Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
Building an application (.app)Building an application (.app)
SISAR
AIF Builder
ICE503 Operating Sytems
Symbian OS IntroductionSymbian OS IntroductionSoftware BasicsSoftware Basics
48Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
OS ComponentsOS Components
Server Server Application Application Application
Engine Engine
Kernel
DLL Boundary
Privilege Boundary
Process Boundaries
49Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
OS ComponentsOS Components
Kernel manages the machine hardware such as RAM and hardware devices
Uses hardware-supported privileged modeOther user-mode programs can only access system resources through kernel API
Applications are programs with UIRun in separate processesOwn virtual address space
Servers are programs without user interfaceProvide APIs for the clients (clients or other servers)Server-client = Kernel mode-user mode
50Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
OS ComponentsOS 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 designSeparate source module, DLL or DLLs
51Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
ProcessesProcesses
Processes are composed of threadsProcess virtual address space is translated by the MMU
Threads share the same address space in the same process
Threads are preemptively scheduled by the kernelThe 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 processMore than one client? How? --> Active Objects
52Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
ExecutablesExecutables
Kernel: ekern.exe
Application UI
Application Engine
euser.lib
System Libs: cone.lib, wserv.lib, estor.lib
.exe .app .dll .dll
Server
Server API
User Library: euser.dll
53Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
ExecutablesExecutables
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.
54Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
ExecutablesExecutables
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 codeLIB files are static libraries. Programs need to be linked against them to use its DLLs functionalities
55Tomas Sanchez, 2006 (Original slide set: Kari Salo)
Introduction to...
ExecutablesExecutables
Application
Function callDLL.exe
two types
Polymorphic interface DLLStatic interface DLL
.h.app.ldd.pdd. . .
.h.lib .dll plug-in