uCos2 初识

 

 

 

 

今天和郭栋去找海哥,学习他的ucos的51移植经验,海哥对51比较精通,对keil也是很在行。从海哥身上,也学到了技术人员特有的气质。

看过ffmpeg之后,感觉ucos的代码,并没有那么长了。

中午回来,看了看ucos。

手头的资料,最近的是ok6410的ucos。

 

uCos2 6410 u-boot ok now/ok6410ucos2.bin 这个bin文件就是 要烧写的“内核”,

 

飞凌资料上说:

 

1.在u-boot命令行中输入 dnw c0008000,回车。  这说明内核镜像的地址在c0008000.

 

 

2.点击DNW菜单“USB Port-->Transmit-->Transmit” 在弹出的文件浏览窗口中选择zImage,该文件位于用户基础资料光盘的“uCos2 6410 u-boot ok now/ok6410ucos2.bin”目录下。

 

1. 擦除Nandflash:在命令行中输入 nand erase 100000 300000 ,回车。  这说明10 0000到30 0000是内核占据的地址空间。

2. 将内存的内核映像文件烧写到Nandflash

在命令行中输入 nand write c0008000 100000 300000 ,回车。 用nand wirte命令写入地址空间。

========================

这个好像是http://micrium.com/page/home ucos的官网。

 

 

下面是介绍ucos的2的

http://www.micrium.com/page/products/rtos/os-ii

 

μC/OS-II is a portable, ROMable, scalable, preemptive 抢占式的, real-time deterministic确定性的 multitasking kernel for microprocessors, microcontrollers and DSPs. Offering unprecedented空前的 ease-of-use, μC/OS-II is delivered with complete 100% ANSI C source code and in-depth documentation. μC/OS-II runs on the largest number of processor architectures, with ports available for download from the Micrium Web site.  ANSI C 编写,针对多种处理器平台有移植版本。

 

μC/OS-II manages up to 250 application tasks. μC/OS-II includes: semaphores; event flags; mutual-exclusion互斥semaphores that eliminate消除 unbounded无限的、不受控制的 priority inversions 翻转; message mailboxes 消息邮箱 and queues消息队列; task, time and timer management定时器管理; and fixed sized memory block management固定大小的内存块管理.

 

可以管理多大250个任务。包括有信号量、事件标志;互斥信号量(可用于消除不受控制的优先级翻转);消息邮箱、消息队列;任务、事件和定时器管理,固定大小的内存块管理。

 

μC/OS-II’s footprint can be scaled (between 5 Kbytes to 24 Kbytes) to only contain the features required for a specific application. The execution time for most services provided by μC/OS-II is both constant and determi- nistic; execution times do not depend on the number of tasks running in the application.

ucos2的覆盖区域可以才见到 5k 字节到24k字节,包含有针对特定的应用程序。

 

 

A validation确认的 suite provides all documentation necessary to support the use of μC/OS-II in safety-critical安全要求苛刻的系统systems. Specifically, μC/OS-II is currently imple- mented in a wide array of high level of safety-critical devices, including: – Those certified for Avionics DO-178B

  • Medical FDA pre-market notification (510(k)) and pre-market approval (PMA) devices
  • SIL3/SIL4 IEC for transportation and nuclear systems, 99% compliant with the Motor Industry Software Reliability Association (MISRA-C:1998) C Coding Standards

Applications

µC/OS-II is used in a wide variety of industries:

  • Avionics
  • Medical Equipment/Devices   医疗设备
  • Data Communications Equipment  数据通信设备
  • White Goods (Appliances)     白色商品(家用电器)
  • Mobile Phones, PDAs, MIDs    移动电话
  • Industrial Controls    工业控制 
  • Consumer Electronics   消费电子
  • Automotive     自动化
  • A wide range of embedded applications    广泛的嵌入式应用程序中。

Features   特性

The features of µC/OS-II include:

  • Unprecedented 空前的ease-of-use combined with an extremely short learning curve 极短的使用周期enables rapid time-to-market advantage.
  • Runs on the largest number of processor architectures with ports easily downloaded.
  • Scalability易裁剪行--Between 5 Kbytes to 24 Kbytes I Max interrupt disable time最大的中断 禁用 时间  : 200 clock cycles 200时钟周期 (typical configuration, ARM9, no wait states  典型配置,ARM9,没有等待状态).
  • Sufficiently robust 足够的健壮性  to meet rigorous严格的 safety-critical system requirements
  • Complete ANSI C source code is available for a 30-day trial use.  完整的代码,提供30天试用??
Who should use this RTOS?Developers who want to save time on their current and next embedded system project, and who want the cleanest, most popular, and robust RTOS on the market.
Supported ProcessorsSee complete list in Processor Chart
Maximum ROM Footprint (Unscaled)24 Kbytes    未裁剪大小
Minimum ROM Footprint (Scaled)6 Kbytes
Number of Kernel Services   内核服务数目10 different using 80 API calls
Multitasking ModelPreemptive  多任务模型是抢占式的调度。
Code Execution EntitiesTasks, ISRs
Dynamic ObjectsStatic and Dynamic
Data MovementMessage Mailboxes (unlimited)and Message Queues (unlimited)

