View
5
Download
0
Category
Preview:
Citation preview
1 / 30
OSEK/VDX over Linux
Naohiko ShimizuTokai University, IP ARCH, In.May 29, 2013
Agenda. AgendaBakground andMotivationOS Share ofEmbedded SystemsOS Share Moving?Why Linux?Demands andProblemsCompatibilityProblemsPerformaneProblemsEduational,DevelopmentDemandsOur ProposalOrganization of theProposalNewly DevelopedodesAppliationCompilationImplementation:InterruptInterrupt OIL toon�gTask Control QuirksInterrupt MaskControli386 support odesInterrupt DispathCodeTask Dispath odeDeveloping COMpakageSupported COM APICOM/CCCA pseudoodeEduational samplesHelloworld sample CodeAvailable SampleCodesPerformaneEvaluationConlusionReferenes
2 / 30
� Bakground and Motivation� Implementation� Performane� Conlusion
Bakground and Motivation
Agenda. Bakground andMotivationOS Share ofEmbedded SystemsOS Share Moving?Why Linux?Demands andProblemsCompatibilityProblemsPerformaneProblemsEduational,DevelopmentDemandsOur ProposalOrganization of theProposalNewly DevelopedodesAppliationCompilationImplementation:InterruptInterrupt OIL toon�gTask Control QuirksInterrupt MaskControli386 support odesInterrupt DispathCodeTask Dispath odeDeveloping COMpakageSupported COM APICOM/CCCA pseudoodeEduational samplesHelloworld sample CodeAvailable SampleCodesPerformaneEvaluationConlusionReferenes
3 / 30
� Analyze urrent situation of the embedded systems w/Embedded Market Survey� Demand of embedded systems for Linux� Performane problems with migration to Linux� Strutural problems with migration to Linux� Eduational platform for embedded development
OS Share of Embedded Systems
AgendaBakground andMotivation. OS Share ofEmbeddedSystemsOS Share Moving?Why Linux?Demands andProblemsCompatibilityProblemsPerformaneProblemsEduational,DevelopmentDemandsOur ProposalOrganization of theProposalNewly DevelopedodesAppliationCompilationImplementation:InterruptInterrupt OIL toon�gTask Control QuirksInterrupt MaskControli386 support odesInterrupt DispathCodeTask Dispath odeDeveloping COMpakageSupported COM APICOM/CCCA pseudoodeEduational samplesHelloworld sample CodeAvailable SampleCodesPerformaneEvaluationConlusionReferenes
4 / 30
Embedded Systems OS share1OS 2013 2012 2011Linux 21.66 21.57 18.97FreeRTOS/eCos 9.55 9.15 14.66Inhouse 15.29 14.38 6.90Others 31.21 33.99 38.79Android 10.19 8.50 0Windows 12.10 12.42 20.69
1Embedded Market Survey 2013,2012
OS Share Moving?
AgendaBakground andMotivationOS Share ofEmbedded Systems. OS ShareMoving?Why Linux?Demands andProblemsCompatibilityProblemsPerformaneProblemsEduational,DevelopmentDemandsOur ProposalOrganization of theProposalNewly DevelopedodesAppliationCompilationImplementation:InterruptInterrupt OIL toon�gTask Control QuirksInterrupt MaskControli386 support odesInterrupt DispathCodeTask Dispath odeDeveloping COMpakageSupported COM APICOM/CCCA pseudoodeEduational samplesHelloworld sample CodeAvailable SampleCodesPerformaneEvaluationConlusionReferenes
5 / 30
OS share2 hanged from 2011 to 2012OS 2012 2011Linux 21.57 18.97FreeRTOS/eCos 9.15 14.66Inhouse 14.38 6.90Others 33.99 38.79Android 8.50 0Windows 12.42 20.69
2Embedded Market Survey 2012
Why Linux?AgendaBakground andMotivationOS Share ofEmbedded SystemsOS Share Moving?. Why Linux?Demands andProblemsCompatibilityProblemsPerformaneProblemsEduational,DevelopmentDemandsOur ProposalOrganization of theProposalNewly DevelopedodesAppliationCompilationImplementation:InterruptInterrupt OIL toon�gTask Control QuirksInterrupt MaskControli386 support odesInterrupt DispathCodeTask Dispath odeDeveloping COMpakageSupported COM APICOM/CCCA pseudoodeEduational samplesHelloworld sample CodeAvailable SampleCodesPerformaneEvaluationConlusionReferenes
6 / 30
Why use or not use Linux?3
Pros [%℄ Cons [%℄Low ost 66 No need 72Adaptability, extensibility 52 Inompatible w/existingapps 18Build-in drivers, network 40 Performane, realtimeapability 15Performane 38 Memory usage 12Control of features 32 Development tools 9Avoid ommerial 29 Support 8Memory requirements 16 Legal ambiguity 6Career development 14 Reliability 53Embedded Market Survey 2013
Demands and Problems
AgendaBakground andMotivationOS Share ofEmbedded SystemsOS Share Moving?Why Linux?. Demands andProblemsCompatibilityProblemsPerformaneProblemsEduational,DevelopmentDemandsOur ProposalOrganization of theProposalNewly DevelopedodesAppliationCompilationImplementation:InterruptInterrupt OIL toon�gTask Control QuirksInterrupt MaskControli386 support odesInterrupt DispathCodeTask Dispath odeDeveloping COMpakageSupported COM APICOM/CCCA pseudoodeEduational samplesHelloworld sample CodeAvailable SampleCodesPerformaneEvaluationConlusionReferenes
7 / 30
� Demands for funtionality of Linux{ Low ost{ Adaptability, extensibility{ Built-in drivers, networking{ Performane� Problems of Linux{ Inompatible{ Performane Our target{ Memory usage{ Development tools
Compatibility Problems
AgendaBakground andMotivationOS Share ofEmbedded SystemsOS Share Moving?Why Linux?Demands andProblems. CompatibilityProblemsPerformaneProblemsEduational,DevelopmentDemandsOur ProposalOrganization of theProposalNewly DevelopedodesAppliationCompilationImplementation:InterruptInterrupt OIL toon�gTask Control QuirksInterrupt MaskControli386 support odesInterrupt DispathCodeTask Dispath odeDeveloping COMpakageSupported COM APICOM/CCCA pseudoodeEduational samplesHelloworld sample CodeAvailable SampleCodesPerformaneEvaluationConlusionReferenes
8 / 30
� Task model{ Priority model{ IPC{ Memory model� API Our target� Con�guration� Devie driver
Performane Problems
AgendaBakground andMotivationOS Share ofEmbedded SystemsOS Share Moving?Why Linux?Demands andProblemsCompatibilityProblems. PerformaneProblemsEduational,DevelopmentDemandsOur ProposalOrganization of theProposalNewly DevelopedodesAppliationCompilationImplementation:InterruptInterrupt OIL toon�gTask Control QuirksInterrupt MaskControli386 support odesInterrupt DispathCodeTask Dispath odeDeveloping COMpakageSupported COM APICOM/CCCA pseudoodeEduational samplesHelloworld sample CodeAvailable SampleCodesPerformaneEvaluationConlusionReferenes
9 / 30
� Hard realtime{ kernel loks are dereasing{ some drivers have still loks� Single address spae to multiple virtual addressing{ Task swithing time Our target{ IPC performane
Eduational, Development Demands
AgendaBakground andMotivationOS Share ofEmbedded SystemsOS Share Moving?Why Linux?Demands andProblemsCompatibilityProblemsPerformaneProblems. Eduational,DevelopmentDemandsOur ProposalOrganization of theProposalNewly DevelopedodesAppliationCompilationImplementation:InterruptInterrupt OIL toon�gTask Control QuirksInterrupt MaskControli386 support odesInterrupt DispathCodeTask Dispath odeDeveloping COMpakageSupported COM APICOM/CCCA pseudoodeEduational samplesHelloworld sample CodeAvailable SampleCodesPerformaneEvaluationConlusionReferenes
10 / 30
� Faster prototyping than ISS� Easy testing environment for the embedded systems� seminar/leture materials{ OSEK/VDX is the standard OS for ET-Roboon
Our Proposal
AgendaBakground andMotivationOS Share ofEmbedded SystemsOS Share Moving?Why Linux?Demands andProblemsCompatibilityProblemsPerformaneProblemsEduational,DevelopmentDemands. Our ProposalOrganization of theProposalNewly DevelopedodesAppliationCompilationImplementation:InterruptInterrupt OIL toon�gTask Control QuirksInterrupt MaskControli386 support odesInterrupt DispathCodeTask Dispath odeDeveloping COMpakageSupported COM APICOM/CCCA pseudoodeEduational samplesHelloworld sample CodeAvailable SampleCodesPerformaneEvaluationConlusionReferenes
11 / 30
RTOS(OSEK/VDX) over LinuxRun RTOS as a proess of Linux� Use RTOS's task struture for ompatibility� Improve task swithing performane� Easy development as usual Linux appliations
Organization of the Proposal
AgendaBakground andMotivationOS Share ofEmbedded SystemsOS Share Moving?Why Linux?Demands andProblemsCompatibilityProblemsPerformaneProblemsEduational,DevelopmentDemandsOur Proposal. Organization ofthe ProposalNewly DevelopedodesAppliationCompilationImplementation:InterruptInterrupt OIL toon�gTask Control QuirksInterrupt MaskControli386 support odesInterrupt DispathCodeTask Dispath odeDeveloping COMpakageSupported COM APICOM/CCCA pseudoodeEduational samplesHelloworld sample CodeAvailable SampleCodesPerformaneEvaluationConlusionReferenes
12 / 30
ToppersATK1 (OSEK/VDX) + original COM
i386 proessor dependent ode
POSIX interfae layer
Newly developed ode
Newly Developed odes
AgendaBakground andMotivationOS Share ofEmbedded SystemsOS Share Moving?Why Linux?Demands andProblemsCompatibilityProblemsPerformaneProblemsEduational,DevelopmentDemandsOur ProposalOrganization of theProposal. Newly DevelopedodesAppliationCompilationImplementation:InterruptInterrupt OIL toon�gTask Control QuirksInterrupt MaskControli386 support odesInterrupt DispathCodeTask Dispath odeDeveloping COMpakageSupported COM APICOM/CCCA pseudoodeEduational samplesHelloworld sample CodeAvailable SampleCodesPerformaneEvaluationConlusionReferenes
13 / 30
Code sizeFuntionality linesOSEK System generator template 101Arhiteture depend ode 673Platform depend ode 423COM CCCA 427OIL template 41Development timeFuntionality oding(days) total(days)OSEK 3 7COM 2 3
Appliation Compilation
AgendaBakground andMotivationOS Share ofEmbedded SystemsOS Share Moving?Why Linux?Demands andProblemsCompatibilityProblemsPerformaneProblemsEduational,DevelopmentDemandsOur ProposalOrganization of theProposalNewly Developedodes. AppliationCompilationImplementation:InterruptInterrupt OIL toon�gTask Control QuirksInterrupt MaskControli386 support odesInterrupt DispathCodeTask Dispath odeDeveloping COMpakageSupported COM APICOM/CCCA pseudoodeEduational samplesHelloworld sample CodeAvailable SampleCodesPerformaneEvaluationConlusionReferenes
14 / 30
App. OIL System Generator(SG) OIL template
generated on�g �lesApp. soureOSEK kernel soure C ompiler/linker
COM soureLinux lib Exeutable
Implementation: Interrupt
AgendaBakground andMotivationOS Share ofEmbedded SystemsOS Share Moving?Why Linux?Demands andProblemsCompatibilityProblemsPerformaneProblemsEduational,DevelopmentDemandsOur ProposalOrganization of theProposalNewly DevelopedodesAppliationCompilation. Implementation:InterruptInterrupt OIL toon�gTask Control QuirksInterrupt MaskControli386 support odesInterrupt DispathCodeTask Dispath odeDeveloping COMpakageSupported COM APICOM/CCCA pseudoodeEduational samplesHelloworld sample CodeAvailable SampleCodesPerformaneEvaluationConlusionReferenes
15 / 30
� POSIX signals interrupt soures� signal name ISR table entry� signal mask ontrol interrupt priority� unhandled (not listed in OIL) signal will kill the appliation
No. Signal soure explanation0 SIGALRM interval timer system lok1 SIGUSR1 app. or driver user int2 SIGUSR23 SIGINT keyboard keyboard interrupt4 SIGPOLL key pushed
Interrupt OIL to on�g
AgendaBakground andMotivationOS Share ofEmbedded SystemsOS Share Moving?Why Linux?Demands andProblemsCompatibilityProblemsPerformaneProblemsEduational,DevelopmentDemandsOur ProposalOrganization of theProposalNewly DevelopedodesAppliationCompilationImplementation:Interrupt. Interrupt OIL toon�gTask Control QuirksInterrupt MaskControli386 support odesInterrupt DispathCodeTask Dispath odeDeveloping COMpakageSupported COM APICOM/CCCA pseudoodeEduational samplesHelloworld sample CodeAvailable SampleCodesPerformaneEvaluationConlusionReferenes
16 / 30
� OIL template onvert user OIL to on�guration �le.� Only listed ISR in OIL will be used in setup.
ISR Usr2ISR fCATEGORY = 2 ;PRIORITY = 1 ;ENTRY = 2 ;g ; !vo id i s r f u n s e t u p ( vo id ) fi s r f u n [ 0 ℄ = ISR2 SYMBOL( TimerISR ) ;i s r f u n [ 1 ℄ = UNUSED INT SYMBOL ( ) ;i s r f u n [ 2 ℄ = ISR2 SYMBOL( Usr2ISR ) ;i s r f u n [ 3 ℄ = UNUSED INT SYMBOL ( ) ;i s r f u n [ 4 ℄ = UNUSED INT SYMBOL ( ) ;i s r r u n [ 0 ℄ = RISR2 SYMBOL( TimerISR ) ;i s r r u n [ 1 ℄ = RUNUSED INT SYMBOL( ) ;i s r r u n [ 2 ℄ = RISR2 SYMBOL( Usr2ISR ) ;i s r r u n [ 3 ℄ = RUNUSED INT SYMBOL( ) ;i s r r u n [ 4 ℄ = RUNUSED INT SYMBOL( ) ;g
Task Control Quirks
AgendaBakground andMotivationOS Share ofEmbedded SystemsOS Share Moving?Why Linux?Demands andProblemsCompatibilityProblemsPerformaneProblemsEduational,DevelopmentDemandsOur ProposalOrganization of theProposalNewly DevelopedodesAppliationCompilationImplementation:InterruptInterrupt OIL toon�g. Task ControlQuirksInterrupt MaskControli386 support odesInterrupt DispathCodeTask Dispath odeDeveloping COMpakageSupported COM APICOM/CCCA pseudoodeEduational samplesHelloworld sample CodeAvailable SampleCodesPerformaneEvaluationConlusionReferenes
17 / 30
� Use signal mask for priority based interrupt mask� Use sleep system all for CPU halt� Servie routines{ sys start timer : start interval timer{ sys exit : safely exit{ enable int : enable related signal masks{ disable int : disable related signal masks{ halt pu : sleep very long time{ sys kbhit : keyboard polling{ sys raise : raise the signal
Interrupt Mask Control
AgendaBakground andMotivationOS Share ofEmbedded SystemsOS Share Moving?Why Linux?Demands andProblemsCompatibilityProblemsPerformaneProblemsEduational,DevelopmentDemandsOur ProposalOrganization of theProposalNewly DevelopedodesAppliationCompilationImplementation:InterruptInterrupt OIL toon�gTask Control Quirks. Interrupt MaskControli386 support odesInterrupt DispathCodeTask Dispath odeDeveloping COMpakageSupported COM APICOM/CCCA pseudoodeEduational samplesHelloworld sample CodeAvailable SampleCodesPerformaneEvaluationConlusionReferenes
18 / 30
vo id s e t i p l ( u i n t 8 t i p l ) fs i g s e t t i n t f l a g ;i n t i ;i f ( i f l a g ) fs i g emp t y s e t (& i n t f l a g ) ;f o r ( i =0; i
i386 support odes
AgendaBakground andMotivationOS Share ofEmbedded SystemsOS Share Moving?Why Linux?Demands andProblemsCompatibilityProblemsPerformaneProblemsEduational,DevelopmentDemandsOur ProposalOrganization of theProposalNewly DevelopedodesAppliationCompilationImplementation:InterruptInterrupt OIL toon�gTask Control QuirksInterrupt MaskControl. i386 supportodesInterrupt DispathCodeTask Dispath odeDeveloping COMpakageSupported COM APICOM/CCCA pseudoodeEduational samplesHelloworld sample CodeAvailable SampleCodesPerformaneEvaluationConlusionReferenes
19 / 30
Arhiteture depend odes are separated from POSIX odes. Weused inline assembler for these odes.� Interrupt dispath ode for EIP/ESP manipulation� Task dispath ode for EIP/SP manipulation
Interrupt Dispath Code
AgendaBakground andMotivationOS Share ofEmbedded SystemsOS Share Moving?Why Linux?Demands andProblemsCompatibilityProblemsPerformaneProblemsEduational,DevelopmentDemandsOur ProposalOrganization of theProposalNewly DevelopedodesAppliationCompilationImplementation:InterruptInterrupt OIL toon�gTask Control QuirksInterrupt MaskControli386 support odes. InterruptDispath CodeTask Dispath odeDeveloping COMpakageSupported COM APICOM/CCCA pseudoodeEduational samplesHelloworld sample CodeAvailable SampleCodesPerformaneEvaluationConlusionReferenes
20 / 30
vo id a t t r i b u t e ( ( regparm ( 2 ) ) ) i n t e r r u p t ( I s rType i r q , FP i s r )f asm( " pu sh l %%ebpnn""movl %%esp , %%ebpnn""mpb %4,%2nn"" j n e 1 fnn""movl %5, %%espnn""1:nn""movb %2, %%hnn""movb %3, %% lnn"" pu sh l %%exnn":"=a "( i r q ) ,"=d"( i s r ) : "m"( a l l e v e l ) ,"m"( r u n i s r ) ," i "(TCL TASK) ,"m" ( s y s t em s t a k ) , "0" ( i r q ) , "1" ( i s r ) ) ; a l l e v e l=TCL ISR2 ;r u n i s r = i r q ;e n a b l e i n t ( ) ;( i s r ) ( ) ;d i s a b l e i n t ( ) ;asm ( " pop l %%eaxnn""movb %%al ,%0nn""movb %%ah ,%1nn""movl %%ebp , %%espnn"" pop l %%ebpnn":"=m"( r u n i s r ) ,"=m"( a l l e v e l ) ) ;i f ( a l l e v e l !=TCL TASK) r e t u r n ;asm("movl $1f , %0nn" :"=m"( t xb p [ r un t s k ℄ ) ) ;i f ( s h ed t s k==run t s k ) r e t u r n ;d i s p a t h ( ) ;asm( "1:nn " ) ;r e t u r n ;g
Task Dispath ode
AgendaBakground andMotivationOS Share ofEmbedded SystemsOS Share Moving?Why Linux?Demands andProblemsCompatibilityProblemsPerformaneProblemsEduational,DevelopmentDemandsOur ProposalOrganization of theProposalNewly DevelopedodesAppliationCompilationImplementation:InterruptInterrupt OIL toon�gTask Control QuirksInterrupt MaskControli386 support odesInterrupt DispathCode. Task DispathodeDeveloping COMpakageSupported COM APICOM/CCCA pseudoodeEduational samplesHelloworld sample CodeAvailable SampleCodesPerformaneEvaluationConlusionReferenes
21 / 30
vo id d i s p a t h ( vo i d ) fasm( "pushann""movl $1f , %0nn""movl %%esp , %1nn""jmp e x i t a n d d i s p a t hnn""1:nn""popann":"=m"( t xb p [ r un t s k ℄) ,"=m"( t xb sp [ r un t s k ℄ )) ;r e t u r n ;asm(" a t i v a t e r :nn " ) ;e n a b l e i n t ( ) ;t b u r p r i [ r u n t s k ℄ = t i n i b e x e p r i [ r u n t s k ℄ ;asm( "jmp �%0nn " : : "m"( t i n i b t a s k [ r un t s k ℄ ) ) ;asm( " e x i t a n d d i s p a t h :nn " ) ;i f ( PostTaskHook!=NULL) a l l p o s t t a s k h o o k ( ) ;asm( " s t a r t d i s p a t h :nn " ) ;l oop : r un t s k = s h ed t s k ;i f ( r un t s k==INVALID TASK) goto i d l e ;asm( "movl %0, %%espnn" : : "m"( t xb sp [ r un t s k ℄ ) ) ;i f ( PreTaskHook !=NULL) a l l p r e t a s k h o o k ( ) ;asm( "jmp �%0nn " : : "m"( t xb p [ r un t s k ℄ ) ) ;i d l e : asm( "movl %0, %%espnn" : : "m"( s y s t em s t a k ) ) ; a l l e v e l = TCL ISR2 ;i d l e l o o p :e n a b l e i n t ( ) ;h a l t p u ( ) ;d i s a b l e i n t ( ) ;i f ( s h ed t s k == INVALID TASK) goto i d l e l o o p ; a l l e v e l = TCL TASK ;goto l oop ;gg
Developing COM pakage
AgendaBakground andMotivationOS Share ofEmbedded SystemsOS Share Moving?Why Linux?Demands andProblemsCompatibilityProblemsPerformaneProblemsEduational,DevelopmentDemandsOur ProposalOrganization of theProposalNewly DevelopedodesAppliationCompilationImplementation:InterruptInterrupt OIL toon�gTask Control QuirksInterrupt MaskControli386 support odesInterrupt DispathCodeTask Dispath ode. Developing COMpakageSupported COM APICOM/CCCA pseudoodeEduational samplesHelloworld sample CodeAvailable SampleCodesPerformaneEvaluationConlusionReferenes
22 / 30
� OSEK/VDX OS requires COM support.� ToppersATK1 does not have one.� We newly develop the COM pakage for ToppersATK1.{ Toppers SG already support COM{ We reverse engineered the generated on�guration �les{ Our COM pakage only uses external funtionality of OS
Supported COM API
AgendaBakground andMotivationOS Share ofEmbedded SystemsOS Share Moving?Why Linux?Demands andProblemsCompatibilityProblemsPerformaneProblemsEduational,DevelopmentDemandsOur ProposalOrganization of theProposalNewly DevelopedodesAppliationCompilationImplementation:InterruptInterrupt OIL toon�gTask Control QuirksInterrupt MaskControli386 support odesInterrupt DispathCodeTask Dispath odeDeveloping COMpakage. Supported COMAPICOM/CCCA pseudoodeEduational samplesHelloworld sample CodeAvailable SampleCodesPerformaneEvaluationConlusionReferenes
23 / 30
FuntionSendMessage Send message to reeivers(multiast okay)ReeiveMessage Reeive message from messagebu�erStartCOM Start COM funtionalityStopCOM Stop COM funtionalityGetCOMAppliationMode Return Appliation modeInitMessage Initialize the message bu�er
COM/CCCA pseudo ode
AgendaBakground andMotivationOS Share ofEmbedded SystemsOS Share Moving?Why Linux?Demands andProblemsCompatibilityProblemsPerformaneProblemsEduational,DevelopmentDemandsOur ProposalOrganization of theProposalNewly DevelopedodesAppliationCompilationImplementation:InterruptInterrupt OIL toon�gTask Control QuirksInterrupt MaskControli386 support odesInterrupt DispathCodeTask Dispath odeDeveloping COMpakageSupported COM API. COM/CCCApseudo odeEduational samplesHelloworld sample CodeAvailable SampleCodesPerformaneEvaluationConlusionReferenes
24 / 30
The strategy is very simple. Sender opies the messages to themessage bu�ers. We an multi-ast to multiple reeivers.Noti�ation of reeiver may ause task swithing.SendMessage :f o r a l l r e e i v e r sdo opy to message b u f f e rf o r a l l r e e i v e r sdo n o t i f yRee iveMessage :Copy from the message b u f f e r
Eduational samples
AgendaBakground andMotivationOS Share ofEmbedded SystemsOS Share Moving?Why Linux?Demands andProblemsCompatibilityProblemsPerformaneProblemsEduational,DevelopmentDemandsOur ProposalOrganization of theProposalNewly DevelopedodesAppliationCompilationImplementation:InterruptInterrupt OIL toon�gTask Control QuirksInterrupt MaskControli386 support odesInterrupt DispathCodeTask Dispath odeDeveloping COMpakageSupported COM APICOM/CCCA pseudoode. EduationalsamplesHelloworld sample CodeAvailable SampleCodesPerformaneEvaluationConlusionReferenes
25 / 30
We developed 14 sample programs for eduational purposes. TheOIL �le of the helloworld sample:#in l u d e " imp l emen ta t i on . o i l "CPU I386f OS EPLABO OSEKf STATUS = EXTENDED;STARTUPHOOK = FALSE ;ERRORHOOK = FALSE ;SHUTDOWNHOOK = TRUE ;PRETASKHOOK = FALSE ;POSTTASKHOOK = FALSE ;USEGETSERVICEID = FALSE ;USEPARAMETERACCESS = FALSE ;USERESSCHEDULER = FALSE ;g ;APPMODE appmode1fg;TASK OSEK Task Bakgroundf AUTOSTART = TRUEf APPMODE = appmode1 ;g ;PRIORITY = 1 ; /� l owe s t p r i o r i t y �ACTIVATION = 1 ;SCHEDULE = FULL ;STACKSIZE = 8192 ;g ;g ;
Helloworld sample C ode
AgendaBakground andMotivationOS Share ofEmbedded SystemsOS Share Moving?Why Linux?Demands andProblemsCompatibilityProblemsPerformaneProblemsEduational,DevelopmentDemandsOur ProposalOrganization of theProposalNewly DevelopedodesAppliationCompilationImplementation:InterruptInterrupt OIL toon�gTask Control QuirksInterrupt MaskControli386 support odesInterrupt DispathCodeTask Dispath odeDeveloping COMpakageSupported COM APICOM/CCCA pseudoodeEduational samples. Helloworldsample C odeAvailable SampleCodesPerformaneEvaluationConlusionReferenes
26 / 30
����������� h e l l ow o r l d . ������������������#in l u d e " k e r n e l . h"#i n l u d e " k e r n e l i d . h"#i n l u d e TASK( OSEK Task Bakground )f p r i n t f ("OSEK He l loWor ld !nn " ) ;ShutdownOS (E OK ) ;gvo id ShutdownHook ( StatusType e r d ) fp r i n t f ("OSEK Good Bye !nn " ) ;gi n t main ( i n t arg , ha r �argv [ ℄ ) fStartOS ( appmode1 ) ;g
Available Sample Codes
AgendaBakground andMotivationOS Share ofEmbedded SystemsOS Share Moving?Why Linux?Demands andProblemsCompatibilityProblemsPerformaneProblemsEduational,DevelopmentDemandsOur ProposalOrganization of theProposalNewly DevelopedodesAppliationCompilationImplementation:InterruptInterrupt OIL toon�gTask Control QuirksInterrupt MaskControli386 support odesInterrupt DispathCodeTask Dispath odeDeveloping COMpakageSupported COM APICOM/CCCA pseudoodeEduational samplesHelloworld sample Code. Available SampleCodesPerformaneEvaluationConlusionReferenes
27 / 30
Name C lines OIL Linesativate 45 77ativate2 52 77alarms 32 67hain 26 51omtest 35 91events 77 67getevents 62 92helloworld 19 36isr 57 83keypoll 40 58multi res 131 202res shed 50 83resoures 51 89tasks 86 98TOTAL 673 1171
Performane Evaluation
AgendaBakground andMotivationOS Share ofEmbedded SystemsOS Share Moving?Why Linux?Demands andProblemsCompatibilityProblemsPerformaneProblemsEduational,DevelopmentDemandsOur ProposalOrganization of theProposalNewly DevelopedodesAppliationCompilationImplementation:InterruptInterrupt OIL toon�gTask Control QuirksInterrupt MaskControli386 support odesInterrupt DispathCodeTask Dispath odeDeveloping COMpakageSupported COM APICOM/CCCA pseudoodeEduational samplesHelloworld sample CodeAvailable SampleCodes. PerformaneEvaluationConlusionReferenes
28 / 30
� Task ativation time in �SOur method Linux2.59 4.72� Transition time in �Ssignal raise to ISR ISR to Task4.39 5.52
Linux kernel 2.6.32 on Pentium3 1.13GHz
ConlusionAgendaBakground andMotivationOS Share ofEmbedded SystemsOS Share Moving?Why Linux?Demands andProblemsCompatibilityProblemsPerformaneProblemsEduational,DevelopmentDemandsOur ProposalOrganization of theProposalNewly DevelopedodesAppliationCompilationImplementation:InterruptInterrupt OIL toon�gTask Control QuirksInterrupt MaskControli386 support odesInterrupt DispathCodeTask Dispath odeDeveloping COMpakageSupported COM APICOM/CCCA pseudoodeEduational samplesHelloworld sample CodeAvailable SampleCodesPerformaneEvaluation. ConlusionReferenes
29 / 30
� Developed OSEK/VDX on Linux� 14 sample programs available for OSEK seminar� Higher task ativation performane was ahieved� All odes with samples are available from IP ARCH, In.
ReferenesAgendaBakground andMotivationOS Share ofEmbedded SystemsOS Share Moving?Why Linux?Demands andProblemsCompatibilityProblemsPerformaneProblemsEduational,DevelopmentDemandsOur ProposalOrganization of theProposalNewly DevelopedodesAppliationCompilationImplementation:InterruptInterrupt OIL toon�gTask Control QuirksInterrupt MaskControli386 support odesInterrupt DispathCodeTask Dispath odeDeveloping COMpakageSupported COM APICOM/CCCA pseudoodeEduational samplesHelloworld sample CodeAvailable SampleCodesPerformaneEvaluationConlusion. Referenes
30 / 30
� nxtOSEK: http://lejos-osek.soureforge.net/� OSEK OS: ISO 17356-3� ToppersATK1: http://www.toppers.jp/atk1.html� ET Robot Conest: http://www.etrobo.jp/� IP ARCH, In. http://www.ip-arh.jp/
AgendaBackground and MotivationOS Share of Embedded SystemsOS Share Moving?Why Linux?Demands and ProblemsCompatibility ProblemsPerformance ProblemsEducational, Development DemandsOur ProposalOrganization of the ProposalNewly Developed codesApplication CompilationImplementation: InterruptInterrupt OIL to configTask Control QuirksInterrupt Mask Controli386 support codesInterrupt Dispatch CodeTask Dispatch codeDeveloping COM packageSupported COM APICOM/CCCA pseudo codeEducational samplesHelloworld sample C codeAvailable Sample CodesPerformance EvaluationConclusionReferences
Recommended