You are on page 1of 45

LOGO

H iu Hnh C/OS
GVBM: Nguyn Ha Hng
SVTH: Bi Khoa Nam - Trn Quc i

Ti liu tham kho


MicroC/OS-II: The Real-Time Kernel,
2ndEdition, by Jean J. Labrosse

http://www.micrium.com

Ni Dung
1
3

Gii thiu h iu hnh C/OS

ng dng C/OS

c im c bn ca C/OS

Thnh phn c bn C/OS

Ni Dung
1
3

Gii thiu h iu hnh C/OS

ng dng C/OS

c im c bn ca C/OS

Thnh phn c bn C/OS

Gii thiu h iu hnh C/OS

Micro-Controller
Operating
System

Gii thiu h iu hnh C/OS


c xy dng bi Jean J. Labrosse v c cng
b m ngun ln u tin nm 1992.
Hin nay, C/OS c pht trin v thng mi
ha bi Micrium.

Gii thiu h iu hnh C/OS


Memory Manager
Status Checking
CPU Load
Checking
Safety Critical
Mutexes
Semaphore
Timer
Event Flag
250 Task
MMU & MPU

C/OS
C/OS II
v.2.0

C/OS II
v.2.52

C/OS II
v.2.68

C/OS III

Lch s
pht trin

RR Scheduling
Infinite # of
Task &
Services

Ni Dung
1
3

Gii thiu h iu hnh C/OS

ng dng C/OS

c im c bn ca C/OS

Thnh phn c bn C/OS

ng dng C/OS

Y T
Medical FDA 510(k)
cho Class III ca cc
thit b y t

Cng Nghip
Chun SIL3/SIL4 IEC,
v IEC 61058 cho cc
h thng vn ti v ht
nhn.
iu khin ng c
Robot cng nghip
My ATM

www.themegallery.com

Tiu Dng & Vin Thng


Mobile Phones,
PDAs, MIDs
Cc thit b mng:
modem,router

Nhng h thng khc

Mt s h thng quan trng c Micrium


chng nhn:
Medical FDA 510(k) cho Class III ca cc thit b y t.
Chun SIL3/SIL4 IEC, v IEC 61058 cho cc h
thng vn ti v ht nhn.
Cc h thng in t trong hng khng RTCA DO178B v EUROCAE ED-12B.

Mt s kin trc c h tr bi C/OS


Cng ty

Kin trc

Altera

Nios II, Cortex-M1

ARM

ARM7, ARM9, ARM11

Fujitsu

FR 50

Intel

80x86

Microchip

PIC24, dsPIC33, PIC32 (MIPS)

MIPS

R3000,R4000

Renesas

H8, M16C, M32C, R32C, RL78,


SH, 78Kx, V850

Xilinx

MicroBlaze, PowerPC

Ni Dung
1
3

Gii thiu h iu hnh C/OS

ng dng C/OS

c im c bn ca C/OS

Thnh phn c bn C/OS

c im c bn ca C/OS
Source Code

Deterministic

Portable

Task Stack

Romable

Services

Scalable

Interrupt Management

Preemtive
Multitasking

c im c bn ca C/OS
Source Code

Deterministic

Portable

Task Stack

Romable

Services

Scalable

Interrupt Management

Preemtive
Multitasking

Source Code
Ngn gn, trong sng

Source
Code

nn m cao
T chc cht ch
Ch thch r rng
Da trn chun MISRA-C

c im c bn ca C/OS
Source Code

Deterministic

Portable

Task Stack

Romable

Services

Scalable

Interrupt Management

Preemtive
Multitasking

Portable
H tr b x l 8-,16-,32-,64-bit
Vn hnh trn nhiu nn tng CPU
H tr ngn ng Assembly
High portable ANSI C
D dng nng cp

Portable

c im c bn ca C/OS
Source Code

Deterministic

Portable

Task Stack

Romable

Services

Scalable

Interrupt Management

Preemtive
Multitasking

Romable
C th nhng
C/OS
vo mt phn
h thng.

C/OS
c thit k cho
ng dng nhng.

c im c bn ca C/OS
Source Code

Deterministic

Portable

Task Stack

Romable

Services

Scalable

Interrupt Management

Preemtive
Multitasking

Scalable
Ch s dng nhng
dch v cn thit.
Tit kim dung lng ng k
RAM & ROM.
Khai bo s ti nguyn cn
thit cho ng dng vi #define.

Dung lng b nh

ti thiu 5 KByte

c im c bn ca C/OS
Source Code

Deterministic

Portable

Task Stack

Romable

Services

Scalable

Interrupt Management

Preemtive
Multitasking

Preemtive

ISR
Task Y
Task X

c im c bn ca C/OS
Source Code

Deterministic

Portable

Task Stack

Romable

Services

Scalable

Interrupt Management

Preemtive
Multitasking

Multitasking
Qun l ti

c im c bn ca C/OS
Source Code

Deterministic

Portable

Task Stack

Romable

Services

Scalable

Interrupt Management

Preemtive
Multitasking

Deterministic

c im c bn ca C/OS
Source Code

Deterministic

Portable

Task Stack

Romable

Services

Scalable

Interrupt Management

Preemtive

Robust & Reliable

Multitasking

Task Stack

c im c bn ca C/OS
Source Code

Deterministic

Portable

Task Stack

Romable

Services

Scalable

Interrupt Management

Preemtive
Multitasking

Services

c im c bn ca C/OS
Source Code

Deterministic

Portable

Task Stack

Romable

Services

Scalable

Interrupt Management

Preemtive
Multitasking

Interupt Management
Task c

250 level

ISR
Task Y
Task X

Ni Dung
1
3

Gii thiu h iu hnh C/OS

ng dng C/OS

c im c bn ca C/OS

Thnh phn c bn C/OS

Thnh phn c bn C/OS


Semaphore Management
Mutual Exclusion Management
Event Flag Management
Message Mailbox Management
Message Queue Management

Nhn C/OS
Application

C/OS II
(Processor Independent
Code)

C/OS II Configuration
(Application Specific)

C/OS-II port (Processor Specific Code)


Hardware

Cu trc chng trnh

void main (void)


{
OSInit();
/* Initialize uC/OS-II*/
.
.
Create at least 1 task using either
OSTaskCreate() or OSTaskCreateExt();
.
.
OSStart();
/*Start multitasking!
OSStart() will not return*/
}

Hm c gi u tin.
Khi to cc bin & cu
trc d liu ca C/OS.
To IDE Task & Static Task

Task
OSTCBList

[0]
[1]
OSTCBPtr

OSTCBNext
OSTCBPrev

OSTCBNext
OSTCBPrev

STaskState

STaskState

OS_TCB

[OS_LOWEST_PRIO -1]
[OS_LOWEST_PRIO]

OS_TCB

st
Li
CB
ST
O

OSTCBPtr

0
Task Stask

Task Stask

RAM

Trng thi ca Task

Cc danh sch
MAX_OS_EVENT
OSEvent
FreeList

OS_EVENT

MAX_OS_QS
OSQFree
List
OS_Q

MAX_OS_MEM
OSMem
FreeList

OS_MEM

LOGO

Cm n thy v cc b
ch lng nghe!

You might also like