Semaphores - Full Counting

信号量---full counting ?

Yes (unlimited)

Mutexes - With Priority Inheritance

互斥量--带有优先级继承

Yes (priority calling)  

 

 

Event Flags

事件标志

Yes (unlimited), configurable for 8, 16, or 32 bits

Memory Partitions - RAM Management

内存分区--RAM 管理

Yes
Timers定时器Yes (unlimited)

Communications Stacks and Middleware  通信栈和中间件。

 Requires an RTOSRTOS not Required
μC/TCP-IP
TCP/IP Networking
Small RAM/ROM footprint, IP v4
X-
μC/USB Host
USB Host stack
-X
μC/USB Device
USB Device stack
-X
μC/USB OTG
USB Host and Device stack
-X
μC/FS
FAT and FAT-Free File System
-X
μC/CAN
CAN Open Stack
-X
μC/GUI
Graphical User Interface
-X
μC/Bluetooth
Bluetooth Device and Master stack
-X

The current μC/USB-Host version is V3.10. In version 3.20 it will be available to run without a RTOS

Plug-Ins and Tools

μC/OS-II Kernel Awareness Plug-In (KA) allows for the display of μC/OS-II’s internal data structures in a series of windows integrated with the C-SPY Debugger from IAR’s Embedded Workbench. This allows you to examine each task, semaphore, mutex, mailbox, queue, and event flag group, as well as tasks waiting on kernel objects.

Monitoring

