High Performance Real-Time Operating Systems Real-Time Kernel User’s Manual
Copyright Copyright (C) 2010 by SCIOPTA Systems AG. All rights reserved. No part of this publication may be reproduced, transmitted, stored in a retrieval system, or translated into any language or computer language, in any form or by any means, electronic, mechanical, optical, chemical or otherwise, without the prior written permission of SCIOPTA Systems AG.
Table of Contents SCIOPTA - Real-Time Kernel Table of Contents 1. SCIOPTA System .................................................................................................. 1-1 1.1 1.1.1 1.1.2 1.1.3 1.2 1.3 1.3.1 1.3.2 The SCIOPTA System ....................................................................................................................... SCIOPTA System ..............................................................................................................................
Table of Contents Module Priority................................................................................................................................... 4-1 Module Memory ................................................................................................................................. 4-1 System Protection ............................................................................................................................... 4-2 SCIOPTA Module Friend Concept...............
SCIOPTA - Real-Time Kernel Table of Contents 5.13.3 5.14 5.15 5.16 Get Process IDs of Dynamic Processes ........................................................................................... Process Variables ............................................................................................................................. Process Observation ......................................................................................................................... Process System Calls.......
Table of Contents System Tick ........................................................................................................................................ 9-1 Configuring the System Tick.............................................................................................................. 9-1 External Tick Interrupt Process .......................................................................................................... 9-2 Timing System Calls....................................
SCIOPTA - Real-Time Kernel Table of Contents 12.5.1 12.6 12.6.1 12.7 12.7.1 12.7.2 12.7.2.1 12.7.2.2 12.7.2.3 12.7.3 12.7.3.1 12.7.3.2 12.7.4 12.8 12.9 12.9.1 12.9.2 12.9.3 Registering Process Hooks............................................................................................................... Pool Hooks ....................................................................................................................................... Registering Pool Hooks..............................
Table of Contents Texas Instruments Stellaris LM3S6965 Board ............................................................................... 14-20 Standard Cortex-R4F Boards.......................................................................................................... 14-21 Texas Instruments TMS570PSFC66-EVAL Board........................................................................ 14-21 Standard MPC55xx Boards .................................................................................
SCIOPTA - Real-Time Kernel Table of Contents 15.7.2 15.7.2.1 15.7.2.2 15.7.2.3 15.7.2.4 15.7.3 15.7.4 15.7.5 15.7.6 15.7.6.1 15.8 15.8.1 15.8.2 15.9 15.9.1 15.9.2 15.10 15.10.1 15.10.2 15.11 15.11.1 15.11.2 15.12 15.13 15.14 15.14.1 15.14.1.1 15.14.1.2 15.14.1.3 15.14.1.4 15.14.1.5 15.14.2 15.14.2.1 15.14.2.2 15.14.2.3 15.14.2.4 15.14.2.5 15.14.3 15.14.3.1 15.14.3.2 15.14.3.3 15.14.3.4 15.14.3.5 15.14.4 15.14.4.1 15.14.4.2 15.14.4.3 15.14.4.4 GCC Linker Scripts............................................
Table of Contents Preference File sc_config.cfg ........................................................................................................... 16-2 Project File........................................................................................................................................ 16-2 SCONF Windows ............................................................................................................................. 16-3 Parameter Window ..................................
SCIOPTA - Real-Time Kernel Table of Contents 17.8.2 17.8.3 17.8.4 17.8.5 17.8.6 17.8.7 17.8.8 17.8.9 17.9 17.9.1 17.9.2 17.9.3 17.9.4 17.9.5 17.9.6 17.9.7 17.9.8 17.10 17.10.1 17.10.2 17.10.3 17.10.4 17.10.5 Manual Version 1.7 .......................................................................................................................... 17-3 Manual Version 1.6 ..........................................................................................................................
Table of Contents SCIOPTA - Real-Time Kernel X SCIOPTA - Real-Time Kernel Manual Version 4.
1 SCIOPTA System 1 SCIOPTA System SCIOPTA - Real-Time Kernel SCIOPTA System SCIOPTA Real-Time Kernel SCSIM SCIOPTA Simulator Windows SCAPI SCIOPTA API Windows Scheduler SCIOPTA - High Performance - Hard Real-Time - Fully Preemptive SCIOPTA and Windows Windows TCP/IP Network SCIOPTA IPS (IPSsock API) Windows (Winsock API) Windows (Winsock API) File Systems SCIOPTA File Systems - SFATFS (FAT) - SFFS (Flash File System) Windows File System Windows File System USB SCIOPTA USB - USBH (USB Ho
1 SCIOPTA System 1.1 The SCIOPTA System 1.1.1 SCIOPTA System 1.1.2 SCIOPTA Real-Time Kernels SCIOPTA System Framework together with specific SCIOPTA scheduler results in very high performance realtime operating systems for many CPU architectures. The kernels and scheduler are written 100% in assembler. SCIOPTA is the fastest real-time operating system on the market. The SCIOPTA architecture is specifically designed to provide excellent real-time performance and small size.
1 SCIOPTA System 1.3 Supported Processors 1.3.1 Architectures SCIOPTA - Real-Time Kernel SCIOPTA - supports the following processor architectures. Architectures are referenced in this document as ): • • • • arm ppc (power pc) coldfire win32 (SCIOPTA SCSIM Simulator and SCAPI SCIOPTA API, Windows Host) 1.3.2 CPU Families SCIOPTA - Kernel supports the following CPU families.
1 SCIOPTA System CPU Family Description arm imx27 Freescale i.MX2x (ARM9) Freescale i.MX21, i.MX23, i.MX25, i.MX27 and all other derivatives of the Freescale i.MX2x family. imx35 Freescale i.MX3x (ARM1136JF) Freescale i.MX31, i.MX35, i.MX37 and all other derivatives of the Freescale i.MX3x family. stellaris Texas Instrument Stellaris (ARM Cortex M3) All derivatives of the Texas Instrument Stellaris family.
SCIOPTA - Real-Time Kernel 1 SCIOPTA System Architecture CPU Family Description coldfire mcf521x Freescale Coldfire MCF521x (V2) MCF5213 and all other derivatives of the Freescale ColdFire MCF521x family. mcf523x Freescale Coldfire MCF523x (V2) MCF5235 and all other derivatives of the Freescale ColdFire MCF523x family. mcf525x Freescale Coldfire MCF525x (V2) MCF5253 and all other derivatives of the Freescale ColdFire MCF525x family.
1 SCIOPTA System SCIOPTA - Real-Time Kernel 1-6 SCIOPTA - Real-Time Kernel Manual Version 4.
2 Installation 2 Installation 2.1 Introduction SCIOPTA - Real-Time Kernel This chapter describes how to install SCIOPTA. Topics such as system requirements, installation procedure and uninstallation are covered herein. 2.2 The SCIOPTA Delivery Before you start the installation please check the SCIOPTA delivery. The following items should be included: • CD-ROM containing SCIOPTA for your CPU family. • Installation password.
2 Installation 2.4 Installation Procedure Windows Hosts 2.4.1 Main Installation Window Insert the CD-ROM into an available CD drive. This should auto-start the SCIOPTA installation. If auto-start does not execute you can manually start the installation by double clicking the file setup.exe on the CD. The following main installation window will appear on your screen: Figure 2-1: Main Installation Window To install SCIOPTA you must enter a password which was delivered by email or on paper.
2 Installation 2.4.2 Product Versions Each SCIOPTA product release is identified by a version number consisting of a four field compound number of the format: SCIOPTA - Real-Time Kernel “X.Y.Z.F” The first digit, X, is used for the major release number which will identify a major increase in the product functionality and involves usually a total rewrite or redesigning of the product including changes in the SCIOPTA kernel API. This number starts at 1.
2 Installation 2.4.6 SCIOPTA_HOME Environment Variable The SCIOPTA system building process needs the SCIOPTA_HOME environment variable to be defined. Please define the SCIOPTA_HOME environment variable and set it to the following value: The expression stands for the SCIOPTA four digit version number. 2.4.7 Setting SCIOPTA Path Environment Variable If you are using makefiles to build your system, the SCIOPTA delivery includes the GNU Make utility.
2 Installation 2.4.9 GNU Tool Chain Installation SCIOPTA for the ARM, PowerPC and ColdFire architectures is supporting the GNU Tool Chain. The Sourcery G++ Lite Edition from CodeSourcery is directly supported. The Lite Edition contains only command-line tools and is available at no cost. A ready to install version is available from SCIOPTA.
2 Installation 2.4.10 Eclipse IDE for C/C++ Developers. The Eclipse IDE for C/C++ Developers project provides a fully functional C and C++ Integrated Development Environment (IDE). Please consult http://www.eclipse.org/cdt for more information about Eclipse CDT (C/C++ Development Tools) project. For all delivered SCIOPTA examples for the ARM, PowerPC and ColdFire architectures there are Makefiles included. Eclipse is easy to configure for working with external makefiles.
3 Getting Started 3 Getting Started 3.1 Introduction SCIOPTA - Real-Time Kernel These is a small tutorial example which gives you a good introduction into typical SCIOPTA systems and products. It would be a good starting point for more complex applications and your real projects. 3.
3 Getting Started 3.3 Getting Started Eclipse and GNU GCC This is a getting started project including a step-by-step tutorial for the SCIOPTA Real-Time Kernels (=arm, =ppc and =coldfire). Equipment For architectures ARM, PowerPC and ColdFire the following equipment is used to run this getting started example: • Microsoft® Windows Personal Computer or Workstation. • Compiler package: For ARM CodeSourcery GNU C & C++ Sourcery G++ Lite Edition for ARM.
3 Getting Started 5. Launch Eclipse. The Workspace Launcher window opens. 6. Select your created project folder (e.g. c:\myproject\sciopta) as your workspace (by using the Browse button). 7. Click the OK button. The workbench windows opens. 8. Close the “Welcome” window. 9. Deselect “Build Automatically” in the Project menu. SCIOPTA - Real-Time Kernel 10. Open the New Project window (menu: File -> New -> C Project). We will create Makefile project. 11. Click the Finish button.
3 Getting Started 31. Launch your source-level emulator/debugger and load the resulting sciopta.elf. 32. If you have connected a serial line from the COM port of your host PC to the UART of your target board, open a terminal window on your PC and connect it to your selected PC COM port. Parameters are 115200Bd, 8 Bit, no parity, 1 stop bit, no flow-control. 34. Now you can start the system and check the log messages on your host terminal window. 35.
3 Getting Started 3.4 Getting Started iSYSTEM winIDEA This is a getting started project including a step-by-step tutorial for the SCIOPTA Real-Time Kernels (=arm, =ppc and =coldfire). SCIOPTA - Real-Time Kernel 3.4.1 Equipment For architectures ARM, PowerPC and ColdFire the following equipment is used to run this getting started example: • Microsoft® Windows Personal Computer or Workstation. • Compiler package: For ARM CodeSourcery GNU C & C++ Sourcery G++ Lite Edition for ARM.
3 Getting Started 6. Launch the SCIOPTA configuration utility SCONF from the desktop or the Start menu. 7. Load the SCIOPTA example project file hello.xml from your project folder into SCONF. File > Open 8. Click on the Build All button or press CTRL-B to build the kernel configuration files. • • • 9. sciopta.cnf sconf.c sconf.h. Launch the iSYSTEM - winIDEA Emulator/Debugger. 10. Open the example workspace (menu: File > Workspace > Open Workspace...).
3 Getting Started 3.5 Getting Started IAR Systems Embedded Workbench This is a getting started project including a step-by-step tutorial for the SCIOPTA Real-Time Kernels (=arm and =coldfire). SCIOPTA - Real-Time Kernel 3.5.1 Equipment For architectures ARM and ColdFire the following equipment is used to run this getting started example: • Microsoft® Windows Personal Computer or Workstation. • Compiler package: For ARM IAR Embedded Workbench for ARM.
3 Getting Started 7. Launch the SCIOPTA configuration utility SCONF from the desktop or the Start menu. 8. Load the SCIOPTA example project file hello.xml from your project folder into SCONF. File > Open 9. Choose the Build All button or press CTRL-B to build the kernel configuration files. • • • sciopta.cnf sconf.c sconf.h. 10. Launch the IAR Embedded Workbench. 11. Click on the Open existing workbench button in the Embedded Workbench Startup window. 12.
3 Getting Started 3.6 Getting Started SCIOPTA SCSIM Simulator This is a getting started project including a step-by-step tutorial for the SCIOPTA SCSIM Simulator (=win32) architecture. SCIOPTA - Real-Time Kernel 3.6.1 Equipment The following equipment is used to run this getting started example: • Microsoft® Windows Personal Computer or Workstation. • Microsoft® Visual C++ 2005 Version 8.0 development environment. 3.6.2 Step-By-Step Tutorial 1.
3 Getting Started SCIOPTA - Real-Time Kernel 3-10 SCIOPTA - Real-Time Kernel Manual Version 4.
4 Modules 4 Modules 4.1 Introduction SCIOPTA - Real-Time Kernel SCIOPTA allows you to group processes into functional units called modules. Very often you want to decompose a complex application into smaller units which you can realize in SCIOPTA by using modules. This will improve system structure. A SCIOPTA process can only be created from within a module.
4 Modules 4.5 System Protection In bigger systems it is often necessary to protect certain system areas to be accesses by others. In SCIOPTA the user can achieve such protection by grouping processes into modules creating sub-systems which can be protected. System protection and MMU support is optional in SCIOPTA and should only be used and configured if you need this feature. 4.6 SCIOPTA Module Friend Concept SCIOPTA supports also the “friend” concept. Modules can be “friends” of other modules.
4 Modules 4.7 Creating Modules 4.7.1 Static Module Creation SCIOPTA - Real-Time Kernel Static modules are modules which are automatically created when the systems boots up. They are defined in the SCONF configuration tool. Figure 4-1: Module Creation by SCONF Please consult chapter 16.10 “Creating Modules” on page 16-15 for more information about module creation by the SCONF tool. 4.7.2 Dynamic Module Creation Another way is to create modules dynamically by the sc_moduleCreate() system call.
4 Modules 4.8 Module Layout Examples 4.8.1 Small Systems Figure 4-3: One-Module System 4-4 SCIOPTA - Real-Time Kernel Manual Version 4.1 User’s Manual SCIOPTA - Real-Time Kernel Small or simple system can be put into one module. This keeps the system and memory map on a very neat level.
4 Modules 4.8.2 Multi-Module Systems SCIOPTA - Real-Time Kernel In larger or more complex system it is good design practice to partition the system up into more modules. Figure 4-4: Multi-Module System Above example system consists of four modules.
4 Modules 4.9 Module System Calls Please consult the SCIOPTA - Kernel, Reference Manual for detailed description of the SCIOPTA system calls. sc_moduleCreate Creates a module. sc_moduleFriendAll Defines all existing modules in a system as friend. sc_moduleFriendGet Informs the caller if a module is a friend. sc_moduleFriendNone Removes all modules as friends of the caller. sc_moduleFriendRm Removes a module of the friends of the caller. sc_moduleIdGet Returns the ID of a module.
5 Processes 5 Processes 5.1 Introduction All SCIOPTA processes have system wide unique process identities. A SCIOPTA process is always part of a SCIOPTA module. Please consult chapter 4 “Modules” on page 4-1 for more information about SCIOPTA modules. 5.2 Process States A process running under SCIOPTA is always in the RUNNING, READY or WAITING state. 5.2.1 Running If the process is in the running state it executes on the CPU. Only one process can be in running state in a single CPU system.
5 Processes 5.3 Static Processes Static processes are created by the kernel at start-up. They are designed inside a configuration utility by defining the name and all other process parameters such as priority and process stack sizes. At start-up the kernel puts all static created processes into READY or WAITING (stopped) state. Figure 5-2: Process Configuration Window for Static Processes 5.4 Dynamic Processes Dynamic processes can be created and killed during run-time.
5 Processes 5.5 Process Identity Each process has a unique process identity (process ID) which is used in SCIOPTA system calls when processes need to be addressed. SCIOPTA - Real-Time Kernel The process ID will be allocated by the operating system for all processes which you have entered during SCIOPTA configuration (static processes) or will be returned when you are creating processes dynamically. The kernel maintains a list with all process names and their process IDs.
5 Processes For process scheduling SCIOPTA uses a combination of the module priority and process priority called effective priority. The kernel determines the effective priority as follows: Effective Priority = Module Priority + Process Priority See also chapter 4.3 “Module Priority” on page 4-1. Writing Prioritized Processes 5.6.3.
5 Processes 5.7 Interrupt Processes SCIOPTA - Real-Time Kernel An interrupt is a system event generated by a hardware device. The CPU will suspend the actually running program and activate an interrupt service routine assigned to that interrupt. The programs which handle interrupts are called interrupt processes in SCIOPTA. SCIOPTA is channelling interrupts internally and calls the appropriate interrupt process.
5 Processes 5.7.3.2 Interrupt Source Parameter The interrupt process declaration has beside the process name a second parameter ( see chapter 5.7.3.1 “Interrupt Process Declaration Syntax” on page 5-5) which defines the interrupt source. This parameter is set by the kernel depending on the interrupt source. 0 The interrupt process is activated by a real hardware interrupt. 1 The interrupt process is activated by a message sent to the interrupt process.
5 Processes 5.8 Timer Processes SCIOPTA - Real-Time Kernel A timer process in SCIOPTA is a specific interrupt process connected to the tick timer of the operating system. SCIOPTA is calling each timer process periodically derived from the operating system tick counter. When configuring or creating a timer process, the user defines the number of system ticks to expire from one call to the other individually for each process.
5 Processes 5.9 Init Processes At module start the init process gets automatically the highest priority (0). After the init process has done some its work it will change its priority to a specific lowest level (32) and enter an endless loop. The init process acts therefore also as idle process which will run when all other processes of a module are in the waiting state. 5.9.1 Creating and Declaring Init Processes In static modules the init process is written, created and started automatically.
5 Processes 5.10 Daemons Daemons are internal processes in SCIOPTA and are structured the same way as ordinary processes. They have a process control block (pcb), a process stack and a priority. Not all SCIOPTA daemons are part of the standard SCIOPTA delivery. SCIOPTA - Real-Time Kernel 5.10.1 Process Daemon The process daemon (sc_procd) is identifying processes by name and supervises created and killed processes.
5 Processes 5.10.2 Kernel Daemon The Kernel Daemon (sc_kerneld) is creating and killing modules and processes. Some time consuming system work of the kernel (such as module and process killing) returns to the caller without having finished all related work. The Kernel Daemon is doing such work at appropriate level. Kernel Daemon Figure 5-5: Kernel Daemon Declaration in SCONF The kernel daemon is part of the kernel. But to use it you need to define and declare it in the SCONF configuration utility.
5 Processes 5.11 Supervisor Processes SCIOPTA - Real-Time Kernel In SCIOPTA systems which include MMU protection prioritized processes can be defined to be user or supervisor processes. Supervisor processes have full access rights to system resources. Supervisor processes are often used in device drivers. SCIOPTA - Real-Time Kernel User’s Manual Manual Version 4.
5 Processes 5.12 Process Stacks When creating processes either statically in the SCONF configuration tool or dynamically with the sc_procPrioCreate, sc_procIntCreate or sc_procTimCreate system calls you always need to give a stack size. All process types (init, interrupt, timer, prioritized and daemon need a stack). When you start designing a system it is good design practice to define a the stack as big as possible.
5 Processes 5.13 Addressing Processes 5.13.1 Introduction SCIOPTA - Real-Time Kernel In a typical SCIOPTA design you need to address processes. For example you want to • • • • • • send SCIOPTA messages to a process, kill a process get a stored name of a process observe a process get or set the priority of a process start and stop processes In SCIOPTA you are addressing processes by using their process ID (pid).
5 Processes 5.14 Process Variables Each process can store local variables inside a protected data area. Process variables are variables which can only be accesses by functions within the context of the process.
5 Processes 5.15 Process Observation SCIOPTA - Real-Time Kernel Communication channels between processes in SCIOPTA can be observed no matter if the processes are local or distributed over remote systems. The process calls sc_procObserve which includes the pointer to a return message and the process ID of the process which should be observed. If the observed process dies the kernel will send the defined message back to the requesting process to inform it.
5 Processes 5.16 Process System Calls Please consult the SCIOPTA - Kernel, Reference Manual for detailed description of the SCIOPTA system calls. Requests the kernel daemon to create a prioritized process. sc_procIntCreate Requests the kernel daemon to create a interrupt process. sc_procTimCreate Requests the kernel daemon to create a timer process. sc_procDaemonRegister Registers a process daemon which is responsible for pid get request. sc_procDaemonUnregister Unregisters a process daemon.
SCIOPTA - Real-Time Kernel 5 Processes sc_procVarDel Deletes a process variable. sc_procVarGet Returns a process variable. sc_procVarInit Initializes a process variable area. sc_procVarRm Removes a process variable area. sc_procVarSet Sets a process variable. sc_procVectorGet Returns the interrupt vector of an interrupt process. sc_procWakeupEnable Enables the wakeup of a timer or interrupt process. sc_procWakeupDisable Disables the wakeup of a timer or interrupt process.
5 Processes SCIOPTA - Real-Time Kernel 5-18 SCIOPTA - Real-Time Kernel Manual Version 4.
6 Messages 6 Messages 6.1 Introduction SCIOPTA - Real-Time Kernel SCIOPTA is a so called Message Based Real-Time Operating System. Interprocess communication and coordination is done by messages. Message passing is a very fast, secure, easy to use and good to debug method. Messages are the preferred tool for interprocess communication in SCIOPTA. SCIOPTA is specifically designed to have a very high message passing performance.
6 Messages When a process is allocating a message it will be the owner of the message. If the process is transmitting the message to another process, the other process will become owner. After transmitting, the sending process cannot access the message any more. This message ownership feature eliminates access conflicts in a clean and efficient way. 6.3 Message Sizes If a process allocates a message there is also the size to be given. The user just gives the number of bytes needed.
6 Messages 6.5 Message Passing Message passing is the favourite method for interprocess communication in SCIOPTA. Contrary to mailbox interprocess communication in traditional real-time operating systems SCIOPTA is passing messages directly from process to process. SCIOPTA - Real-Time Kernel Only messages owned by the process can be transmitted. A process will become owner if the message is allocated from the message pool or if the process has received the message.
6 Messages 6.6 Message Declaration The following method for declaring, accessing and writing message buffers minimizes the risk for bad message accesses and provides standardized code which is easy to read and to reuse. The SCIOPTA message declaration syntax can be divided into three parts: • Message number definition • Message structure definition • Message union declaration 6.6.1 Message Number 6.6.1.
6 Messages 6.6.2 Message Structure 6.6.2.1 Description SCIOPTA - Real-Time Kernel Immediately after the message number declaration usually the message structure declaration follows. We recommend to write the message structure name in lower case letters in order to avoid mixing up with message number declaration. The message ID (or message number) id must be the first declaration in the message structure. It is used by the SCIOPTA kernel to identify SCIOPTA messages.
6 Messages 6.6.3 Message Union 6.6.3.1 Description The union sc_msg is used to standardize a message declaration for files using SCIOPTA messages. 6.6.3.2 Syntax union sc_msg { sc_msgid_t . . . }; 6.6.3.3 id id; Parameter Message ID Must be included in this union declaration. It is used by the SCIOPTA kernel to identify SCIOPTA messages. message_name_nMessages which the process will use.
6 Messages 6.7 Message Number (ID) organization Message numbers (also called message IDs) should be well organized in a SCIOPTA project. SCIOPTA - Real-Time Kernel 6.7.1 Global Message Number Defines File All message IDs greater than 0x8000000 are reserved for SCIOPTA internal modules and functions and may not be used by the application. These messages are defined in the file defines.h. Please consult this file for managing and organizing the message IDs of your application. defines.h 6.
6 Messages 6.9 Messages and Modules A process can only allocate a message from a pool inside the same module. Messages transmitted and received within a module are not copied, only the pointer to the message is transferred. A module can be declared as friend of another module. The message which was transmitted from the module to its declared friend will not be copied. But in return if the friend sends back a message it will be copied.
6 Messages 6.10 Message Passing and Scheduling The prioritized process with the highest priority is running (owning the CPU). SCIOPTA is maintaining a list of all prioritized processes which are ready. If the running process becomes not ready (i.e. waiting on at a message receive which has not yet arrived) SCIOPTA will activate the next prioritized process with the highest priority.
6 Messages 6.11 Message System Calls Please consult the SCIOPTA - Kernel, Reference Manual for detailed description of the SCIOPTA system calls. Allocates a memory buffer of selectable size from a message pool. sc_msgAllocClr Allocates a memory buffer of selectable size from a message pool and initializes the message data to 0. sc_msgTx Sends a message to a process. sc_msgTxAlias Sends a message to a process by setting any process ID. sc_msgRx Receives one ore more defined messages.
7 Pools 7 Pools 7.1 Introduction SCIOPTA - Real-Time Kernel Messages are the main data object in SCIOPTA. Messages are allocated by processes from message pools. If a process does not need the messages any longer it will be given back (freed) by the owner process. There can be up to 127 pools per module for a standard kernel (32-bit) and up to 15 pools for a compact kernel (16bit). Please consult chapter 4 “Modules” on page 4-1 for more information about the SCIOPTA module concept.
7 Pools 7.3 Pool Message Buffer Memory Manager The difference of requested bytes and returned bytes can not be accessed by the user and will be unused. It is therefore very important to select the buffer sizes to match as close as possible those needed by your application to waste as little memory as possible. The pool buffer manager used by SCIOPTA is a very well known technique in message based systems. The SCIOPTA memory manager is very fast and deterministic.
7 Pools 7.4 Creating Pools 7.4.1 Static Pool Creation SCIOPTA - Real-Time Kernel Static pools are pools which are automatically created when the systems boots up. They are defined in the SCONF configuration tool. Figure 7-2: Pool Creation by SCONF Please consult chapter 16.12 “Creating Processes and Pools” on page 16-18 for more information about module creation by the SCONF tool. 7.4.2 Dynamic Pool Creation Another way is to create modules dynamically by the sc_poolCreate system call.
7 Pools 7.5 Pool System Calls Please consult the SCIOPTA - Kernel V2, Reference Manual for detailed description of the SCIOPTA system calls. Creates a message pool. sc_poolDefault Sets a message pool as default pool. sc_poolHookRegister Registers a pool hook. sc_poolIdGet Returns the ID of a message pool. sc_poolInfo Returns a snap-shot of a pool control block. sc_poolKill Kills a whole message pool. sc_poolReset Resets a message pool in its original state.
8 SCIOPTA Trigger 8 SCIOPTA Trigger 8.1 Description SCIOPTA - Real-Time Kernel The trigger in SCIOPTA is a method which allows to synchronise processes even faster as it would be possible with messages. With a trigger a process will be notified and woken-up by another process. Trigger are used only for process coordination and synchronisation and cannot carry data.
8 SCIOPTA Trigger 8.3 Trigger Example This is a very small example how triggers can be used in SCIOPTA processes. A prioritized process is waiting on its trigger and will be executed when another process (in this case an interrupt process) is activating the trigger. extern sc_pid_t trigproc_pid OS_INT_PROCESS (myint, 0) { . . .
8 SCIOPTA Trigger 8.4 Trigger System Calls SCIOPTA - Real-Time Kernel Please consult the SCIOPTA - Kernel V2, Reference Manual for detailed description of the SCIOPTA system calls. sc_trigger Signals a process trigger. sc_triggerValueGet Returns the value of a process trigger. sc_triggerValueSet Sets the value of a process trigger. sc_triggerWait Waits on its process trigger. SCIOPTA - Real-Time Kernel User’s Manual Manual Version 4.
8 SCIOPTA Trigger SCIOPTA - Real-Time Kernel 8-4 SCIOPTA - Real-Time Kernel Manual Version 4.
9 Time Management 9 Time Management 9.1 Introduction SCIOPTA - Real-Time Kernel Time management is one of the most important tasks of a real-time operating system. There are many functions in SCIOPTA which depend on time. A process can for example wait a specific time for a message to arrive from another process or process can be suspended for a specific time or timer processes can be defined which are activated at specific time intervals. 9.
9 Time Management 9.2.2 External Tick Interrupt Process An external tick interrupt process is usually included in the board support package. systick.S Timing System Calls Please consult the SCIOPTA - Kernel, Reference Manual for detailed description of the SCIOPTA system calls. sc_sleep Suspends a process for a defined time. sc_tick Calls the kernel tick function. Advances the kernel tick counter by 1. sc_tickGet Returns the actual kernel tick counter value.
9 Time Management 9.4 Timeout Server 9.4.1 Introduction SCIOPTA - Real-Time Kernel SCIOPTA has a built-in message based time-out server. Processes can register a time-out job at the time-out server. This done by the sc_tmoAdd system call which requests a time-out message from the kernel after a defined time. 9.4.2 Using the Timeout Server The caller needs to allocate a message and include the pointer to this message in the call.
9 Time Management SCIOPTA - Real-Time Kernel 9-4 SCIOPTA - Real-Time Kernel Manual Version 4.
10 Error Handling 10 Error Handling 10.1 Introduction SCIOPTA - Real-Time Kernel SCIOPTA has many built-in error check functions. The following list shows some examples. • When allocating a message it is checked if the requested buffer size is available and if there is still enough memory in the message pool. • Process identities are verified in different kernel functions. • Ownership of messages are checked. • Parameters and sources of system calls are validated.
10 Error Handling 10.3 Error Hook In SCIOPTA all error conditions will end up in the error hook. As already stated there are two error hooks available: the Module Error Hook and the Global Error Hook.
10 Error Handling 10.3.1 Error Information SCIOPTA - Real-Time Kernel When an error hook is called from the kernel, all information about the error are transferred in 32-bit error word (parameter errcode). Please consult the SCIOPTA - Kernel, Reference Manual for detailed description of the SCIOPTA error word. There is also an additional 32-bit extra error word available to the user.
10 Error Handling 10.3.3 Error Hook Declaration Syntax 10.3.3.1 Description 10.3.3.2 Syntax int (sc_errcode_t errcode, sc_extra_t extra, int user, sc_pcb_t *pcb) { ... error hook code }; 10.3.3.3 Parameter errcode Error word. Error word containing the function code which defines from which SCIOPTA system call the error was initiated, the error code which contains the specific error information and the error type which informs about the source and type of error.
10 Error Handling 10.3.4 Error Hook Example SCIOPTA - Real-Time Kernel #include "sconf.h" #include #include
10 Error Handling 10.3.5 Error Hooks Return Behaviour The actions of the kernel after returning from the module or global error hook depend on the error hook return values and the error types as described in the following table. Module Error Hook Error Type Action exists return value exists return value Module Error Fatal No - No - X Endless loop. Yes Endless loop. No Endless loop. Yes Kill module and swap out. No Return & continue. Yes Endless loop. No Endless loop.
10 Error Handling 10.4 The errno Variable Each SCIOPTA process has an errno variable. This variable is used mainly by library functions to set the errno variable. The errno variable can only be accessed by some specific SCIOPTA system calls. SCIOPTA - Real-Time Kernel The errno variable will be copied into the observe messages if the process dies. SCIOPTA - Real-Time Kernel User’s Manual Manual Version 4.
10 Error Handling SCIOPTA - Real-Time Kernel 10-8 SCIOPTA - Real-Time Kernel Manual Version 4.
11 System Start and Setup 11 System Start and Setup 11.1 Start Sequence After a system hardware reset the following sequence will be executed from point 1. SCIOPTA - Real-Time Kernel In the SCIOPTA SCSIM Simulator after Windows has started the SCIOPTA application by calling the sciopta_start function inside the WinMain function the sequence will be executed from point 4. 1. The kernel calls the function reset_hook. 2. The kernel performs some internal initialization. 3.
11 System Start and Setup 11.2 Reset Hook In SCIOPTA a reset hook must always be present and must have the name reset_hook. The reset hook must be written by the user. The reset hook is mainly used to do some basic chip and board settings. The C environment is not yet initialized when the reset hook executes (stackpointer not yet initialized). Therefore the reset hook should be written in assembler. For some C environments it might be written in C. There is no reset hook in the SCIOPTA SCSIM Simulator.
11 System Start and Setup 11.3 C Startup After a cold start the kernel will call the C startup function. The C startup function is written in assembler and has the name cstartup. It initializes the C system and replaces the library C startup function. C startup functions are compiler specific. For IAR Embedded Workbench there is no C startup function needed. SCIOPTA - Real-Time Kernel There is no C startup function needed in the SCIOPTA SCSIM Simulator. 11.3.
11 System Start and Setup 11.5 Start Hook The start hook must always be present and must have the name start_hook. The start hook must be written by the user. If a start hook is declared the kernel will jump into it after the C environment is initialized. 11.5.1 Syntax void start_hook (void); 11.5.2 Parameter None. 11.5.3 Return Value None. 11.5.4 Location In the delivered SCIOPTA examples the start hook is usually included in the file system.c system.c 11.
11 System Start and Setup 11.7.1 System Module Start Function After all static modules, pools and processes have been created by the init Process of the system module the kernel will call a system module start function. This is function with the same name as the system module and must be written by the user. Blocking system calls are not allowed in the system module start function. All other system calls may be used.
11 System Start and Setup SCIOPTA - Real-Time Kernel 11-6 SCIOPTA - Real-Time Kernel Manual Version 4.
12 Additional Functions 12 Additional Functions 12.1 Introduction In this chapter we are listing some additional functions of the kernel which are used for specific needs and projects. SCIOPTA - Real-Time Kernel 12.2 Hooks Hooks are user written functions which are called by the kernel at different location. They are only called if the user defined them at configuration. User hooks are used for a number of different purposes and are target system dependent.
12 Additional Functions 12.3 Error Hook The error hook is the most important user hook function and should normally be included in most of the systems. An error hook can be used to log the error and additional data on a logging device if the kernel has detected an error condition. 12.4 Message Hooks In SCIOPTA you can configure Message Transmit Hooks and Message Receive Hooks. These hooks are called each time a message is transmitted to any process or received by any process.
12 Additional Functions 12.7 Exception Handling 12.7.1 Introduction SCIOPTA - Real-Time Kernel Exception handling for SCIOPTA is mainly done inside the kernel. Depending on the CPU family there might be some external functions needed. They are usually supplied by SCIOPTA and included in the board support package of the delivery. 12.7.2 SCIOPTA ARM Exception Handling 12.7.2.1 ARM Architecture Exception Handler Files cortexm3_exception. Exception handler for Cortex-M3. cortexm3_vector.
12 Additional Functions 12.7.2.3 ARM Architecture Interrupt Vectors Files The interrupt vectors are usually defined in the resethook (see also chapter 11.2 “Reset Hook” on page 11-2). For some CPUs the vectors are defined in specific vector definition file or in the interrupt handler. Vector table for Cortex-M3. File extensions : S GNU GCC File location: \sciopta\\bsp\arm\src\gnu\ s79 IAR Version 4.
12 Additional Functions 12.7.3 SCIOPTA PowerPC Exception Handling SCIOPTA - Real-Time Kernel 12.7.3.1 PowerPC CPU Family Exception Handling Files exception. PowerPC kernel - exception handling. File extensions : S GNU GCC and Windriver File location: \sciopta\\bsp\ppc\\src\ Usually there is no need to modify the exception handlers. The vector table is included int the file exception.. Interrupt handling is included int the file exception.. 12.7.3.
12 Additional Functions 12.8 Trap Interface In a typical monolithic SCIOPTA systems the kernel functions are directly called. In more complex dynamic systems using load modules or MMU protected modular systems the kernel functions cannot be accessed any more by direct calls. syscall.S SCIOPTA kernel trap interface trampoline functions. The extension .S is used in GCC for assembler source files. For other compiler packages the extensions for assembler source files might be different.
12 Additional Functions 12.9 Distributed Systems 12.9.1 Introduction SCIOPTA - Real-Time Kernel SCIOPTA is a message based real-time operating system and therefore very well adapted for designing distributed multi-CPU systems. Message based operating systems where initially designed to fulfil the requirements of distributed systems. 12.9.2 CONNECTORS CONNECTORS are specific SCIOPTA processes and responsible for linking a number of SCIOPTA Systems.
12 Additional Functions 12.9.3 Transparent Communication All connectors start communicating to search for the process. If the process is found in the remote system the connector will assign a free process ID for the system, add it in a remote process list and transmits a message back to the kernel including the assigned process ID. The kernel returns the process ID to the caller process. The process can now transmit and receive messages to the (remote) process ID as if the process is local.
13 SCIOPTA Design Hints and Tips 13 SCIOPTA Design Hints and Tips 13.1 Introduction SCIOPTA - Real-Time Kernel SCIOPTA is a preemptive multi-tasking high performance real-time operating system (rots) for using in embedded systems. SCIOPTA is a so-called message based rtos that is, interprocess communication and coordination are realized by messages. A typical system controlled by SCIOPTA consists of a number of more or less independent programs called processes.
13 SCIOPTA Design Hints and Tips 13.2 Some SCIOPTA Design Rules Correct designed SCIOPTA systems should use only a few priority levels. When designing a system avoid to control it with priorities. A system should be controlled by message passing and message flow. Priorities should be used to guarantee fast response time to external events. If you identify work which is concurrent do not try to place the code in one process. Simultaneous work should be placed in different processes.
14 Board Support Packages 14 Board Support Packages 14.1 Introduction SCIOPTA - Real-Time Kernel A SCIOPTA board support package (BSP) consists of number of files containing device drivers and project files such as makefiles and linker script for specific boards. The BSPs are included in the delivery in a specific folder and organized in different directory levels depending on CPU dependency: 1. General System Functions 2. Architecture System Functions 3. CPU Family System Functions 4.
14 Board Support Packages 14.4 CPU Family System Functions CPU Family System Functions are functions which are architecture () specific and CPU family specific (please consult chapter 1.3.2 “CPU Families” on page 1-3 for the list of supported CPU families) and are common to all boards.
14 Board Support Packages 14.6 Standard ARM7 Boards Please note that we are supporting many ARM7 based boards. The boards listed here are included in the standard delivery and maintained within the shipped versions. SCIOPTA - Real-Time Kernel 14.6.1 ATMEL AT91SAM7A3-EK Board CPU Atmel AT91SAM7A3 BOARD_SEL Makefile board selection number. 22 To be used as parameter when calling the makefile from Eclipse or from a shell.
14 Board Support Packages 14.6.2 Atmel AT91SAM7S-EK Board Atmel AT91SAM7S BOARD_SEL Makefile board selection number. 9 To be used as parameter when calling the makefile from Eclipse or from a shell. (Example: gnu_make BOARD_SEL = 9) Makefile location for kernel example (hello): \sciopta\\exp\krn\arm\hello\at91sam7s-ek\ Log Port Log message port. J3 DBGU The getting started examples are sending some specific example log messages to a selected UART of the board.
14 Board Support Packages SCIOPTA - Real-Time Kernel 14.6.3 Atmel AT91SAM7SE-EK Board CPU Atmel AT91SAM7SE BOARD_SEL Makefile board selection number. 15 To be used as parameter when calling the makefile from Eclipse or from a shell. (Example: gnu_make BOARD_SEL = 15) Makefile location for kernel example (hello): \sciopta\\exp\krn\arm\hello\at91sam7se-ek\ Log Port Log message port.
14 Board Support Packages 14.6.4 Atmel AT91SAM7X-EK Board Atmel AT91SAM7X BOARD_SEL Makefile board selection number. 9 To be used as parameter when calling the makefile from Eclipse or from a shell. (Example: gnu_make BOARD_SEL = 9) Makefile location for kernel example (hello): \sciopta\\exp\krn\arm\hello\at91sam7se-ek\ Log Port Log message port.
14 Board Support Packages SCIOPTA - Real-Time Kernel 14.6.5 Phytec phyCORE-LPC2294 Board CPU NXP LPC2294 BOARD_SEL Makefile board selection number. 3 To be used as parameter when calling the makefile from Eclipse or from a shell. (Example: gnu_make BOARD_SEL = 3) Makefile location for kernel example (hello): \sciopta\\exp\krn\arm\hello\phyCore2294\ Log Port Log message port.
14 Board Support Packages 14.6.6 Embedded Artists LPC2468 OEM Board NXP LPC2468 BOARD_SEL Makefile board selection number. 17 To be used as parameter when calling the makefile from Eclipse or from a shell. (Example: gnu_make BOARD_SEL = 17) Makefile location for kernel example (hello): \sciopta\\exp\krn\arm\hello\EA_LPC2468_16_OEM\ Log Port Log message port.
14 Board Support Packages SCIOPTA - Real-Time Kernel 14.6.7 IAR STR711-SK Board CPU STMicroelectronics STR711 BOARD_SEL Makefile board selection number. 10 To be used as parameter when calling the makefile from Eclipse or from a shell. (Example: gnu_make BOARD_SEL = 10) Makefile location for kernel example (hello): \sciopta\\exp\krn\arm\hello\str711-sk\ Log Port Log message port.
14 Board Support Packages 14.7 ARM9 Boards Please note that we are supporting many ARM9 based boards. The boards listed here are included in the standard delivery and maintained within the shipped versions. Atmel AT91SAM9261-EK Board CPU Atmel AT91SAM9261 BOARD_SEL Makefile board selection number. 11 To be used as parameter when calling the makefile from Eclipse or from a shell.
14 Board Support Packages SCIOPTA - Real-Time Kernel 14.7.2 Atmel AT91SAM9263-EK Board CPU Atmel AT91SAM9261 BOARD_SEL Makefile board selection number. 20 To be used as parameter when calling the makefile from Eclipse or from a shell. (Example: gnu_make BOARD_SEL = 20) Makefile location for kernel example (hello): \sciopta\\exp\krn\arm\hello\at91sam9263-ek\ Log Port Log message port.
14 Board Support Packages 14.7.3 IAR STR912-SK Board STMicroelectronics STR912 BOARD_SEL Makefile board selection number. 12 To be used as parameter when calling the makefile from Eclipse or from a shell. (Example: gnu_make BOARD_SEL = 12) Makefile location for kernel example (hello): \sciopta\\exp\krn\arm\hello\str912-sk\ Log Port Log message port. UART0 The getting started examples are sending some specific example log messages to a selected UART of the board.
14 Board Support Packages SCIOPTA - Real-Time Kernel 14.7.4 LOGIC i.MX27 LITEKIT CPU Freescale i.MX27 BOARD_SEL Makefile board selection number. 24 To be used as parameter when calling the makefile from Eclipse or from a shell. (Example: gnu_make BOARD_SEL = 24) Makefile location for kernel example (hello): \sciopta\\exp\krn\arm\hello\mcimx27lite\ Log Port Log message port.
14 Board Support Packages 14.8 Standard ARM11 Boards Please note that we are supporting many ARM11 based boards. The boards listed here are included in the standard delivery and maintained within the shipped versions. Phytec phyCORE-iMX35 Board CPU Freescale i.MX356 BOARD_SEL Makefile board selection number. 24 To be used as parameter when calling the makefile from Eclipse or from a shell.
14 Board Support Packages 14.9 Standard XScale Boards Please note that we are supporting many XScale based boards. The boards listed here are included in the standard delivery and maintained within the shipped versions. SCIOPTA - Real-Time Kernel 14.9.1 Phytec phyCORE-PXA270 Board CPU Marvel PXA270 BOARD_SEL Makefile board selection number. 14 To be used as parameter when calling the makefile from Eclipse or from a shell.
14 Board Support Packages 14.9.2 CompuLab SBC-X270 Board Marvel PXA270 BOARD_SEL Makefile board selection number. 18 To be used as parameter when calling the makefile from Eclipse or from a shell. (Example: gnu_make BOARD_SEL = 18) Makefile location for kernel example (hello): \sciopta\\exp\krn\arm\hello\cm-x270\ Log Port Log message port. UART The getting started examples are sending some specific example log messages to a selected UART of the board.
14 Board Support Packages SCIOPTA - Real-Time Kernel 14.9.3 Toradex Colibri PXA320 CPU Marvel PXA320 BOARD_SEL Makefile board selection number. 23 To be used as parameter when calling the makefile from Eclipse or from a shell. (Example: gnu_make BOARD_SEL = 23) Makefile location for kernel example (hello): \sciopta\\exp\krn\arm\hello\ColibriPXA320\ Log Port Log message port.
14 Board Support Packages 14.10 Standard Cortex-M3 Boards Please note that we are supporting many Cortex-M3 based boards. The boards listed here are included in the standard delivery and maintained within the shipped versions. CPU STMicroelectronics STM32F103RBT6 BOARD_SEL Makefile board selection number. 25 To be used as parameter when calling the makefile from Eclipse or from a shell.
14 Board Support Packages SCIOPTA - Real-Time Kernel 14.10.2 STMicroelectronics STM3210E-EVAL Evaluation Board CPU STMicroelectronics STM32F103Z BOARD_SEL Makefile board selection number. 28 To be used as parameter when calling the makefile from Eclipse or from a shell. (Example: gnu_make BOARD_SEL = 28) Makefile location for kernel example (hello): \sciopta\\exp\krn\arm\hello\stm3210e-eval\ Log Port Log message port.
14 Board Support Packages 14.10.3 Texas Instruments Stellaris LM3S6965 Board Texas Instruments Stellaris LM3S6965 BOARD_SEL Makefile board selection number. 26 To be used as parameter when calling the makefile from Eclipse or from a shell. (Example: gnu_make BOARD_SEL = 26) Makefile location for kernel example (hello): \sciopta\\exp\krn\arm\hello\ek-lm3s6965\ Log Port Log message port.
14 Board Support Packages 14.11 Standard Cortex-R4F Boards Please note that we are supporting many Cortex-R4 based boards. The boards listed here are included in the standard delivery and maintained within the shipped versions. SCIOPTA - Real-Time Kernel 14.11.1 Texas Instruments TMS570PSFC66-EVAL Board CPU Texas Instruments TMS570PSFC66 BOARD_SEL Makefile board selection number. xx To be used as parameter when calling the makefile from Eclipse or from a shell.
14 Board Support Packages 14.12 Standard MPC55xx Boards Please note that we are supporting many MPC55xx based boards. The boards listed here are included in the standard delivery and maintained within the shipped versions. CPU Freescale MPC5554 BOARD_SEL Makefile board selection number. 9 To be used as parameter when calling the makefile from Eclipse or from a shell.
14 Board Support Packages SCIOPTA - Real-Time Kernel 14.12.2 Phytec phyCORE-MPC5554 Board CPU Freescale MPC5554 BOARD_SEL Makefile board selection number. 9 To be used as parameter when calling the makefile from Eclipse or from a shell. (Example: gnu_make BOARD_SEL = 9) Makefile location for kernel example (hello): \sciopta\\exp\krn\arm\hello\phyCoreMPC5554\ Log Port Log message port.
14 Board Support Packages 14.12.3 Freescale MPC5567EVB Board Freescale MPC5567 BOARD_SEL Makefile board selection number. 12 To be used as parameter when calling the makefile from Eclipse or from a shell. (Example: gnu_make BOARD_SEL = 12) Makefile location for kernel example (hello): \sciopta\\exp\krn\arm\hello\mpc5567evb\ Log Port Log message port. xxx The getting started examples are sending some specific example log messages to a selected UART of the board.
14 Board Support Packages 14.13 Standard MPC5200 Boards Please note that we are supporting many MPC5200 based boards. The boards listed here are included in the standard delivery and maintained within the shipped versions. SCIOPTA - Real-Time Kernel Phytec phyCORE-MPC5200B Tiny Board CPU Freescale MPC5200B BOARD_SEL Makefile board selection number. 5 To be used as parameter when calling the makefile from Eclipse or from a shell.
14 Board Support Packages 14.13.1 Freescale Lite5200 Board Freescale MPC5200B BOARD_SEL Makefile board selection number. 2 To be used as parameter when calling the makefile from Eclipse or from a shell. (Example: gnu_make BOARD_SEL = 2) Makefile location for kernel example (hello): \sciopta\\exp\krn\arm\hello\lite5200\ Log Port Log message port. RS232 The getting started examples are sending some specific example log messages to a selected UART of the board.
14 Board Support Packages 14.14 Standard PPC400 Boards Please note that we are supporting many PPC400 based boards. The boards listed here are included in the standard delivery and maintained within the shipped versions. SCIOPTA - Real-Time Kernel 14.14.1 AMCC Yosemite 440EP Evaluation Board CPU AMCC 440EP BOARD_SEL Makefile board selection number. 8 To be used as parameter when calling the makefile from Eclipse or from a shell.
14 Board Support Packages 14.15 Standard ColdFire Boards Please note that we are supporting many ColdFire based boards. The boards listed here are included in the standard delivery and maintained within the shipped versions. CPU Freescale ColdFire MCF5272 BOARD_SEL Makefile board selection number. 0 To be used as parameter when calling the makefile from Eclipse or from a shell.
14 Board Support Packages SCIOPTA - Real-Time Kernel 14.15.2 Freescale M5282EVB Evaluation Board CPU Freescale ColdFire MCF5282 BOARD_SEL Makefile board selection number. 1 To be used as parameter when calling the makefile from Eclipse or from a shell. (Example: gnu_make BOARD_SEL = 1) Makefile location for kernel example (hello): \sciopta\\exp\krn\arm\hello\m5282evb\ Log Port Log message port.
14 Board Support Packages 14.15.3 Phytec phyCORE-MCF5485 Board Freescale ColdFire MCF5485 BOARD_SEL Makefile board selection number. 3 To be used as parameter when calling the makefile from Eclipse or from a shell. (Example: gnu_make BOARD_SEL = 3) Makefile location for kernel example (hello): \sciopta\\exp\krn\arm\hello\phyCore5485\ Log Port Log message port.
14 Board Support Packages SCIOPTA - Real-Time Kernel 14.15.4 COBRA5329 Board CPU Freescale ColdFire MCF5329 BOARD_SEL Makefile board selection number. xx To be used as parameter when calling the makefile from Eclipse or from a shell. (Example: gnu_make BOARD_SEL = xx) Makefile location for kernel example (hello): \sciopta\\exp\krn\arm\hello\cobra5329\ No makefile yet available (all project with iSYSTEM winIDEA) Log Port Log message port.
14 Board Support Packages 14.15.5 M52233DEMO Evaluation Board Freescale ColdFire MCF52233 BOARD_SEL Makefile board selection number. 5 To be used as parameter when calling the makefile from Eclipse or from a shell. (Example: gnu_make BOARD_SEL = 5) Makefile location for kernel example (hello): \sciopta\\exp\krn\arm\hello\M52233DEMO\ Log Port Log message port. COM The getting started examples are sending some specific example log messages to a selected UART of the board.
15 Building SCIOPTA Systems 15 Building SCIOPTA Systems 15.1 Introduction SCIOPTA - Real-Time Kernel In a new project you have first to determine the specification of the system. As you are designing a real-time system, speed requirements needs to be considered carefully including worst case scenarios. Defining function blocks, environment and interface modules will be another important part for system specification. Systems design includes defining the modules, processes and messages.
15 Building SCIOPTA Systems 15.2 Configuration The kernel of a SCIOPTA system needs to be configured before you can generated the whole system. The SCONF tool generates the C file sconf.c (system defines and startup) and the include files sciopta.cnf (not for ARM architecture) and sconf.h. 15.3 Include Files 15.3.1 Include Files Search Directories Please make sure that the environment variable SCIOPTA_HOME is defined as explained in chapter 2.4.6 “SCIOPTA_HOME Environment Variable” on page 2-4.
15 Building SCIOPTA Systems 15.3.4 Main Data Types types.h These types are introduced to allow portability between various SCIOPTA implementations. The main data types are defined in the file types.h. These types are not target processor dependent. SCIOPTA - Real-Time Kernel types.h 15.3.5 Processor independent data types. File location: \sciopta\\include\ossys\ Architecture Dependent Data Types types.
15 Building SCIOPTA Systems 15.4 Assembling the Kernel The SCIOPTA kernels for ARM, PowerPC and ColdFire architectures are provided in assembler source files and therefore compiler manufacturer specific. The kernels can be found in the library directory of the SCIOPTA delivery. 15.4.1 Kernels for ARM Architectures Architecture (): arm (see chapter 1.3.1 “Architectures” on page 1-3). sciopta.S sciopta.s79 sciopta_iar.s sciopta_ads.s Kernel source file for GNU GCC Kernel source file for IAR Ver.
15 Building SCIOPTA Systems 15.5 Assembling the Assembler Source Files Usually there are not many assembler source file in a project. Sometimes system files from the board support packages might be needed. SCIOPTA - Real-Time Kernel 15.5.1 ARM Architecture Assembler Source Files cortexm3_cstartup. C startup code for Cortex-M3. cortexm3_exception. Exception handler for Cortex-M3. cortexm3_vector. Vector table for Cortex-M3. cstartup. C startup code for ARM. dcc.
15 Building SCIOPTA Systems 15.5.4 ARM CPU Family Assembler Source Files Typical files for ARM architecture and specific CPU families. Interrupt wrapper. Interrupt wrapper including MMU support. Interrupt wrapper for serial interrupts. Interrupt wrapper for system interrupts. Interrupt wrapper for systick. Interrupt wrapper for eint0..3 for LPC2000. Interrupt wrapper for SOFTINT for LPC2000. Interrupt wrapper for spi0 and spi1 for LPC2000. Interrupt wrapper for timer0/1 for LPC2000. Memcopy routines.
15 Building SCIOPTA Systems 15.5.6 ColdFire CPU Family Assembler Source Files Typical files for ColdFire architecture and specific CPU families. vectors. cache. Vector table. Cache flush routines. SCIOPTA - Real-Time Kernel File extensions : S GNU GCC File location: \sciopta\\bsp\coldfire\\src\ s68 IAR File location: \sciopta\\bsp\coldfire\\src\iar\ Please Note: Not all files are needed for all CPU families.
15 Building SCIOPTA Systems 15.5.7 ARM Boards Assembler Source Files Typical files for ARM architecture and specific boards. resethook. led. Resethook early startup functions. LED access functions. s79 IAR Version 4.x File location: \sciopta\\bsp\arm\\\src\iar\ s IAR Version 5.
15 Building SCIOPTA Systems 15.6 Compiling the C/C++ Source Files 15.6.1 CPU Families C/C++ Source Files SCIOPTA - Real-Time Kernel Typical CPU family files: druid_uart.c simple_uart.c serial.c .c 15.6.2 Druid UART driver. Simple polling UART function for printf debugging or logging. Serial driver. CPU family specific device drivers. File location: \sciopta\\bsp\\\src\ Chip Driver C/C++ Source Files Typical chip and device files: .
15 Building SCIOPTA Systems 15.7 Linker Scripts 15.7.1 Introduction The linker script describes how the defined memory sections in the link input files are mapped into the output file which will be loaded in the target system. Therefore the linker script controls the memory layout in the output file. SCIOPTA uses the linker scripts to define and map SCIOPTA modules into the global memory map. 15.7.
15 Building SCIOPTA Systems 15.7.2.2 Module Sizes The sizes used by SCIOPTA of each module must be defined by the user in the linker script. This size determines the memory which will be used by SCIOPTA for message pools, PCBs and other system data structures. The name of the size is usually defined as follows: _size SCIOPTA - Real-Time Kernel The module name for the system module is system.
15 Building SCIOPTA Systems 15.7.2.3 Specific Module Values For each module four values are calculated in the linker script: Start address of module RAM _initsize Size of initialized RAM _size Complete size of the module _mod A structure which contains the above three addresses. The SCIOPTA configuration utility SCONF is using these definitions to pass the module addresses to the kernel. Example in the linker script: .module_init : { system_mod = .
15 Building SCIOPTA Systems 15.7.2.4 GCC Data Memory Map Defined by the user Calculated by the linker script system_start .text .data system_initsize .bss dynamic objects process control blocks stacks Size of static objects pools system_size System module (system_mod) module control block Used by the SCONF configuration utility free org+len org _start .text .data _initsize .
15 Building SCIOPTA Systems 15.7.3 Windriver Linker Scripts You can find examples of Windriver C/C++ Compiler Package linker scripts in the SCIOPTA examples and getting started projects. In these examples there is usually a main linker script which includes a second linker script. The main linker scripts are board dependent. Board specific linker script for Windriver.
15 Building SCIOPTA Systems 15.7.4 IAR Embedded Workbench Linker Scripts You can find examples of IAR Embedded Workbench linker scripts in the SCIOPTA examples and getting started projects. SCIOPTA - Real-Time Kernel .xcl .icf Board specific Linker script for IAR4. Board specific Linker script for IAR5. File location: \sciopta\\bsp\\\\include\ For IAR you need to define the free RAM of the modules in a separate file.
15 Building SCIOPTA Systems 15.7.5 ARM RealView Linker Scripts You can find examples of ARM RealView linker scripts in the SCIOPTA examples and getting started projects. .sct Board specific Linker script for ARM RealView. File location: \sciopta\\bsp\\\\include\ 15-16 SCIOPTA - Real-Time Kernel Manual Version 4.
15 Building SCIOPTA Systems 15.7.6 WIN32 Linker Script The linking process and memory mapping is fully controlled and defined by the Microsoft® Visual C++ IDE. 15.7.6.1 Module Data RAM SCIOPTA - Real-Time Kernel In SCIOPTA system running in a real target CPU the module RAM memory map is defined in the linker scripts. In the SCIOPTA SCSIM Simulator you need to declare the module RAM by a character array of the size of the module.
15 Building SCIOPTA Systems 15.8 GNU GCC Kernel Libraries For the SCIOPTA generic device driver (gdd) functions, the shell functions (sh) and the SCIOPTA utilities (util) some prebuilt libraries are included in the delivery The file name of the libraries have the following format: libgdd_xt.a libsh_xt.a libutil_xt.
15 Building SCIOPTA Systems 15.8.2 Building Kernel Libraries for GCC The example makefiles and project files are supposing to use libraries for the generic device driver (gdd) and utility (util) modules. As described above, there are some libraries delivered for specific compiler settings. We have included source files and makefiles which allows you to build the libraries yourself. If you want to change compiler switches or other system settings you need to modify the makefiles.
15 Building SCIOPTA Systems 15.9 Windriver Kernel Libraries For the SCIOPTA generic device driver (gdd) functions, the shell functions (sh) and the SCIOPTA utilities (util) some prebuilt libraries are included in the delivery. The file name of the libraries have the following format: libgdd_xt.a libsh_xt.a libutil_xt.a File location: \sciopta\\lib\\diab\ File location for Windriver PowerPC VLE code: \sciopta\\lib\ppc\diab_vle\ 15.9.
15 Building SCIOPTA Systems 15.9.2 Building Kernel Libraries for Windriver The example makefiles and project files are supposing to use libraries for the generic device driver (gdd) and utility (util) modules. As described above, there are some libraries delivered for specific compiler settings. We have included source files and makefiles which allows you to build the libraries yourself. If you want to change compiler switches or other system settings you need to modify the makefiles.
15 Building SCIOPTA Systems 15.10 IAR Kernel Libraries For the SCIOPTA generic device driver (gdd) functions, the shell functions (sh) and the SCIOPTA utilities (util) some prebuilt libraries are included in the delivery The file name of the ARM libraries have the following format: gdd_xtb.a sh_xtb.a util_xtb.
15 Building SCIOPTA Systems 15.10.2 Building Kernel Libraries for IAR The example makefiles and project files are supposing to use libraries for the generic device driver (gdd) and utility (util) modules. As described above, there are some libraries delivered for specific compiler settings. We have included source files and makefiles which allows you to build the libraries yourself. If you want to change compiler switches or other system settings you need to modify the makefiles.
15 Building SCIOPTA Systems 15.11 ARM RealView Kernel Libraries For the SCIOPTA generic device driver (gdd) functions, the shell functions (sh) and the SCIOPTA utilities (util) some prebuilt libraries are included in the delivery The file name of the ARM libraries have the following format: gdd_xt.l sh_xt.l util_xt.l File location ARM7/9/XScale: \sciopta\\lib\arm\rv40\ File location for ARMv7M (Cortex-M3): \sciopta\\lib\arm\rv40_cm3\ 15.11.
15 Building SCIOPTA Systems 15.11.2 Building Kernel Libraries for ARM RealView The example makefiles and project files are supposing to use libraries for the generic device driver (gdd) and utility (util) modules. As described above, there are some libraries delivered for specific compiler settings. We have included source files and makefiles which allows you to build the libraries yourself. If you want to change compiler switches or other system settings you need to modify the makefiles.
15 Building SCIOPTA Systems 15.12 SCIOPTA SCSIM Simulator Kernel Library For the SCIOPTA SCSIM Simulator the whole kernel including the generic device driver system, the utilities and the shell are placed in the library scwin32.lib. The library scwin32.lib contains the following modules: The library for the Microsoft® Visual C++ 2005 Version 8.0 environment can be found at: File location: \sciopta\\lib\scsim\win32\vs80\ The scwin32.
15 Building SCIOPTA Systems 15.13 Linking the System Now you are ready to link the generated object files from the assembler and C/C++ source files. SCIOPTA - Real-Time Kernel Make sure that you include the correct gdd and util libraries for your project and the correct linker script for you target environment. SCIOPTA - Real-Time Kernel User’s Manual Manual Version 4.
15 Building SCIOPTA Systems 15.14 Integrated Development Environments 15.14.1 Eclipse and GNU GCC Please consult http://www.eclipse.org/ for more information about Eclipse. You can download Eclipse IDE for C/ C++ Developers from the download page of this site. Please consult http://www.eclipse.org/cdt for more information about Eclipse CDT (C/C++ Development Tools) project. For all delivered SCIOPTA examples for the ARM, PowerPC and ColdFire architectures there are Makefiles included.
15 Building SCIOPTA Systems 15.14.1.3Eclipse Project Files We are using “makefile projects” (contrary to “managed make projects”) in Eclipse. For all delivered SCIOPTA examples for the ARM, PowerPC and ColdFire architectures there are makefiles included. Eclipse is easy to configure for working with external makefiles. You will find typical makefiles for SCIOPTA in the example deliveries.
15 Building SCIOPTA Systems 15.14.2 iSYSTEM© winIDEA The program winIDEA is the IDE for all iSYSTEMS emulators. It is the a Integrated Development Environment, which contains all the necessary tools in one shell. winIDEA consists of a project manager, a 3rd party tools integrator, a multi-file C source editor and a high-level source debugger. 15.14.2.1Tools The following tools are needed to build a SCIOPT project with iSYSTEM and GNU GCC.
15 Building SCIOPTA Systems 15.14.2.3winIDEA Project Files You will find typical winIDEA project files for SCIOPTA in the example deliveries. .xjrf .xqrf iSYSTEM winIDEA project file iSYSTEM winIDEA project file SCIOPTA - Real-Time Kernel File location: \sciopta\\exp\krn\\\ 15.14.2.4winIDEA Project Settings Selecting Projects > Settings... from the menu (or press Alt+F7) opens the Project Settings window.
15 Building SCIOPTA Systems 15.14.3 IAR Embedded Workbench IAR Embedded Workbench is a set of development tools for building and debugging embedded system applications using assembler, C and C++. It provides a completely integrated development environment that includes a project manager, editor, build tools and the C-SPY debugger. 15.14.3.1Tools The following tools re needed to build a SCIOPT project with IAR Embedded Workbench.
15 Building SCIOPTA Systems 15.14.3.3IAR EW Project Files You will find typical IAR EW project files for SCIOPTA in the example deliveries. .ewd .ewp .eww IAR EW project file IAR EW project file IAR EW project file SCIOPTA - Real-Time Kernel The file_name is often the board name . File location: \sciopta\\exp\krn\\\ 15.14.3.4IAR EW Project Settings Selecting Projects > Options...
15 Building SCIOPTA Systems 15.14.4 Microsoft® Visual C++ For SCIOPTA SCSIM Simulator we are using the Microsoft® Visual C++ environment. Visual C++ 2005 (known also as Visual C++ 8.0), which included MFC 8.0, was released in November 2005. This version supports .NET 2.0 and dropped managed C++ for C++/CLI. It also introduced OpenMP. With Visual C++ 2005, Microsoft also introduced Team Foundation Server. Visual C++ 8.0 has problems compiling MFC AppWizard projects that were created using Visual Studio 6.
16 SCONF Kernel Configuration 16 SCONF Kernel Configuration 16.1 Introduction SCIOPTA - Real-Time Kernel The kernel of a SCIOPTA system needs to be configured before you can generated the whole system. In the SCIOPTA configuration utility SCONF (sconf.exe) you will define the parameters for SCIOPTA systems such as name of systems, static modules, processes and pools etc. The SCONF program is a graphical tool which will save all settings in an external XML file.
16 SCONF Kernel Configuration 16.3 Preference File sc_config.cfg The SCIOPTA Configuration Utility SCONF is storing some preference setting in the file sc_config.cfg. Actually there are only three settings which are stored and maintained in this file: Project name of the last saved project. 2. Location of the last saved project file. 3. Warning state (enabled/disabled). The sc_config.cfg file is located in the home directory of the user. The location cannot be modified.
16 SCONF Kernel Configuration 16.5 SCONF Windows SCIOPTA - Real-Time Kernel To configure a SCIOPTA system with SCONF you will work mainly in two windows. Browser Window Parameter Window Figure 16-2: SCONF Windows 16.5.1 Parameter Window For every level in the browser window (process level, module level, system level and project level) the layout of the parameter window change and you can enter the configuration parameter for the specific item of that level (e.g. parameters for a specific process).
16 SCONF Kernel Configuration 16.5.2 Browser Window The browser window allows you to browse through a whole SCIOPTA project and select specific items to configure. System Level Module Level Process Level Process Level Module Level System Level Project Level Figure 16-3: Browser Windows The browser shows four configuration levels and every level can expand into a next lower level. To activate a level you just need to point and click on it.
16 SCONF Kernel Configuration 16.6 Creating a New Project To create a new project select the New button in the tool bar: SCIOPTA - Real-Time Kernel New Project Button You also can create a new project from the file menu or by the Ctrl+N keystroke: 16.7 Configure the Project You can define and modify the project name. Click on the project name on the right side of the SCIOPTA logo and enter the project name in the parameter window.
16 SCONF Kernel Configuration 16.8 Creating Systems From the project level you can create new systems. Move the mouse pointer over the project and right-click the mouse. The same selection can be made by selecting the Project menu from the menu bar. SCONF asks you to enter a directory where the generated files will be stored: 16-6 SCIOPTA - Real-Time Kernel Manual Version 4.
16 SCONF Kernel Configuration SCIOPTA - Real-Time Kernel A new system for your selected CPU with the default name New System 1, the system module (module id 0) with the same name as the new target and a init process will be created. You can create up to 128 systems inside a SCIOPTA project. The targets do not need to be of the same processor (CPU) type. You can mix any types or use the same types to configure a distributed system within the same SCIOPTA project.
16 SCONF Kernel Configuration 16.9 Configuring Target Systems After selecting a system with your mouse, the corresponding parameter window on the right side will show the parameters for the selected target CPU system. 16.9.1 16-8 General System Configuration Tab SCIOPTA - Real-Time Kernel Manual Version 4.
16 SCONF Kernel Configuration 16.9.1.1 General Tab Parameters System Name Name of the target system. SCIOPTA - Real-Time Kernel Enter the name of your system. Please note that the system module (module 0) in this system will get the same name. CPU Type CPU family for the selected architecture. Compiler C/C++ Compiler selection. For PowerPC the “GNU” selection is also valid for Windriver. Maximum Buffer Sizes Maximum number of message buffer sizes.
16 SCONF Kernel Configuration Kernel Stack Size Size of the global kernel stack. Currently not used. Entered values are not considered. Interrupt Stack Size Size of the global interrupt stack. For all other architectures currently not used. Entered values are not considered. Max interrupt nesting Maximum nesting level. 0 Only used in ARM architecture. No nesting Maximum nesting level of interrupt processes in the system. Inter-Module Defines if messages between modules are copied or not.
16 SCONF Kernel Configuration 16.9.2 Timer and Interrupt Configuration Tab SCIOPTA - Real-Time Kernel This tab is only available for PowerPC. 16.9.2.1 Timer and Interrupt Tab Parameters Source Source for the SCIOPTA system tick. The SCIOPTA real-time kernel uses an internal tick timer to manage and control all timing tasks. Here you can select which timer you want to use to generate the tick. Decrementer The Decrementer Timer of the CPU is used as system tick.
16 SCONF Kernel Configuration 16.9.3 Hooks Configuration Tab You can enable the hooks separately by selecting the corresponding check box or all hooks belonging to a group all together. In the SCIOPTA SCSIM Simulator (win32) only whole hook groups can be enabled. Please consult chapter 12.2 “Hooks” on page 12-1 for more information about SCIOPTA hooks. For ARM and PowerPC you can select an MMU checkbox. You must select this checkbox if you want to enable the MMU functions in the kernel.
16 SCONF Kernel Configuration Debug Configuration Tab SCIOPTA - Real-Time Kernel 16.9.4 SCIOPTA - Real-Time Kernel User’s Manual Manual Version 4.
16 SCONF Kernel Configuration 16.9.4.1 Debug Tab Parameter Message Check Enables the message check functions in the kernel. Some test functions on messages will be included in the kernel. Enables the stack check functions. This checkbox is only available for ARM. Process Parameter Check Enables process parameter checks. Parameter check of the process system calls will be included in the kernel. Message Parameter Check Enables message parameter checks.
16 SCONF Kernel Configuration 16.10 Creating Modules SCIOPTA - Real-Time Kernel From the system level you can create new modules. Move the mouse pointer over the system and right-click the mouse. A pop-up menu appears and allows you to create a new module. The same selection can be made by selecting the Target System from the menu bar. A new module for your selected target with a default name and an init process in the module will be created. You can create up to 127 modules.
16 SCONF Kernel Configuration 16.11 Configuring Modules After selecting a module with your mouse, the corresponding parameter window on the right side will show the module parameters. Load Module Module is a load module. Check this box if the module will be loaded at run-time into the system. This check box is not available for the system module. Module Name Name of the module. Enter the name of the module.
16 SCONF Kernel Configuration Maximum Pools Maximum number of message pools. Enter the maximum number of pools in the module. The kernel will not allow to create more pools inside the module than stated here. The maximum value is 128. Priority Module priority. SCIOPTA - Real-Time Kernel Enter the priority of the module. Each module has a priority which can range between 0 (highest) to 31 (lowest) priority. See also chapter 4.3 “Module Priority” on page 4-1.
16 SCONF Kernel Configuration 16.12 Creating Processes and Pools From the module level you can create new processes and pools. Move the mouse pointer over the module and rightclick the mouse. Please Note The Process Daemon (ProcDaemon) and Kernel Daemon (KernelDaemon) can only be created in the system module. The same selection can be made by selecting the Module menu from the menu bar. 16-18 SCIOPTA - Real-Time Kernel Manual Version 4.
16 SCONF Kernel Configuration 16.13 Configuring the Init Process After selecting the init process with your mouse the parameter window on the right side will show the configuration parameters for the init process. There is always one init process per module and this process has the highest priority. Only the stack size of the init process can be configured. SCIOPTA - Real-Time Kernel Please consult chapter 5.9 “Init Processes” on page 5-8 for more information about init processes. 16.13.
16 SCONF Kernel Configuration 16.14 Interrupt Process Configuration After selecting an interrupt process with your mouse the parameter window on the right side will show the configuration parameters for the interrupt process. Please consult chapter 5.7 “Interrupt Processes” on page 5-5 for more information about interrupt processes. 16.14.1 Parameter for All Architectures Interrupt Process Name Interrupt process name. Interrupt Process Function Interrupt process function entry.
16 SCONF Kernel Configuration Stack Size Interrupt process stack size. Enter a big enough stack size of the created interrupt process in bytes. SCIOPTA - Real-Time Kernel In the ARM architecture, a value can only be entered when the “unified IRQ stack” checkbox in the target system configuration window is not selected. Vector Interrupt vector. Enter the interrupt vector connected to the interrupt process. 16.14.2 Additional Parameters for PowerPC Processor Mode Selects interrupt processor mode.
16 SCONF Kernel Configuration 16.14.3 Additional Parameters for ColdFire Selects if a Floating Point Unit exists and will be used. no FPU FPU No FPU in the system System includes an FPU Applying the Interrupt Process Configuration Click on the Apply button to accept the interrupt process configuration settings. 16-22 SCIOPTA - Real-Time Kernel Manual Version 4.
16 SCONF Kernel Configuration 16.15 Timer Process Configuration After selecting a timer process with your mouse the parameter window on the right side will show the configuration parameters for the timer process. SCIOPTA - Real-Time Kernel Please consult chapter 5.8 “Timer Processes” on page 5-7 for more information about timer processes. Timer Processes 16.15.1 Parameter Timer Process Name Timer process name. Timer Process Function Timer process function entry.
16 SCONF Kernel Configuration Stack Size Timer process stack size. Enter a big enough stack size of the created timer process in bytes. Period Timer process interval time. Period of time between calls to the timer process in ticks or in milliseconds. Initial Delay Initial shift delay time. Initial delay before the first time call to the timer process in ticks or milliseconds. To avoid tick overload due to timer processes having the same period. Process State Starting state of the timer process.
16 SCONF Kernel Configuration 16.16 Prioritized Process Configuration After selecting a prioritized process with your mouse the parameter window on the right side will show the configuration parameters for the prioritized process. SCIOPTA - Real-Time Kernel Please consult chapter 5.6 “Prioritized Processes” on page 5-3 for more information about timer processes. Prioritized Processes 16.16.1 Parameter for All Architectures Priority Process Name Process name.
16 SCONF Kernel Configuration Stack Size Process stack size. Enter a big enough stack size of the created prioritized process in bytes. Priority Priority of the process. Process State Starting state of the timer process. started The process will be on READY state. It is ready to run and will be swapped-in if it has the highest priority of all READY processes. The process is stopped after creation. Use the sc_procStart system call to start the process.
16 SCONF Kernel Configuration SCIOPTA - Real-Time Kernel 16.16.3 Additional Parameters for ColdFire FPU usage Selects if a Floating Point Unit exists and will be used. no FPU FPU No FPU in the system System includes an FPU Applying the Priority Process Configuration Click on the Apply button to accept the priority process configuration settings. SCIOPTA - Real-Time Kernel User’s Manual Manual Version 4.
16 SCONF Kernel Configuration 16.17 Pool Configuration After selecting a pool with your mouse the parameter window on the right side will show the configuration parameters for the pool. Please consult chapter 7 “Pools” on page 7-1 for more information about timer processes. 16.17.1 Parameter Pool Name Name of the message pool. Pool Size Size of the message pool. See chapter 7.2 “Message Pool size” on page 7-1. 16-28 SCIOPTA - Real-Time Kernel Manual Version 4.
16 SCONF Kernel Configuration Buffer Sizes Number of buffer sizes. 4, 8 or 16 Define the different buffer sizes for your selection. See chapter 7.3 “Pool Message Buffer Memory Manager” on page 7-2. SCIOPTA - Real-Time Kernel Applying the Pool Configuration Click on the Apply button to accept the pool configuration settings. SCIOPTA - Real-Time Kernel User’s Manual Manual Version 4.
16 SCONF Kernel Configuration 16.18 Build The SCONF will generate the following files which need to be included into your SCIOPTA project. This is the configured part of the kernel which will be included when the SCIOPTA kernel (sciopta.s) is assembled. For the ARM architecture this file is not needed and therefor not generated. sconf.h This is a header file which contains some configuration settings. This file will be included by the kernel during assembling.
16 SCONF Kernel Configuration 16.18.2 Change Build Directory SCIOPTA - Real-Time Kernel When you are creating a new system, SCONF ask you to give the directory where the three generated files will be stored. You can modify this build directory for each system individually by clicking to the system which you want to build and right click the mouse. Select the last item in the menu for changing the build directory.
16 SCONF Kernel Configuration 16.18.3 Build All If you have more than one system in your project, you can build all systems at once by clicking on the Build All button. Select the Build All button from the button bar to generate the set of three files for each system. The files sciopta.cnf (not for ARM), sconf.h and sconf.c will be generated for every target into the defined build directories of each target which exists in the project. SCONF will prompt for generating the files for each system.
16 SCONF Kernel Configuration 16.19 Command Line Version 16.19.1 Introduction SCIOPTA - Real-Time Kernel The SCONF configuration utility can also be used from a command line. This is useful if you want to modify or create the XML configuration file manually or if the XML configuration file will be generated by a tool automatically and you want to integrate the configuration process in a makefile.
16 SCONF Kernel Configuration SCIOPTA - Real-Time Kernel 16-34 SCIOPTA - Real-Time Kernel Manual Version 4.
SCIOPTA - Real-Time Kernel 17 Manual Versions 17 Manual Versions 17.1 Manual Version 4.1 • Chapter 1 The SCIOPTA System, Rewritten. • Chapter 3.2 Example Description, Class Diagram replaced by Process-Message Diagram. • Chapter 5.12.1 Unified Interrupt Stack for ARM, chapter added. • Chapter 5.12.2 Interrupt Nesting for ARM Architecture. • Figure 16.2 SCONF Window, picture update. • Chapter 16.9.
17 Manual Versions Chapter 6, Application Programming Interface, • Chapter 6.3.6 sc_msgRx and chapter 6.3.1 sc_msgAlloc, parameter tmo, value modified. • Chapter 6.4.1 sc_poolCreate, parameter size, pool calculation value n better defined. Parameter name, “Valid characters” modified to “Recommended characters”. • Chapter 6.4.3 sc_poolIdGet, return value “poolID of default pool” added. • Chapter 6.5.
17 Manual Versions 17.6 • Chapter 2.4 Installation Procedure Windows Hosts, now modified for customer specific deliveries. • Chapter 2.4.5 SCIOPTA_HOME Environment Variable, UNIX Shell versions removed. 17.7 SCIOPTA - Real-Time Kernel Manual Version 2.1 • Manual Version 2.0 The following manuals have been combinded in this new SCIOPTA ARM - Kernel, User’s Guide: • SCIOPTA - Kernel, User’s Guide Version 1.8 • SCIOPTA - Kernel, Reference Manual Version 1.7 • SCIOPTA - ARM Target Manual 17.
17 Manual Versions • Manual now splitted into a User’s Guide and Reference Manual. 17.8.5 Manual Version 1.4 Chapter 4.7.3.2 Example, OS_INT_PROCESS changed into correct SC_INT_PROCESS. • Chapter 2.3.4.4 Init Process, rewritten. • Chapter 4.5 Processes, former chapters 4.5.6 Idle Process and 4.5.7 Supervisor Process removed. • Chapter 4.5.1 Introduction, last paragraph about supervisor processes added. • Chapter 4.5.5 Init Process, rewritten. • Chapter 6.
SCIOPTA - Real-Time Kernel 17 Manual Versions • Chapter 4.10.4 Error Hook Declaration Syntax, Parameter user : user != 0 • System call sc_procRegisterDaemon changed to sc_DaemonRegister and sc_procUnregisterDaemon changed to sc_procDaemonUnregister. • System call sc_miscErrorHookRegister, return values better specified. • System call sc_moduleCreate, parameter size value “code” added in Formula. • System call sc_moduleNameGet, return value NULL added.
17 Manual Versions 17.9 Former SCIOPTA - Kernel, Reference Manual Versions 17.9.1 Manual Version 1.7 Back front page, Litronic AG became SCIOPTA Systems AG. • Chapter 3.24 sc_msgHookRegister, text: There can be one module message hook per module replaced by: There can be one module message hook of each type (transmitt/receive) per module. • Chapter 3.
SCIOPTA - Real-Time Kernel 17 Manual Versions • Chapter 4.10.4 Error Hook Declaration Syntax, user !=0 user error. • Chapter 4.9 SCIOPTA Daemons, moved from chapter 2.9 and rewritten. • Chapter 6.41 sc_procDaemonRegister, last paragraph of the description rewritten. • Chapters 6.45 sc_procIntCreate, 6.46 sc_procKill, 6.51 sc_procPrioCreate, 6.60 sc_procTimCreate and 6.62 sc_procUsrIntCreate, information about sc_kerneld are given. • Chapter 4.10.5 Example, added. 17.9.5 Manual Version 1.
17 Manual Versions System call sc_procHookRegister, return value better specified. • System call sc_procIdGet, last paragraph in Description added. • System calls sc_procVarDel, sc_procVarGet and procVarSet, return value !=0 introduced. • Chapter 7.3 Function Codes, errors 0x38 to 0x3d added. • System call sc_procUnobserve added. • Chapters 2.5.2 System Module and 4.3 Modules, the following sentence was removed: The system module runs always on supervisor level and has all access rights.
SCIOPTA - Real-Time Kernel 17 Manual Versions • Chapter 5.13.1.1 Memory Regions, last paragraph added. • Chapter 5.13.1.2 Module Sizes, name is now _size (was _free before). • Chapter 5.13.3 IAR Systems Embedded Workbench Linker Script, added. • Chapter 5.14 Data Memory Map, redesigned and now one memory map for all environments. • Chapter 5.14.4 IAR Systems Embedded Workbench©, added. • Chapter 6 Board Support Packages, file lists modified for SCIOPTA ARM version 1.7.
17 Manual Versions • New process SCP_proxy introduced in Getting Started - DHCP Client Example. • IPS libraries now in three verisons (standard, small and full). 17.10.5 Manual Version 1.7.0 All union sc_msg * changed to sc_msg_t to support SCIOPTA 16 Bit systems (NEAR pointer). • All union sc_msg ** changed to sc_msgptr_t to support SCIOPTA 16 Bit systems (NEAR pointer). • All sdd_obj_t * changed to sdd_obj_t NEARPTR to support SCIOPTA 16 Bit systems.
18 Index 18 Index Symbols SCIOPTA - Real-Time Kernel _initsize .......................................................................................................................................................... 15-12 _mod .................................................................................................................................................... 15-12, 5-13 _size ...............................................................................................................
18 Index C D Daemon ............................................................................................................................................................... 5-9 Debug Configuration Tab ............................................................................................................................... 16-13 Debugger Board Setup Files ...........................................................................................................................
18 Index DRUID, User’s and Reference Manual ............................................................................................................. 2-1 Dynamic Module Creation ................................................................................................................................. 4-3 Dynamic Pool Creation ...................................................................................................................................... 7-3 Dynamic Process ..................
18 Index Global Message Number Defines File ................................................................................................................ 6-7 Global Variables ............................................................................................................................................... 13-2 GNU GCC Kernel Libraries ........................................................................................................................... 15-18 GNU Tool Chain ..............
18 Index Kernel, User’s Manual ....................................................................................................................................... 2-1 SCIOPTA - Real-Time Kernel L Lauterbach TRACE32 ....................................................................................................................................... 3-2 Lauterbach Trace32 ...................................................................................................................................
18 Index N New Button ....................................................................................................................................................... 16-5 P Parameter Window ........................................................................................................................................... 16-3 Password .............................................................................................................................................................
SCIOPTA - Real-Time Kernel 18 Index PowerPC Signal Processing Engine ............................................................................................................... 16-21 ppc ...................................................................................................................................................................... 1-3 ppc4xx .............................................................................................................................................
18 Index 18-8 SCIOPTA - Real-Time Kernel Manual Version 4.1 User’s Manual SCIOPTA - Real-Time Kernel sc_msgAddrGet ................................................................................................................................................ 6-10 sc_msgAlloc ..................................................................................................................................................... 6-10 sc_msgAllocClr .............................................................
SCIOPTA - Real-Time Kernel 18 Index sc_sleep .............................................................................................................................................................. 9-2 sc_tick ................................................................................................................................................................ 9-2 sc_tickGet ......................................................................................................................
18 Index T Target Level ........................................................................................................................................... 16-3, 16-4 The SCIOPTA System ........................................................................................................................................ 1-2 Tick in us ........................................................................................................................................................
18 Index SCIOPTA - Real-Time Kernel USB Device, User’s and Reference Manual ...................................................................................................... 2-1 USB Host, User’s and Reference Manual .......................................................................................................... 2-1 User .......................................................................................................................................
18 Index SCIOPTA - Real-Time Kernel 18-12 SCIOPTA - Real-Time Kernel Manual Version 4.