当前位置:网站首页>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
)
边栏推荐
- 【点云处理之论文狂读前沿版10】—— MVTN: Multi-View Transformation Network for 3D Shape Recognition
- SQL statement error of common bug caused by Excel cell content that is not paid attention to for a long time
- Education informatization has stepped into 2.0. How can jnpf help teachers reduce their burden and improve efficiency?
- LeetCode 1089. 复写零
- How to check whether the disk is in guid format (GPT) or MBR format? Judge whether UEFI mode starts or legacy mode starts?
- 【点云处理之论文狂读经典版14】—— Dynamic Graph CNN for Learning on Point Clouds
- Introduction to the usage of getopts in shell
- Vscode connect to remote server
- On the difference and connection between find and select in TP5 framework
- Six dimensional space (C language)
猜你喜欢
SQL statement error of common bug caused by Excel cell content that is not paid attention to for a long time
LeetCode 241. Design priorities for operational expressions
LeetCode 75. Color classification
剑指 Offer II 029. 排序的循环链表
Instant messaging IM is the countercurrent of the progress of the times? See what jnpf says
[point cloud processing paper crazy reading classic version 7] - dynamic edge conditioned filters in revolutionary neural networks on Graphs
【点云处理之论文狂读经典版9】—— Pointwise Convolutional Neural Networks
[point cloud processing paper crazy reading frontier version 8] - pointview gcn: 3D shape classification with multi view point clouds
树形DP AcWing 285. 没有上司的舞会
Sword finger offer II 091 Paint the house
随机推荐
Instant messaging IM is the countercurrent of the progress of the times? See what jnpf says
【点云处理之论文狂读经典版9】—— Pointwise Convolutional Neural Networks
Memory search acwing 901 skiing
PHP uses foreach to get a value in a two-dimensional associative array (with instances)
Really explain the five data structures of redis
Try to reprint an article about CSDN reprint
LeetCode 871. 最低加油次数
DOM 渲染系统(render mount patch)响应式系统
Solution of 300ms delay of mobile phone
SQL statement error of common bug caused by Excel cell content that is not paid attention to for a long time
How to use Jupiter notebook
file_ put_ contents
AcWing 785. Quick sort (template)
记忆化搜索 AcWing 901. 滑雪
LeetCode 1089. Duplicate zero
使用dlv分析golang进程cpu占用高问题
【点云处理之论文狂读前沿版12】—— Adaptive Graph Convolution for Point Cloud Analysis
Arbre DP acwing 285. Un bal sans patron.
CSDN markdown editor help document
Use of sort command in shell