Use μC/Probe to visualize all μC/OS-II -based applications allowing a design engineer to monitor and change values in a product at run time. μC/Probe interfaces to any embedded target whether or not it has a real-time kernel, and works with any (8-bit, 16, bit, 32-bit, 64-bit CPU or DSP. μC/Probe saves valuable time throughout product design, and can also serve as a product’s user interface.

Processor Architectures

Architectures supported by μC/OS-II include:

CompanyArchitecture
ActelCortex-M1
AlteraNios II, Cortex-M1
Analog DevicesAduC7xxx (ARM7), ADSP-21xx, Blackfin 5xx, SHARC
ARMARM7, ARM9, ARM11, Cortex-M1, Cortex-M3
AtmelSAM7 (ARM7), SAM9(ARM9), AVR, AVR 32
Freescale9S08, 9S12, Coldfire, PowerPC, i.MX
FujitsuFR50
InfineonTriCore, 80C16x
Intel80x86
LatticeMicro32
Luminary MicroCortex-M3
MicrochipPIC24, dsPIC33, PIC32 (MIPS)
MIPSR3000, R4000
NXPARM7, ARM9, Cortex-M3
RenesasH8, M16C, M32C, R32C, RL78, SH, 78Kx, V850
SamsungARM7, ARM9
ST80C16x, STR7 (ARM7), STR9 (ARM9),STM32 (Cortex-M3)
TIMSP430, TMS320, TMS470 (ARM7)
ToshibaCortex-M3
XilinxMicroBlaze, PowerPC
ZILOGZ80, eZ80

For pricing, delivery, and ordering information, contact Micrium today.

 

 

================================================================

 

 

下面是ucos3

 

 

http://micrium.com/page/products/rtos/os-iii

 

 

The μC/OS-III is Micrium’s newest RTOS, designed to save time on embedded system projects. In addition to the features inherent in μC/OS-II, μC/OS-III also manages an unlimited number of application tasks, and features an interrupt disable time of near zero.

3是设计来在为嵌入式系统相聚节省时间的。

除了继承了2之外,3可以管理无限制数目的应用程序任务。中断禁止时间几乎为0

 

 

Micrium’s μC/OS-III supports ARM7/9, Cortex-MX, Nios-II, PowerPC, Coldfire, i.MX, Microblaze, RX600, H8, SH, M16C, M32C, Blackfin, and more. Ports are available for download from the Micrium website.

可以在这个网站下载针对这些体系结构的移植版本。

 

μC/OS-III manages unlimited application tasks, constrained only by a processor’s access to memory. μC/OS-III supports an unlimited number of priority levels. Typically, configuring μC/OS-III for between 32 and 256 different priority levels is adequate for most embedded applications.

3管理无限制数目的应用程序任务,仅仅被一个处理器对内存的访问所限制。3支持无限制数目的优先级。典型的,在32到256个不同的优先级中配置3对于大多数群嵌入式应用程序都是适用的。

 

 

μC/OS-III allows for unlimited tasks, semaphores, mutexes, event flags, message queues, timers and memory partitions. The user allocates all kernel objects at run time在运行时分配所有的内核对象. μC/OS-III provides features to allow stack growth of tasks to be monitored  可以监控任务栈的增长. While task size is not limited 栈的大小也不受限制, they need to have a minimum size based on the CPU used  基于cpu的使用,任务的栈有一个最小的大小.

 

μC/OS-III allows multiple tasks to run at the same priority level. When equal priority tasks are ready to run, μC/OS-III runs each for a user- specified time. Each task can define its own time quanta量 and give up its time slice if it does not require the full time quanta.  运行在同一个优先级上运行多个任务、当优先级相等的任务准备运行的时候,3 在用户指定的时间内运行每个任务。 每个栈 定义自己的时间量,如果不能得到完整的时间量,就放弃它的时间片,

 

 

μC/OS-III has a number of internal data structures and variables that it needs to access atomically. It protects these critical regions by disabling interrupts for almost zero clock cycles, ensuring that it is able to respond to some of the fastest interrupt sources. Interrupt response with μC/OS-III is deterministic.

3有一定数量的内部数据结构和变量,可以自动访问。通过在几乎0时钟周期内,禁用中断来为这些关键区域提供保护。这就保证了可以对一些最快的中断源提供相应。3的中断响应是确定性的。

 

 

 

μC/OS-III ensures that NULL pointers are not passed, task level services from ISRs aren’t called, arguments are within allowable range, and specified options are valid. Each API function provides an error code regarding the outcome of the function call.

3确保了NULL指针不传递,来自ISR的任务等级服务也不被调用,参数在一个允许的范围内,指定的选项是可行的。

每个API函数提供一个有关函数调用输出的错误代码,

 

μC/OS-III’s footprint can be scaled to only contain the features required for a specific application. The execution time for most services provided by μC/OS-III is both constant and deterministic; execution times do not depend on the number of tasks running in the application.

对于3提供的大多数的服务的执行时间,3可以是常量的,也可以是决定的,执行时间并不依赖于运行在应用程序上的任务数目。

Applications

 µC/OS-III is used in a wide variety of industries:

  • Data Communications Equipment
  • White Goods (Appliances)
  • Mobile Phones, PDAs, MIDs
  • Industrial Controls
  • Consumer Electronics
  • Automotive
  • A Wide-Range of Embedded Applications

Features

 The features of µC/OS-III include:

  • Delivered with complete 100% ANSI C source code and in-depth documentation.
  • Preemptive Multitasking: Runs the most important task that is ready.
  • Unlimited tasks, priorities, kernel objects
  • Round-Robin Scheduling
  • Near Zero Interrupt Disable Time
  • Scalable to contain only required features.
Who should use this RTOS?Developers who want to save time on their current and future embeddedsystem projects, and who require arobust RTOS built on clean,easy-to-implement code.
Supported ProcessorsSee complete list in Processor Chartfor μC/OS-III
Maximum ROM Footprint (Unscaled)24 Kbytes
Minimum ROM Footprint (Scaled)6 Kbytes
Number of Kernel Services10 different using 80 API calls
Multitasking ModelPreemptive
Code Execution EntitiesTasks, ISRs
Dynamic ObjectsStatic and Dynamic         静态和动态的对象
Data MovementMessage Queues (unlimited)    无限的消息队列。
Semaphores - Full CountingYes (unlimited)
Mutexes - With Priority InheritanceYes (priority ceiling)
Event FlagsYes (unlimited), configurablefor 8, 16, or 32 bits
Memory Partitions - RAM ManagementYes (unlimited)
TimersYes (unlimited)
Number of tasksUnlimited
Interrupt Disable Time

Near Zero

 

 

 

 

 

================================================================

 

获取源码

 

 

注册

Registration

 

 

In order to download our source code, we ask that you register for a free account with the Micrium web site. White papers, application notes, and other similar materials are available for download without registration.

Just a few notes before you begin:

  • You must have a valid email business address. Addresses at gmail.com, email.com, yahoo.com and other similar free email services are automatically deleted without response.
  • You must fill in all of the form categories in order to download.

You will receive a confirmation email containing an activation link for your account. If you do not receive the confirmation email within a few hours, please call 1-954-217-2036 x4.

 

If you were previously registered at Micrium.com, please use the same user name and password that you registered under. No need to reregister.

 

Success!

The user has been created. You will receive an email to confirm your subscription.

 

 

 

 

激活之后,登陆,download souce code

 

 

Download

Micrium-uCOS-II-V290.ZIP

Your download should start automatically... click here to start downloading if this didn’t start automatically.

Download notes:

  • If a dialog box appears with the option to run or save, click run.
  • Depending on your security settings, you may see a Security Warning dialog box. Click Yes to accept the ActiveX control.

 

 

===================================

源码

文档


官方的源码并不带有具体的体系结构的支持。仅仅只是源码。

后来大家用的时候,可能要分成很多目录,分别存放和管理这些源码。

目录各有不同。

源码

 

 

 

=======================================

ok6410在ucos2for6410中,给出的说明书:

 

下面的内容,看不太明白:

 

 

使用了u-boot的mmu没有重新做虚拟地址到物理地址的映射。

 

虚拟地址 物理地址

c0000000 50000000

 

 

程序运行过程中,把中断向量拷贝到0地址(Step stone区)

 

=============================================

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

等风来不如迎风去

你的鼓励是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值