SlideShare uma empresa Scribd logo
1 de 42
Baixar para ler offline
Session #1.3: OpenComRTOS Internals

                                   Bernhard Sputh
                             bernhard.sputh@altreonic.com

                                     Altreonic NV
                                 Gemeentestraat 61 Bus 1
                                      3210 Linden
                                        Belgium


                                  January 12, 2012




Bernhard Sputh (Altreonic)              Session #1.3        January 12, 2012   1 / 37
Outline of this Workshop




     Session #1.1: The Theoretical foundations of OpenComRTOS
     Session #1.2: Introduction to OpenComRTOS and the
     OpenComRTOS Designer Suite
     Session #1.3: OpenComRTOS Internals
     Session #1.4: Hands on with the OpenComRTOS Designer Suite




  Bernhard Sputh (Altreonic)   Session #1.3          January 12, 2012   2 / 37
1   How OpenComRTOS works Internally
      Interacting Entities in Detail
      Virtual Single Processor (VSP) Programming Model
      Priority Inversion

2   Build Process

3   Extending OpenComRTOS
      Components
      Porting to a new Platform
      Device Drivers

4   Summary



    Bernhard Sputh (Altreonic)    Session #1.3           January 12, 2012   3 / 37
Outline

1   How OpenComRTOS works Internally
      Interacting Entities in Detail
      Virtual Single Processor (VSP) Programming Model
      Priority Inversion

2   Build Process

3   Extending OpenComRTOS
      Components
      Porting to a new Platform
      Device Drivers

4   Summary
OpenComRTOS Paradigms




    Interacting Entities
    Virtual Single Processor (VSP) Programming Model.




 Bernhard Sputh (Altreonic)   Session #1.3              January 12, 2012   5 / 37
Interacting Entities




     Entities:
            Tasks (Active Entities)
            Hubs (Passive Entities)
     Interactions




  Bernhard Sputh (Altreonic)          Session #1.3   January 12, 2012   6 / 37
Task Internals




  Bernhard Sputh (Altreonic)   Session #1.3   January 12, 2012   7 / 37
Hub Internals




  Bernhard Sputh (Altreonic)   Session #1.3   January 12, 2012   8 / 37
Basic Interactions
     Every Interactions is represented with a Task injecting a Packet into
     the Task Input Port of the Kernel Task.
     Every Packet contains the current Priority of the Task, that sent it.
     Sending a Packet results in the Task to be suspended, until the
     corresponding Acknowledgement Packet arrives.




  Bernhard Sputh (Altreonic)      Session #1.3              January 12, 2012   9 / 37
Virtual Single Processor (VSP) Programming Model.



     Entities can be distributed in any form over the system,
     OpenComRTOS ensures that the logical behaviour is preserved.
     Separates Hardware from Software. Both can be changed almost
     independently.
     Interactions take place independent of placement.
For VSP to work OpenComRTOS separates Topology and Application
from each other.




  Bernhard Sputh (Altreonic)     Session #1.3            January 12, 2012   10 / 37
Virtual Single Processor (VSP) Programming Model.



     Entities can be distributed in any form over the system,
     OpenComRTOS ensures that the logical behaviour is preserved.
     Separates Hardware from Software. Both can be changed almost
     independently.
     Interactions take place independent of placement.
For VSP to work OpenComRTOS separates Topology and Application
from each other.




  Bernhard Sputh (Altreonic)     Session #1.3            January 12, 2012   10 / 37
Topology


     Nodes
     Link Ports
     Links




  Bernhard Sputh (Altreonic)   Session #1.3   January 12, 2012   11 / 37
Application Entities
     Tasks
     Hubs
     Host Service Components
All entities of an Application can be mapped onto any available Node,
with the exception of Host Service components, these must be placed
either on a Windows or Posix32 node.




  Bernhard Sputh (Altreonic)    Session #1.3             January 12, 2012   12 / 37
Interactions in Multi Node Systems




  Bernhard Sputh (Altreonic)   Session #1.3   January 12, 2012   13 / 37
Priority Inversion


Definition: “priority inversion is a problematic scenario in scheduling when
a higher priority task is indirectly preempted by a lower priority task
effectively ‘inverting’ the relative priorities of the two tasks.”.
Typically that is caused when s shared resource gets protected with a Lock
/ Mutex, for instance:
     a shared memory buffer that must be read out before new data is
     written in;
     hardware status registers that set a peripheral in a specific state;
     a peripheral that can handle only one request at a time.




  Bernhard Sputh (Altreonic)      Session #1.3              January 12, 2012   14 / 37
