当前位置:网站首页>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
)
边栏推荐
- What is the difference between sudo apt install and sudo apt -get install?
- Try to reprint an article about CSDN reprint
- In the digital transformation, what problems will occur in enterprise equipment management? Jnpf may be the "optimal solution"
- The method of replacing the newline character '\n' of a file with a space in the shell
- Use of sort command in shell
- 我们有个共同的名字,XX工
- Format - C language project sub file
- Divide candy (circular queue)
- Arbre DP acwing 285. Un bal sans patron.
- LeetCode 438. Find all letter ectopic words in the string
猜你喜欢

Try to reprint an article about CSDN reprint

With low code prospect, jnpf is flexible and easy to use, and uses intelligence to define a new office mode

20220630学习打卡

Digital statistics DP acwing 338 Counting problem

【点云处理之论文狂读经典版7】—— Dynamic Edge-Conditioned Filters in Convolutional Neural Networks on Graphs

Binary tree sorting (C language, int type)

Mortgage Calculator

一个优秀速开发框架是什么样的?

数字化转型中,企业设备管理会出现什么问题?JNPF或将是“最优解”

Too many open files solution
随机推荐
Education informatization has stepped into 2.0. How can jnpf help teachers reduce their burden and improve efficiency?
In the digital transformation, what problems will occur in enterprise equipment management? Jnpf may be the "optimal solution"
LeetCode 324. 摆动排序 II
Introduction to the usage of getopts in shell
【点云处理之论文狂读前沿版10】—— MVTN: Multi-View Transformation Network for 3D Shape Recognition
LeetCode 1089. 复写零
Format - C language project sub file
Solution of 300ms delay of mobile phone
LeetCode 324. Swing sort II
AcWing 786. Number k
Escape from heaven and forget what he suffered. In ancient times, it was called the punishment of escape from heaven. Article collection
LeetCode 438. Find all letter ectopic words in the string
Summary of methods for counting the number of file lines in shell scripts
Introduction to the basic application and skills of QT
Binary tree sorting (C language, int type)
【点云处理之论文狂读经典版7】—— Dynamic Edge-Conditioned Filters in Convolutional Neural Networks on Graphs
使用dlv分析golang进程cpu占用高问题
Complex character + number pyramid
C language file reading and writing
LeetCode 532. K-diff number pairs in array