找回密码
 注册
搜索
查看: 1510|回复: 4

[综合资料] FreeRTOS User Manual

[复制链接]
发表于 2009-5-16 10:38:47 | 显示全部楼层 |阅读模式
FreeRTOS 的 User Manual

Table of Contents
Section 1: Synopsis............................................................................................................. 5
Multi tasking ................................................................................................................... 5
Features.......................................................................................................................... 5
Design Philosophy .......................................................................................................... 5
Section 2: RTOS Fundamentals.......................................................................................... 6
Multitasking .................................................................................................................... 6
Multitasking Vs Concurrency......................................................................................... 6
Scheduling...................................................................................................................... 7
Context Switching........................................................................................................... 8
Real Time Applications .................................................................................................. 9
Real Time Scheduling................................................................................................... 11
Section 3: RTOS Implementation..................................................................................... 13
Detailed Description ..................................................................................................... 13
C Development Tools .................................................................................................... 13
The RTOS Tick............................................................................................................... 13
GCC Signal Attribute ..................................................................................................... 14
GCC Naked Attribute..................................................................................................... 16
FreeRTOS Tick Code .................................................................................................... 17
The AVR Context ........................................................................................................... 18
Restoring the Context ....................................................................................................... 20
Putting It All Together .................................................................................................... 21
RTOS Context Switch - Step 1 .................................................................................... 22
Prior to the RTOS tick interrupt.................................................................................... 22
RTOS Context Switch - Step 2 .................................................................................... 22
The RTOS tick interrupt occurs.................................................................................... 22
RTOS Context Switch - Step 3 .................................................................................... 23
The RTOS tick interrupt executes................................................................................. 23
RTOS Context Switch - Step 4 .................................................................................... 24
Incrementing the Tick Count ........................................................................................ 24
RTOS Context Switch - Step 5 .................................................................................... 25
The TaskB stack pointer is retrieved ............................................................................ 25
RTOS Context Switch - Step 6 .................................................................................... 25
Restore the TaskB context ............................................................................................ 25
RTOS Context Switch - Step 7 .................................................................................... 26
The RTOS tick exits...................................................................................................... 26
Tasks and Co-routines .................................................................................................. 27
Characteristics of a 'Task' ......................................................................................... 28
Characteristics of a 'Co-routine'................................................................................ 28
Tasks............................................................................................................................... 29
Task States ................................................................................................................ 29
Task Priorities ........................................................................................................... 31
Copyright (C) 2003 - 2007 Richard Barry ` www.FreeRTOS.org
Page 2 of 128
Implementing a Task................................................................................................. 32
Task Creation Macros............................................................................................... 32
The Idle Task ............................................................................................................ 33
The Idle Task Hook .................................................................................................. 33
Demo Application Examples .................................................................................... 36
RTOS Kernel Utilities..................................................................................................... 38
Queue Implementation.............................................................................................. 38
Semaphore Implementation ...................................................................................... 38
Tick Hook Function .................................................................................................. 38
Trace Utility ..................................................................................................................... 39
Source Organization ...................................................................................................... 42
Basic directory structure ........................................................................................... 42
RTOS source code directory list [the Source directory].......................................... 43
Demo application source code directory list [the Demo directory]......................... 44
Creating your own application.................................................................................. 44
The complete directory tree ...................................................................................... 45
Naming Conventions ................................................................................................ 50
Data Types ................................................................................................................ 51
Local Operator Interface [keypad and LCD] ............................................................ 51
LED........................................................................................................................... 52
RS232 PDA Interface ............................................................................................... 52
TCP/IP Interface ....................................................................................................... 52
Application components ............................................................................................... 52
More Info.......................................................................................................................... 53
RTOS Demo Introduction.............................................................................................. 53
Demo Project Files......................................................................................................... 56
blockQ.c.................................................................................................................... 56
comtest.c ................................................................................................................... 57
crflash.c..................................................................................................................... 57
crhook.c..................................................................................................................... 58
death.c ....................................................................................................................... 58
dynamic.c .................................................................................................................. 59
flash.c ........................................................................................................................ 60
flop.c ......................................................................................................................... 60
integer.c..................................................................................................................... 60
pollQ.c....................................................................................................................... 61
print.c ........................................................................................................................ 61
semtest.c.................................................................................................................... 62
Embedded TCP/IP Examples ...................................................................................... 62
API ................................................................................................................................... 63
Upgrading FreeRTOS to V4.x.x................................................................................... 63
Upgrading V4.0.5 to V4.1.0.......................................................................................... 64
Upgrading V4.2.1 to V4.3.0.......................................................................................... 64
Upgrading from V4.4.0 to V4.5.0................................................................................. 64
API Usage ....................................................................................................................... 65
General Information.................................................................................................. 65
Copyright (C) 2003 - 2007 Richard Barry ` www.FreeRTOS.org
Page 3 of 128
Task API ................................................................................................................... 65
Co-Routine API ........................................................................................................ 65
Configuration.................................................................................................................. 66
Customization ................................................................................................................. 66
'config' Parameters ........................................................................................................ 67
configUSE_PREEMPTION...................................................................................... 67
configUSE_IDLE_HOOK........................................................................................ 67
configUSE_TICK_HOOK........................................................................................ 67
configCPU_CLOCK_HZ.......................................................................................... 67
configTICK_RATE_HZ ........................................................................................... 67
configMAX_PRIORITIES ....................................................................................... 67
configMINIMAL_STACK_SIZE............................................................................. 68
configTOTAL_HEAP_SIZE .................................................................................... 68
configMAX_TASK_NAME_LEN........................................................................... 68
configUSE_TRACE_FACILITY ............................................................................. 68
configUSE_16_BIT_TICKS..................................................................................... 68
configIDLE_SHOULD_YIELD............................................................................... 69
configUSE_USE_MUTEXES .................................................................................. 70
configUSE_CO_ROUTINES ................................................................................... 70
configMAX_CO_ROUTINE_PRIORITIES ............................................................ 70
configKERNEL_INTERRUPT_PRIORITY ............................................................ 70
INCLUDE Parameters .................................................................................................. 71
本文来自:我爱研发网(52RD.com) 详细出处:http://www.52rd.com/bbs/post.asp?action=new&boardid=41
【文件名】:09516@52RD_FreeRTOS user manual.zip
【格 式】:zip
【大 小】:1122K
【简 介】:
【目 录】:
[UseMoney=1]

[/UseMoney]
发表于 2009-9-18 14:41:42 | 显示全部楼层
asefasefasdfasfasfsadf
点评回复

使用道具 举报

发表于 2010-6-2 04:22:20 | 显示全部楼层
又是要币币。。。。[em03][em03][em03]
点评回复

使用道具 举报

发表于 2010-6-5 22:39:36 | 显示全部楼层
好,谢谢!
点评回复

使用道具 举报

发表于 2010-11-5 12:06:56 | 显示全部楼层
又是要币币。  不会只有个目录吧
点评回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies

本版积分规则

Archiver|手机版|小黑屋|52RD我爱研发网 ( 沪ICP备2022007804号-2 )

GMT+8, 2024-10-9 02:26 , Processed in 0.046264 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表