ucos源码阅读1——任务1

本文详细介绍了ucos操作系统内核的初始化过程,包括OsInit()函数的各个步骤,如设置中断向量、初始化任务列表、创建空闲任务和统计任务。此外,还探讨了任务控制块、调度器的工作原理以及中断处理的相关知识。通过对ucos源码的阅读,作者旨在梳理关键概念并为后续学习打下基础。
摘要由CSDN通过智能技术生成

os_core.c

按照main函数的流程去阅读源码。

OsInit()

在这里插入图片描述
1、哦,怎么图片这么大,首先是定义了个钩子函数,在os_cpu_c.c由用户实现。
2、InitMisc杂七杂八的初始化,初始化变量是在uCOS_II.H定义或声明的,宏定义的是在os_cfg.h用户配置文件里定义的。
在这里插入图片描述
补充:全局变量定义前的OS_EXT

//OS_CORE.C
#ifndef  OS_MASTER_FILE
#define  OS_GLOBALS
#include "includes.h"
#endif
//uCOS_II.H
#ifdef   OS_GLOBALS
#define  OS_EXT
#
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
\SOFTWARE The main directory from the root where all software-related files are placed. \SOFTWARE\BLOCKS The main directory where all ‘Building Blocks’ are located. With μC/OS-II, I included a ‘building block’ that handles DOS-type compatible functions that are used by the example code. \SOFTWARE\BLOCKS\TO This directory contains the files for the TO utility (see Appendix E, TO). The source file is TO.C and is found in the \SOFTWARE\TO\SOURCE directory. The DOS executable file (TO.EXE) is found in the \SOFTWARE\TO\EXE directory. Note that TO requires a file called TO.TBL which must reside on your root directory. An example of TO.TBL is also found in the \SOFTWARE\TO\EXE directory. You will need to move TO.TBL to the root directory if you are to use TO.EXE. \SOFTWARE\uCOS-II The main directory where all μC/OS-II files are located. \SOFTWARE\uCOS-II\EX1_x86L This directory contains the source code for EXAMPLE #1 (see section 1.07, Example #1) which is intended to run under DOS (or a DOS window under Windows 95). \SOFTWARE\uCOS-II\EX2_x86L This directory contains the source code for EXAMPLE #2 (see section 1.08, Example #2) which is intended to run under DOS (or a DOS window under Windows 95). \SOFTWARE\uCOS-II\EX3_x86L This directory contains the source code for EXAMPLE #3 (see section 1.09, Example #3) which is intended to run under DOS (or a DOS window under Windows 95). \SOFTWARE\uCOS-II\Ix86L This directory contains the source code for the processor dependent code (a.k.a. the port) of μC/OS-II for an 80x86 Real-Mode, Large Model processor. \SOFTWARE\uCOS-II\SOURCE This directory contains the source code for processor independent portion of μC/OS-II. This code is fully portable to other processor architectures.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值