Priority Inheritance as Solution




     If Priority Inversion gets detected, the Priority of the lower Priority
     Task get boosted to the level of the higher Priority Task.
     OpenComRTOS supports that on single Node systems.
     OpenComRTOS supports this also system wide, i.e. the location of
     the Task does not matter.




  Bernhard Sputh (Altreonic)       Session #1.3              January 12, 2012   15 / 37
Outline

1   How OpenComRTOS works Internally
      Interacting Entities in Detail
      Virtual Single Processor (VSP) Programming Model
      Priority Inversion

2   Build Process

3   Extending OpenComRTOS
      Components
      Porting to a new Platform
      Device Drivers

4   Summary
Build Process of OpenComRTOS Systems

 1   Project-Generator Phase:
            Calculates the Routing-Tables for each Node.
            Determines the IDs of the Enties of the system.
            Creates the directory Output.
            Creates a directory for each Node, and stores the Node-XML file there.
            Triggers the build process for each Node.
 2   Code-Generator Phase:
            Generates a CMake based build system for the Node.
            Generates the Node-Configuration Files for the Node (main one is
            L1 node config.c)
 3   Compile and Link Phase:
            Each Node gets compiled and linked.
            The resulting binary gets placed in the directory Output/bin.




  Bernhard Sputh (Altreonic)         Session #1.3              January 12, 2012   17 / 37
Build Process of OpenComRTOS Systems

 1   Project-Generator Phase:
            Calculates the Routing-Tables for each Node.
            Determines the IDs of the Enties of the system.
            Creates the directory Output.
            Creates a directory for each Node, and stores the Node-XML file there.
            Triggers the build process for each Node.
 2   Code-Generator Phase:
            Generates a CMake based build system for the Node.
            Generates the Node-Configuration Files for the Node (main one is
            L1 node config.c)
 3   Compile and Link Phase:
            Each Node gets compiled and linked.
            The resulting binary gets placed in the directory Output/bin.




  Bernhard Sputh (Altreonic)         Session #1.3              January 12, 2012   17 / 37
Build Process of OpenComRTOS Systems

 1   Project-Generator Phase:
            Calculates the Routing-Tables for each Node.
            Determines the IDs of the Enties of the system.
            Creates the directory Output.
            Creates a directory for each Node, and stores the Node-XML file there.
            Triggers the build process for each Node.
 2   Code-Generator Phase:
            Generates a CMake based build system for the Node.
            Generates the Node-Configuration Files for the Node (main one is
            L1 node config.c)
 3   Compile and Link Phase:
            Each Node gets compiled and linked.
            The resulting binary gets placed in the directory Output/bin.




  Bernhard Sputh (Altreonic)         Session #1.3              January 12, 2012   17 / 37
Outline

1   How OpenComRTOS works Internally
      Interacting Entities in Detail
      Virtual Single Processor (VSP) Programming Model
      Priority Inversion

2   Build Process

3   Extending OpenComRTOS
      Components
      Porting to a new Platform
      Device Drivers

