当前位置:网站首页>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
)
边栏推荐
- Parameters of convolutional neural network
- AcWing 786. Number k
- Apache startup failed phpstudy Apache startup failed
- excel一小时不如JNPF表单3分钟,这样做报表,领导都得点赞!
- 【点云处理之论文狂读经典版14】—— Dynamic Graph CNN for Learning on Point Clouds
- AcWing 787. 归并排序(模板)
- Discussion on enterprise informatization construction
- Vscode connect to remote server
- Pic16f648a-e/ss PIC16 8-bit microcontroller, 7KB (4kx14)
- 【点云处理之论文狂读前沿版12】—— Adaptive Graph Convolution for Point Cloud Analysis
猜你喜欢

LeetCode 535. TinyURL 的加密与解密

LeetCode 1089. Duplicate zero

LeetCode 241. Design priorities for operational expressions

Six dimensional space (C language)

【点云处理之论文狂读经典版8】—— O-CNN: Octree-based Convolutional Neural Networks for 3D Shape Analysis

LeetCode 508. The most frequent subtree elements and

Gaussian elimination acwing 883 Gauss elimination for solving linear equations

求组合数 AcWing 886. 求组合数 II

PHP uses foreach to get a value in a two-dimensional associative array (with instances)

状态压缩DP AcWing 91. 最短Hamilton路径
随机推荐
干货!零售业智能化管理会遇到哪些问题?看懂这篇文章就够了
低代码起势,这款信息管理系统开发神器,你值得拥有!
记忆化搜索 AcWing 901. 滑雪
【点云处理之论文狂读经典版10】—— PointCNN: Convolution On X-Transformed Points
常见渗透测试靶场
Tag paste operator (#)
Too many open files solution
LeetCode 241. 为运算表达式设计优先级
【点云处理之论文狂读经典版7】—— Dynamic Edge-Conditioned Filters in Convolutional Neural Networks on Graphs
The "booster" of traditional office mode, Building OA office system, was so simple!
Gaussian elimination acwing 883 Gauss elimination for solving linear equations
AcWing 787. 归并排序(模板)
C language file reading and writing
TP5 multi condition sorting
php public private protected
状态压缩DP AcWing 291. 蒙德里安的梦想
AcWing 785. 快速排序(模板)
【点云处理之论文狂读前沿版8】—— Pointview-GCN: 3D Shape Classification With Multi-View Point Clouds
Introduction to the usage of getopts in shell
Apache startup failed phpstudy Apache startup failed