1 / 25

RTOS Kernel

RTOS Programming Tools: MicroC/OS-II and VxWorks Lesson-1: Basic RTOS Functions and Example of MicroC/OS-II (MUCOS).

Download Presentation

RTOS Kernel

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. RTOS Programming Tools: MicroC/OS-II and VxWorks Lesson-1: Basic RTOS Functions and Example of MicroC/OS-II (MUCOS)

  2. RTOS kernel supports real-time programming as it provides for the preemption points at kernel, controlled dynamic priority changes, and other features to meet hard and soft real time constraints. RTOS Kernel

  3. 1. Basic Functions in RTOS Kernel

  4. RTOS Kernel Functions Scheduler Service and System clock Functions Timing and Delay Functions Memory Functions IPC Functions Task-State Switching Functions

  5. ... RTOS Kernel Functions ISR Handling Functions Device Drivers Communication APIs for Network Network Protocol Stack Functions Error Handling Functions

  6. IPC Functions • Signal • Semaphore • Mailbox • Queue • Pipe

  7. Memory Functions • Create • Query • Get • Put

  8. 2. Popular RTOSs

  9. RTOSs • COS-II • VxWorks • QNX • RTLinux

  10. RTOSs for Mobile Devices • Windows CE • Symbian OS • Palm OS

  11. 3. C/OS-II (MUCOS) Basic Functions

  12. - Jean J. Labrosse designed it in 1992 - C/OS-II name derives from Micro-Controller Operating System - Also known as MUCOS, UCOS, .. Jean J. Labrosse

  13. Characteristics Preemptive RTOS Multitasking Deterministic Portable as ROM image Scalable Different Platforms support Source Code Availability

  14. Basic Feature • Scalable OS – only needed OS functions become part of the application codes • Configuration file includes the user definitions for the functions needed • Multitasking preemptive scheduler

  15. Code Language ‘C’ and CPU Specific Codes in Assembly

  16. Source Files • Master Header file, which has the ‘#include’s and Processor dependent source files and ucos.ii.h and ucos.ii.c files • os_cfg.h  for Kernel building configuration file and • os_cpu.h a header file for preprocessor definitions

  17. ... Source Files • os_tick.c  timer related codes file • os_cpu_c. c  preprocessor C Codes • os_cpu_a.s12  An example of assembly codes file for 68HC12 • os_mem.c for memory functions • os_sem.c, os_mbox.c and os_q.c for semaphores, mailbox and queues

  18. 4. MUCOS Naming Basics • OS or OS_ prefix denotes that the function or variable is a MUCOS operating system function or variable • For examples, OSTaskCreate ( ) - a MUCOS function that creates a task,

  19. 5. Macros • OS_NO_ERR is a MUCOS macro that returns true in case no error is reported from a function • OS_MAX_TASKS is user definable constant for specifying maximum number of tasks in user application

  20. 6. MUCOS Basic Functions • System Level – OS initiate, start, system timer set, ISR enter and exit • Task Service Functions – create, run, suspend, resume, .. • Task delay • Memory allocation, partitioning, …

  21. IPCs – Semaphore, Queue and Mailbox • Same Semaphore function usable as event flag, resource key and counting semaphore • Mailbox one message pointer per mailbox • Queue permit array of message-pointers

  22. Summary

  23. We learnt • RTOSs basic functions are OS initiate and start, scheduling, error handling, system clock and service, time delay and task, memory and IPC management functions.

  24. We learnt (ii) MUCOS basic features and functions of MUCOS.

  25. End of Lesson-1 on Basic RTOS Functions and Example of MicroC/OS-II (MUCOS)

More Related