4   Summary
Components


    Are a collection of Tasks and Hubs, which provide a certain service.
    Get provided in a separate library, together with a Metamodel for
    OpenVE.
    Provide an access library which can be used from any platform, even
    if the service is platform specific.
    Examples for Components are:
           Stdio Host Service (SHS)
           Graphical Host Service (GHS)
           Open System Inspector (OSI)
           Safe Virtual Machine for C (SVM




 Bernhard Sputh (Altreonic)        Session #1.3          January 12, 2012   19 / 37
Application Diagram of a Component




  Bernhard Sputh (Altreonic)   Session #1.3   January 12, 2012   20 / 37
Porting to a new Platform




Consists of the following phases:
     Phase 1: Context Switch
     Phase 2: Interrupt Support
     Phase 3: Multi-Node and Integration




  Bernhard Sputh (Altreonic)        Session #1.3   January 12, 2012   21 / 37
Phase 1: Context Switch


     Create a new folder in src/platforms/, and copy the contents of
     src/generic into it.
     Integrate the newly created folder into the build system.
     Map OpenComRTOS data types to platform data types:
            L1    BOOL
            L1    BYTE
            L1    INT16 / L1 UINT16
            L1    INT32 / L1 UINT32
     Fill in the blanks: Context Switch, Enter and Leave Critical Section,
     Initialisation of the Task Context, Starting a Task.
     Test this with a Semaphore Loop Project.




  Bernhard Sputh (Altreonic)          Session #1.3         January 12, 2012   22 / 37
Phase 1: Context Switch


     Create a new folder in src/platforms/, and copy the contents of
     src/generic into it.
     Integrate the newly created folder into the build system.
     Map OpenComRTOS data types to platform data types:
            L1    BOOL
            L1    BYTE
            L1    INT16 / L1 UINT16
            L1    INT32 / L1 UINT32
     Fill in the blanks: Context Switch, Enter and Leave Critical Section,
     Initialisation of the Task Context, Starting a Task.
     Test this with a Semaphore Loop Project.




  Bernhard Sputh (Altreonic)          Session #1.3         January 12, 2012   22 / 37
Phase 1: Context Switch


     Create a new folder in src/platforms/, and copy the contents of
     src/generic into it.
     Integrate the newly created folder into the build system.
     Map OpenComRTOS data types to platform data types:
            L1    BOOL
            L1    BYTE
            L1    INT16 / L1 UINT16
            L1    INT32 / L1 UINT32
     Fill in the blanks: Context Switch, Enter and Leave Critical Section,
     Initialisation of the Task Context, Starting a Task.
     Test this with a Semaphore Loop Project.




  Bernhard Sputh (Altreonic)          Session #1.3         January 12, 2012   22 / 37
Semaphore Loop Project




  Bernhard Sputh (Altreonic)   Session #1.3   January 12, 2012   23 / 37
Phase 2: Interrupt Support




     Implement Interrupt Handling Support: Enter ISR, Leave ISR;
     Implement the Periodic Timer driver;
     Extend the previously developed Semaphore Loop Project, with a Task
     that performs a waiting with timeout operation on a new Semaphore.




  Bernhard Sputh (Altreonic)    Session #1.3            January 12, 2012   24 / 37
Extended Semaphore Loop Project




  Bernhard Sputh (Altreonic)   Session #1.3   January 12, 2012   25 / 37
Phase 3: Multi-Node and Integration



     Implement a Link Driver, typically RS232;
     Implement the network endianess adjustment routines. Over a link we
     always use big-endian.
     Implement an Example that connects two Nodes, typically the new
     Platform plus a Win32 / Posix32 Node.
     Implement the remaining device drivers for the target (Link Drivers,
     special IO drivers).
     Adjust OpenVE Metamodel and the Code Generators.




  Bernhard Sputh (Altreonic)     Session #1.3             January 12, 2012   26 / 37
Device Drivers




     Timer-Drivers
     Link-Drivers
     General-Drivers




  Bernhard Sputh (Altreonic)   Session #1.3   January 12, 2012   27 / 37
Timer-Driver Properties




     Provide a periodic tick (usuall every 1ms).
     Handle Timeouts
     Provide high precision timestamps when tracing.
     Integrated into the Platform Image.
     Hard instantiation during system startup.
     Have no Task.




  Bernhard Sputh (Altreonic)      Session #1.3         January 12, 2012   28 / 37
Timer-Driver API

     void L1 initTimer(void)


     void L1 Timer setTimeout(L1 Timeout tick, L1 UINT32 id)
     void L1 Timer cancelTimeout(void)
     L1 Timeout L1 Timer getExpiredTimeoutTicks(void)
     L1 Timeout L1 Timer getRemainingTimeoutTicks(void)
     L1 Time L1 Timer getCurrentTime(void)
     L1 Status L1 Timer getTimeStamp
       (L1 TimeStamp ∗ pTimeStamp)
     L1 UINT32 L1 Timer getLowCounterFrequency(void)
     L1 UINT32 L1 Timer getHighCounterFrequency(void)



  Bernhard Sputh (Altreonic)   Session #1.3    January 12, 2012   29 / 37
Link-Driver Properties


     Transfer Packets from one Node to another Node, using a specific
     communication media (RS232, Ethernet, . . . ).
     Consist of at least one Task, which is used the send a Packet over the
     communication media.
     Initialise the hardware device associated with them
     Provide Client and Server type of link Initialisation.
     Kernel interface to them using a dedicated protocol.
     Link-Driver does the link-port routing.
     Link-Driver needs to be announced to the system using a Metamodel




  Bernhard Sputh (Altreonic)       Session #1.3               January 12, 2012   30 / 37
Link-Driver API



     L1 BOOL FooDriver init(FooDriver ∗ self)
     L1 BOOL FooLinkPort initServer
       (FooDriver ∗ driver, FooLinkPort ∗ self)
     L1 BOOL FooLinkPort initClient
       (FooDriver ∗ driver, FooLinkPort ∗ self)
     L1 BOOL FooDriver sendPacket
       (L1 XferPacket ∗ packet, L1 UINT32 size)
     void FooDriver EntryPoint(L1 TaskArguments)




  Bernhard Sputh (Altreonic)   Session #1.3     January 12, 2012   31 / 37
General-Driver Properties




     Implemented as normal user Tasks.
     Full control over the Application Programmer Interface (API).
     Additionally can be implemented like a Host Service Component.
     Interfacing to the Interrupt Request (IRQ) has to be done in the
     platform specific way.




  Bernhard Sputh (Altreonic)     Session #1.3             January 12, 2012   32 / 37
Outline

1   How OpenComRTOS works Internally
      Interacting Entities in Detail
      Virtual Single Processor (VSP) Programming Model
      Priority Inversion

2   Build Process

3   Extending OpenComRTOS
      Components
      Porting to a new Platform
      Device Drivers

4   Summary
Summary




This Lecture covered the following:
     Build process of OpenComRTOS projects;
     The steps involved in porting OpenComRTOS to a new Platform.




  Bernhard Sputh (Altreonic)     Session #1.3        January 12, 2012   34 / 37
Questions?




Bernhard Sputh (Altreonic)      Session #1.3   January 12, 2012   35 / 37
Thank You
for Your attention




http://www.altreonic.com
References




  Bernhard Sputh (Altreonic)   Session #1.3   January 12, 2012   37 / 37

Mais conteúdo relacionado

Destaque

Tbp communication phase 2 - aug 19
Tbp   communication phase 2 - aug 19Tbp   communication phase 2 - aug 19
Tbp communication phase 2 - aug 19pgb_tbp
 
Session 1 introduction concurrent programming
Session 1 introduction  concurrent programmingSession 1 introduction  concurrent programming
Session 1 introduction concurrent programmingEric Verhulst
 
Open ComRTOS 1.4_tutorial_2o4_presentation
Open ComRTOS 1.4_tutorial_2o4_presentationOpen ComRTOS 1.4_tutorial_2o4_presentation
Open ComRTOS 1.4_tutorial_2o4_presentationEric Verhulst
 
Unified Systems Engineering feasibility
Unified Systems Engineering feasibilityUnified Systems Engineering feasibility
Unified Systems Engineering feasibilityEric Verhulst
 
Unified Systems Engeneering with GoedelWorks
Unified Systems Engeneering with GoedelWorksUnified Systems Engeneering with GoedelWorks
Unified Systems Engeneering with GoedelWorksEric Verhulst
 
Zen and the art of safety engineering
Zen and the art of safety engineeringZen and the art of safety engineering
Zen and the art of safety engineeringEric Verhulst
 
OpenComRtos 1.4_tutorial_1o4_presentation
OpenComRtos 1.4_tutorial_1o4_presentationOpenComRtos 1.4_tutorial_1o4_presentation
OpenComRtos 1.4_tutorial_1o4_presentationEric Verhulst
 
MARC ONERA Toulouse2012 Altreonic
MARC ONERA Toulouse2012 AltreonicMARC ONERA Toulouse2012 Altreonic
MARC ONERA Toulouse2012 AltreonicEric Verhulst
 
Due soon revised
Due soon revisedDue soon revised
Due soon revisedpgb_tbp
 

Destaque (9)

Tbp communication phase 2 - aug 19
Tbp   communication phase 2 - aug 19Tbp   communication phase 2 - aug 19
Tbp communication phase 2 - aug 19
 
Session 1 introduction concurrent programming
Session 1 introduction  concurrent programmingSession 1 introduction  concurrent programming
Session 1 introduction concurrent programming
 
Open ComRTOS 1.4_tutorial_2o4_presentation
Open ComRTOS 1.4_tutorial_2o4_presentationOpen ComRTOS 1.4_tutorial_2o4_presentation
Open ComRTOS 1.4_tutorial_2o4_presentation
 
Unified Systems Engineering feasibility
Unified Systems Engineering feasibilityUnified Systems Engineering feasibility
Unified Systems Engineering feasibility
 
Unified Systems Engeneering with GoedelWorks
Unified Systems Engeneering with GoedelWorksUnified Systems Engeneering with GoedelWorks
Unified Systems Engeneering with GoedelWorks
 
Zen and the art of safety engineering
Zen and the art of safety engineeringZen and the art of safety engineering
Zen and the art of safety engineering
 
OpenComRtos 1.4_tutorial_1o4_presentation
OpenComRtos 1.4_tutorial_1o4_presentationOpenComRtos 1.4_tutorial_1o4_presentation
OpenComRtos 1.4_tutorial_1o4_presentation
 
MARC ONERA Toulouse2012 Altreonic
MARC ONERA Toulouse2012 AltreonicMARC ONERA Toulouse2012 Altreonic
MARC ONERA Toulouse2012 Altreonic
 
Due soon revised
Due soon revisedDue soon revised
Due soon revised
 

Semelhante a OpenComRTOS 1.4_tutorial_3o4_presentation

Open comrtos formally_developed _rtos_for_heterogeneous_systems
Open comrtos formally_developed _rtos_for_heterogeneous_systemsOpen comrtos formally_developed _rtos_for_heterogeneous_systems
Open comrtos formally_developed _rtos_for_heterogeneous_systemsEric Verhulst
 
Autoware vs. Computer Performance @ ROS Japan UG #43 組み込み勉強会
Autoware vs. Computer Performance @ ROS Japan UG #43 組み込み勉強会Autoware vs. Computer Performance @ ROS Japan UG #43 組み込み勉強会
Autoware vs. Computer Performance @ ROS Japan UG #43 組み込み勉強会kfunaoka
 
Address Binding Scheme
Address Binding SchemeAddress Binding Scheme
Address Binding SchemeRajesh Piryani
 
Multicore development environment for embedded processor in arduino IDE
Multicore development environment for embedded processor in arduino IDEMulticore development environment for embedded processor in arduino IDE
Multicore development environment for embedded processor in arduino IDETELKOMNIKA JOURNAL
 
Inptools Manual
Inptools ManualInptools Manual
Inptools ManualMawar 99
 
Programming methodology-1.1
Programming methodology-1.1Programming methodology-1.1
Programming methodology-1.1NYversity
 
Linux Operating System Resembles Unix Operating. System
Linux Operating System Resembles Unix Operating. SystemLinux Operating System Resembles Unix Operating. System
Linux Operating System Resembles Unix Operating. SystemOlga Bautista
 
CSC 451551 Computer Networks Fall 2016Project 4 Softwar.docx
CSC 451551 Computer Networks Fall 2016Project 4 Softwar.docxCSC 451551 Computer Networks Fall 2016Project 4 Softwar.docx
CSC 451551 Computer Networks Fall 2016Project 4 Softwar.docxannettsparrow
 
510Lec01-Overview.pptx
510Lec01-Overview.pptx510Lec01-Overview.pptx
510Lec01-Overview.pptxKrosumLabs1
 
The Beam Vision for Portability: "Write once run anywhere"
The Beam Vision for Portability: "Write once run anywhere"The Beam Vision for Portability: "Write once run anywhere"
The Beam Vision for Portability: "Write once run anywhere"Knoldus Inc.
 
Tarea - 3 Actividad intermedia trabajo colaborativo 2
Tarea - 3 Actividad intermedia trabajo colaborativo 2Tarea - 3 Actividad intermedia trabajo colaborativo 2
Tarea - 3 Actividad intermedia trabajo colaborativo 2HectorFabianPintoOsp
 
Get Started with MicroPython ESP32
Get Started with MicroPython ESP32Get Started with MicroPython ESP32
Get Started with MicroPython ESP32fanghe22
 
Get Starte with MicroPython ESP32
Get Starte with MicroPython ESP32Get Starte with MicroPython ESP32
Get Starte with MicroPython ESP32fanghe22
 
2nd ARM Developer Day - mbed Workshop - ARM
2nd ARM Developer Day - mbed Workshop - ARM2nd ARM Developer Day - mbed Workshop - ARM
2nd ARM Developer Day - mbed Workshop - ARMAntonio Mondragon
 
Comparison of ESP programming platforms
Comparison of ESP programming platformsComparison of ESP programming platforms
Comparison of ESP programming platformsCSITiaesprime
 
Creating an Embedded System Lab
Creating an Embedded System LabCreating an Embedded System Lab
Creating an Embedded System LabNonamepro
 
Yocto vs. Debian white paper
Yocto vs. Debian white paperYocto vs. Debian white paper
Yocto vs. Debian white paperMads Doré
 

Semelhante a OpenComRTOS 1.4_tutorial_3o4_presentation (20)

Open comrtos formally_developed _rtos_for_heterogeneous_systems
Open comrtos formally_developed _rtos_for_heterogeneous_systemsOpen comrtos formally_developed _rtos_for_heterogeneous_systems
Open comrtos formally_developed _rtos_for_heterogeneous_systems
 
Autoware vs. Computer Performance @ ROS Japan UG #43 組み込み勉強会
Autoware vs. Computer Performance @ ROS Japan UG #43 組み込み勉強会Autoware vs. Computer Performance @ ROS Japan UG #43 組み込み勉強会
Autoware vs. Computer Performance @ ROS Japan UG #43 組み込み勉強会
 
Address Binding Scheme
Address Binding SchemeAddress Binding Scheme
Address Binding Scheme
 
Multicore development environment for embedded processor in arduino IDE
Multicore development environment for embedded processor in arduino IDEMulticore development environment for embedded processor in arduino IDE
Multicore development environment for embedded processor in arduino IDE
 
Inptools Manual
Inptools ManualInptools Manual
Inptools Manual
 
Programming methodology-1.1
Programming methodology-1.1Programming methodology-1.1
Programming methodology-1.1
 
SDAccel Design Contest: Xilinx SDAccel
SDAccel Design Contest: Xilinx SDAccel SDAccel Design Contest: Xilinx SDAccel
SDAccel Design Contest: Xilinx SDAccel
 
Linux Operating System Resembles Unix Operating. System
Linux Operating System Resembles Unix Operating. SystemLinux Operating System Resembles Unix Operating. System
Linux Operating System Resembles Unix Operating. System
 
CSC 451551 Computer Networks Fall 2016Project 4 Softwar.docx
CSC 451551 Computer Networks Fall 2016Project 4 Softwar.docxCSC 451551 Computer Networks Fall 2016Project 4 Softwar.docx
CSC 451551 Computer Networks Fall 2016Project 4 Softwar.docx
 
510Lec01-Overview.pptx
510Lec01-Overview.pptx510Lec01-Overview.pptx
510Lec01-Overview.pptx
 
The Beam Vision for Portability: "Write once run anywhere"
The Beam Vision for Portability: "Write once run anywhere"The Beam Vision for Portability: "Write once run anywhere"
The Beam Vision for Portability: "Write once run anywhere"
 
01.osdoc
01.osdoc01.osdoc
01.osdoc
 
Tarea - 3 Actividad intermedia trabajo colaborativo 2
Tarea - 3 Actividad intermedia trabajo colaborativo 2Tarea - 3 Actividad intermedia trabajo colaborativo 2
Tarea - 3 Actividad intermedia trabajo colaborativo 2
 
Get Started with MicroPython ESP32
Get Started with MicroPython ESP32Get Started with MicroPython ESP32
Get Started with MicroPython ESP32
 
Get Starte with MicroPython ESP32
Get Starte with MicroPython ESP32Get Starte with MicroPython ESP32
Get Starte with MicroPython ESP32
 
Readme
ReadmeReadme
Readme
 
2nd ARM Developer Day - mbed Workshop - ARM
2nd ARM Developer Day - mbed Workshop - ARM2nd ARM Developer Day - mbed Workshop - ARM
2nd ARM Developer Day - mbed Workshop - ARM
 
Comparison of ESP programming platforms
Comparison of ESP programming platformsComparison of ESP programming platforms
Comparison of ESP programming platforms
 
Creating an Embedded System Lab
Creating an Embedded System LabCreating an Embedded System Lab
Creating an Embedded System Lab
 
Yocto vs. Debian white paper
Yocto vs. Debian white paperYocto vs. Debian white paper
Yocto vs. Debian white paper
 

Último

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dashnarutouzumaki53779
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 

Último (20)

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dash
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 

OpenComRTOS 1.4_tutorial_3o4_presentation

  • 1. Session #1.3: OpenComRTOS Internals Bernhard Sputh bernhard.sputh@altreonic.com Altreonic NV Gemeentestraat 61 Bus 1 3210 Linden Belgium January 12, 2012 Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 1 / 37
  • 2. Outline of this Workshop Session #1.1: The Theoretical foundations of OpenComRTOS Session #1.2: Introduction to OpenComRTOS and the OpenComRTOS Designer Suite Session #1.3: OpenComRTOS Internals Session #1.4: Hands on with the OpenComRTOS Designer Suite Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 2 / 37
  • 3. 1 How OpenComRTOS works Internally Interacting Entities in Detail Virtual Single Processor (VSP) Programming Model Priority Inversion 2 Build Process 3 Extending OpenComRTOS Components Porting to a new Platform Device Drivers 4 Summary Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 3 / 37
  • 4. Outline 1 How OpenComRTOS works Internally Interacting Entities in Detail Virtual Single Processor (VSP) Programming Model Priority Inversion 2 Build Process 3 Extending OpenComRTOS Components Porting to a new Platform Device Drivers 4 Summary
  • 5. OpenComRTOS Paradigms Interacting Entities Virtual Single Processor (VSP) Programming Model. Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 5 / 37
  • 6. Interacting Entities Entities: Tasks (Active Entities) Hubs (Passive Entities) Interactions Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 6 / 37
  • 7. Task Internals Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 7 / 37
  • 8. Hub Internals Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 8 / 37
  • 9. Basic Interactions Every Interactions is represented with a Task injecting a Packet into the Task Input Port of the Kernel Task. Every Packet contains the current Priority of the Task, that sent it. Sending a Packet results in the Task to be suspended, until the corresponding Acknowledgement Packet arrives. Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 9 / 37
  • 10. Virtual Single Processor (VSP) Programming Model. Entities can be distributed in any form over the system, OpenComRTOS ensures that the logical behaviour is preserved. Separates Hardware from Software. Both can be changed almost independently. Interactions take place independent of placement. For VSP to work OpenComRTOS separates Topology and Application from each other. Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 10 / 37
  • 11. Virtual Single Processor (VSP) Programming Model. Entities can be distributed in any form over the system, OpenComRTOS ensures that the logical behaviour is preserved. Separates Hardware from Software. Both can be changed almost independently. Interactions take place independent of placement. For VSP to work OpenComRTOS separates Topology and Application from each other. Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 10 / 37
  • 12. Topology Nodes Link Ports Links Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 11 / 37
  • 13. Application Entities Tasks Hubs Host Service Components All entities of an Application can be mapped onto any available Node, with the exception of Host Service components, these must be placed either on a Windows or Posix32 node. Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 12 / 37
  • 14. Interactions in Multi Node Systems Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 13 / 37
  • 15. Priority Inversion Definition: “priority inversion is a problematic scenario in scheduling when a higher priority task is indirectly preempted by a lower priority task effectively ‘inverting’ the relative priorities of the two tasks.”. Typically that is caused when s shared resource gets protected with a Lock / Mutex, for instance: a shared memory buffer that must be read out before new data is written in; hardware status registers that set a peripheral in a specific state; a peripheral that can handle only one request at a time. Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 14 / 37
  • 16. Priority Inheritance as Solution If Priority Inversion gets detected, the Priority of the lower Priority Task get boosted to the level of the higher Priority Task. OpenComRTOS supports that on single Node systems. OpenComRTOS supports this also system wide, i.e. the location of the Task does not matter. Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 15 / 37
  • 17. Outline 1 How OpenComRTOS works Internally Interacting Entities in Detail Virtual Single Processor (VSP) Programming Model Priority Inversion 2 Build Process 3 Extending OpenComRTOS Components Porting to a new Platform Device Drivers 4 Summary
  • 18. Build Process of OpenComRTOS Systems 1 Project-Generator Phase: Calculates the Routing-Tables for each Node. Determines the IDs of the Enties of the system. Creates the directory Output. Creates a directory for each Node, and stores the Node-XML file there. Triggers the build process for each Node. 2 Code-Generator Phase: Generates a CMake based build system for the Node. Generates the Node-Configuration Files for the Node (main one is L1 node config.c) 3 Compile and Link Phase: Each Node gets compiled and linked. The resulting binary gets placed in the directory Output/bin. Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 17 / 37
  • 19. Build Process of OpenComRTOS Systems 1 Project-Generator Phase: Calculates the Routing-Tables for each Node. Determines the IDs of the Enties of the system. Creates the directory Output. Creates a directory for each Node, and stores the Node-XML file there. Triggers the build process for each Node. 2 Code-Generator Phase: Generates a CMake based build system for the Node. Generates the Node-Configuration Files for the Node (main one is L1 node config.c) 3 Compile and Link Phase: Each Node gets compiled and linked. The resulting binary gets placed in the directory Output/bin. Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 17 / 37
  • 20. Build Process of OpenComRTOS Systems 1 Project-Generator Phase: Calculates the Routing-Tables for each Node. Determines the IDs of the Enties of the system. Creates the directory Output. Creates a directory for each Node, and stores the Node-XML file there. Triggers the build process for each Node. 2 Code-Generator Phase: Generates a CMake based build system for the Node. Generates the Node-Configuration Files for the Node (main one is L1 node config.c) 3 Compile and Link Phase: Each Node gets compiled and linked. The resulting binary gets placed in the directory Output/bin. Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 17 / 37
  • 21. Outline 1 How OpenComRTOS works Internally Interacting Entities in Detail Virtual Single Processor (VSP) Programming Model Priority Inversion 2 Build Process 3 Extending OpenComRTOS Components Porting to a new Platform Device Drivers 4 Summary
  • 22. Components Are a collection of Tasks and Hubs, which provide a certain service. Get provided in a separate library, together with a Metamodel for OpenVE. Provide an access library which can be used from any platform, even if the service is platform specific. Examples for Components are: Stdio Host Service (SHS) Graphical Host Service (GHS) Open System Inspector (OSI) Safe Virtual Machine for C (SVM Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 19 / 37
  • 23. Application Diagram of a Component Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 20 / 37
  • 24. Porting to a new Platform Consists of the following phases: Phase 1: Context Switch Phase 2: Interrupt Support Phase 3: Multi-Node and Integration Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 21 / 37
  • 25. Phase 1: Context Switch Create a new folder in src/platforms/, and copy the contents of src/generic into it. Integrate the newly created folder into the build system. Map OpenComRTOS data types to platform data types: L1 BOOL L1 BYTE L1 INT16 / L1 UINT16 L1 INT32 / L1 UINT32 Fill in the blanks: Context Switch, Enter and Leave Critical Section, Initialisation of the Task Context, Starting a Task. Test this with a Semaphore Loop Project. Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 22 / 37
  • 26. Phase 1: Context Switch Create a new folder in src/platforms/, and copy the contents of src/generic into it. Integrate the newly created folder into the build system. Map OpenComRTOS data types to platform data types: L1 BOOL L1 BYTE L1 INT16 / L1 UINT16 L1 INT32 / L1 UINT32 Fill in the blanks: Context Switch, Enter and Leave Critical Section, Initialisation of the Task Context, Starting a Task. Test this with a Semaphore Loop Project. Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 22 / 37
  • 27. Phase 1: Context Switch Create a new folder in src/platforms/, and copy the contents of src/generic into it. Integrate the newly created folder into the build system. Map OpenComRTOS data types to platform data types: L1 BOOL L1 BYTE L1 INT16 / L1 UINT16 L1 INT32 / L1 UINT32 Fill in the blanks: Context Switch, Enter and Leave Critical Section, Initialisation of the Task Context, Starting a Task. Test this with a Semaphore Loop Project. Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 22 / 37
  • 28. Semaphore Loop Project Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 23 / 37
  • 29. Phase 2: Interrupt Support Implement Interrupt Handling Support: Enter ISR, Leave ISR; Implement the Periodic Timer driver; Extend the previously developed Semaphore Loop Project, with a Task that performs a waiting with timeout operation on a new Semaphore. Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 24 / 37
  • 30. Extended Semaphore Loop Project Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 25 / 37
  • 31. Phase 3: Multi-Node and Integration Implement a Link Driver, typically RS232; Implement the network endianess adjustment routines. Over a link we always use big-endian. Implement an Example that connects two Nodes, typically the new Platform plus a Win32 / Posix32 Node. Implement the remaining device drivers for the target (Link Drivers, special IO drivers). Adjust OpenVE Metamodel and the Code Generators. Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 26 / 37
  • 32. Device Drivers Timer-Drivers Link-Drivers General-Drivers Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 27 / 37
  • 33. Timer-Driver Properties Provide a periodic tick (usuall every 1ms). Handle Timeouts Provide high precision timestamps when tracing. Integrated into the Platform Image. Hard instantiation during system startup. Have no Task. Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 28 / 37
  • 34. Timer-Driver API void L1 initTimer(void) void L1 Timer setTimeout(L1 Timeout tick, L1 UINT32 id) void L1 Timer cancelTimeout(void) L1 Timeout L1 Timer getExpiredTimeoutTicks(void) L1 Timeout L1 Timer getRemainingTimeoutTicks(void) L1 Time L1 Timer getCurrentTime(void) L1 Status L1 Timer getTimeStamp (L1 TimeStamp ∗ pTimeStamp) L1 UINT32 L1 Timer getLowCounterFrequency(void) L1 UINT32 L1 Timer getHighCounterFrequency(void) Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 29 / 37
  • 35. Link-Driver Properties Transfer Packets from one Node to another Node, using a specific communication media (RS232, Ethernet, . . . ). Consist of at least one Task, which is used the send a Packet over the communication media. Initialise the hardware device associated with them Provide Client and Server type of link Initialisation. Kernel interface to them using a dedicated protocol. Link-Driver does the link-port routing. Link-Driver needs to be announced to the system using a Metamodel Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 30 / 37
  • 36. Link-Driver API L1 BOOL FooDriver init(FooDriver ∗ self) L1 BOOL FooLinkPort initServer (FooDriver ∗ driver, FooLinkPort ∗ self) L1 BOOL FooLinkPort initClient (FooDriver ∗ driver, FooLinkPort ∗ self) L1 BOOL FooDriver sendPacket (L1 XferPacket ∗ packet, L1 UINT32 size) void FooDriver EntryPoint(L1 TaskArguments) Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 31 / 37
  • 37. General-Driver Properties Implemented as normal user Tasks. Full control over the Application Programmer Interface (API). Additionally can be implemented like a Host Service Component. Interfacing to the Interrupt Request (IRQ) has to be done in the platform specific way. Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 32 / 37
  • 38. Outline 1 How OpenComRTOS works Internally Interacting Entities in Detail Virtual Single Processor (VSP) Programming Model Priority Inversion 2 Build Process 3 Extending OpenComRTOS Components Porting to a new Platform Device Drivers 4 Summary
  • 39. Summary This Lecture covered the following: Build process of OpenComRTOS projects; The steps involved in porting OpenComRTOS to a new Platform. Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 34 / 37
  • 40. Questions? Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 35 / 37
  • 41. Thank You for Your attention http://www.altreonic.com
  • 42. References Bernhard Sputh (Altreonic) Session #1.3 January 12, 2012 37 / 37