当前位置:网站首页>Uc/os self-study from 0
Uc/os self-study from 0
2022-07-03 09:09:00 【Fat muscle duality】
uC/OS from 0 Start learning
OS initialization
OSInit(p_err)
Literally :
OSInitHook() ------------------- The interrupted stack space is cleared , Get the maximum address of interrupt stack space ;
OSIntNestingCtr --------------- Interrupt nesting reset ;
OSRunning ---------------------- Multitasking instructions
OSSchedLockNestingCtr ---- Lock nesting
OSTCBCurPtr ------------------- At present TCB The pointer
OSTCBHighRdyPtr
OSPrioCur ----------------------- Current priority
OSPrioHighRdy
OSPrioSaved
OS_CFG_SCHED_LOCK_TIME_MEAS_EN-------- Lock time measurement
OS_CFG_SCHED_ROUND_ROBIN_EN------------- Cyclic scheduling
OSSchedRoundRobinEn
OSSchedRoundRobinDfltTimeQuanta------------------ Default once 10 Time slice
if (OSCfg_ISRStkSize > (CPU_STK_SIZE)0) {------- Sense and OSInitHook() Function as
OS_CFG_APP_HOOKS_EN------------------------------ eliminate hook A function pointer
OS_CFG_TASK_REG_TBL_SIZE----------------------- Task register
OS_PrioInit(); ------------------------------------------------- Clear priority , An array assignment 0
OS_RdyListInit();--------------------------------------------- Initialize the ready list
OS_CFG_FLAG_EN ----------------------------------------event Sign module
OS_CFG_MEM_EN ----------------------------------------- Memory management module
OS_MSG_EN-------------------------------------------------
OS_CFG_MUTEX_EN ------------------------------------- Mutually exclusive management module
OS_CFG_Q_EN --------------------------------------------- Message queue management module
OS_TaskInit() ------------------------------------------------- Initialize task management
OS_CFG_ISR_POST_DEFERRED_EN --------------
OS_IdleTaskInit ---------------------------------------------- Create a idle Mission
OS_TickTaskInit --------------------------------------------- Create a tick Mission
OS_CFG_STAT_TASK_EN ------------------------------ Statistical tasks
OS_StatTaskInit() ------------------------------------------ Create a statistical task
OS_CFG_TMR_EN ---------------------------------------- Timer task
OS_TmrInit() ------------------------------------------------ Create a timer task
OS_CFG_DBG_EN ---------------------------------------debug Pattern
OS_Dbg_Init() ---------------------------------------------- Prevent the compiler from optimizing some unused variables
OSCfg_Init() ------------------------------------------------ The function annotation is the same as the function above
To be continued ……
Create a OSTask
OSTaskCreate
(
p_tcb------------- Pointer to the task control block , There are various parameter information of the task
p_name--------- String name of the task
p_task----------- Pointer to task code
p_arg------------ Parameters brought in when entering the function for the first time
prio--------------- priority , The smaller, the higher the priority
p_stk_base----- The lowest address of the task stack
stk_limit--------- Stack full limit
stk_size--------- Stack size , Company (CPU_STK)
q_size----------- The maximum number of messages sent to the task
time_quanta— The size of the time slice
p_ext------------TCB Expand memory
opt--------------- optional , nothing 、 Stack check 、 Stack cleanup 、 Floating point register 、TLS
p_err------------ Where to store the error code
)
边栏推荐
- Method of intercepting string in shell
- Severity code description the project file line prohibits the display of status error c2440 "initialization": unable to convert from "const char [31]" to "char *"
- Summary of methods for counting the number of file lines in shell scripts
- String splicing method in shell
- Really explain the five data structures of redis
- LeetCode 75. Color classification
- Markdown learning
- PIC16F648A-E/SS PIC16 8位 微控制器,7KB(4Kx14)
- Phpstudy 80 port occupied W10 system
- 记忆化搜索 AcWing 901. 滑雪
猜你喜欢

Tree DP acwing 285 A dance without a boss

LeetCode 871. Minimum refueling times

On the setting of global variable position in C language

高斯消元 AcWing 883. 高斯消元解线性方程组

【点云处理之论文狂读前沿版9】—Advanced Feature Learning on Point Clouds using Multi-resolution Features and Learni

Excel is not as good as jnpf form for 3 minutes in an hour. Leaders must praise it when making reports like this!

即时通讯IM,是时代进步的逆流?看看JNPF怎么说

LeetCode 508. 出现次数最多的子树元素和

LeetCode 508. The most frequent subtree elements and

Arbre DP acwing 285. Un bal sans patron.
随机推荐
拯救剧荒,程序员最爱看的高分美剧TOP10
求组合数 AcWing 886. 求组合数 II
高斯消元 AcWing 883. 高斯消元解线性方程组
Wonderful review | i/o extended 2022 activity dry goods sharing
【点云处理之论文狂读经典版10】—— PointCNN: Convolution On X-Transformed Points
String splicing method in shell
Convert video to GIF
php public private protected
干货!零售业智能化管理会遇到哪些问题?看懂这篇文章就够了
记忆化搜索 AcWing 901. 滑雪
Solution of 300ms delay of mobile phone
DOM render mount patch responsive system
LeetCode 508. The most frequent subtree elements and
LeetCode 513. 找树左下角的值
精彩回顾|I/O Extended 2022 活动干货分享
Using DLV to analyze the high CPU consumption of golang process
一个优秀速开发框架是什么样的?
<, < <,>, > > Introduction in shell
Get the link behind? Parameter value after question mark
Common penetration test range