查看: 2671|回复: 5

[MQX] 小七带你玩转MQX(三) MQX初始化

[复制链接]

该用户从未签到

29

主题

439

帖子

0

版主

Rank: 7Rank: 7Rank: 7

积分
720
最后登录
2015-12-29
发表于 2015-7-20 18:29:13 | 显示全部楼层 |阅读模式
初始化
初始化组件是核心组件。它不同于标准版MQX的初始化组件。 标准版的_mqx 函数在精简版中分成两个函数:
_mqxlite_init()-这个函数是在处理器专家内部初始化期间调用的。基于在MQX精简版初始化传递给函数_mqxlite()的值,MQX会做以下工作:
设置和初始化MQX精简版内部使用的数据包括MQX精简版的内核数据结构,准备好的队列,中断堆栈;
创建内部同步需要的轻量级信号量;
​开启定时器滴答;
​_mqxlite()-这个函数启动MQX精简版系统,应该由用户程序调用,一般来说是在处理器专家内部初始化代码(PE_low_level_init()函数)调用之后在main函数中调用。
_mqxlite函数会:
创建在没有就绪任务时激活的idle(空闲函数);
创建任务模板列表里面定义的自动开启的任务;
启动任务调度器
1.2.1 Initialization
Initialization is a core component. It differs from the initialization component of the
standard MQX. The _mqx() function of the standard MQX is split into two functions in
MQXLite:
• _mqxlite_init() - This function is called during the Processor Expert internal
initialization. Based on the values in MQX Lite initialization structure that is passed
as _mqxlite() function argument, MQX Lite does the following:
• It sets up and initializes the data that MQX Lite uses internally, including MQX
Lite kernel data structure, ready queues, and the interrupt stack.
• It creates lightweight semaphore for internal synchronization needs.
• It starts the tick timer.
• _mqxlite() - This function starts MQX Lite and should be called from the user
application, typically in main(), after the Processor Expert internal initialization code
(PE_low_level_init() function). The _mqxlite() function:
• Creates the idle task, which is active if no other task is ready.
• Creates tasks that the task template list defines as autostart tasks.
• Starts the task scheduler.

我知道答案 目前已有5人回答

评分

参与人数 1NXP金币 +20 收起 理由
小七 + 20 打赏!

查看全部评分

回复

使用道具 举报

  • TA的每日心情

    2021-7-13 18:31
  • 签到天数: 127 天

    [LV.7]常住居民III

    19

    主题

    1229

    帖子

    1

    金牌会员

    Rank: 6Rank: 6

    积分
    6118
    最后登录
    2021-7-13
    发表于 2015-7-20 21:19:53 | 显示全部楼层
    看标题我还以为是七姐发的贴
    该会员没有填写今日想说内容.
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    2018-7-23 21:04
  • 签到天数: 103 天

    [LV.6]常住居民II

    228

    主题

    5379

    帖子

    0

    金牌会员

    Rank: 6Rank: 6

    积分
    15379
    最后登录
    1970-1-1
    发表于 2015-7-20 21:27:54 | 显示全部楼层
    学习了。。
    回复

    使用道具 举报

    该用户从未签到

    29

    主题

    439

    帖子

    0

    版主

    Rank: 7Rank: 7Rank: 7

    积分
    720
    最后登录
    2015-12-29
     楼主| 发表于 2015-7-21 12:52:22 | 显示全部楼层
    哈哈,我就是七姐啊
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    无聊
    2018-9-20 10:55
  • 签到天数: 13 天

    [LV.3]偶尔看看II

    24

    主题

    1189

    帖子

    0

    金牌会员

    Rank: 6Rank: 6

    积分
    1642
    最后登录
    2022-3-21
    发表于 2015-7-30 16:27:20 | 显示全部楼层
    顶! 七姐一出 万夫莫开
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    0

    主题

    49

    帖子

    0

    注册会员

    Rank: 2

    积分
    134
    最后登录
    2016-1-18
    发表于 2015-11-7 09:24:08 | 显示全部楼层
    好短的帖子,能说明问题吗
    回复 支持 反对

    使用道具 举报

    您需要登录后才可以回帖 注册/登录

    本版积分规则

    关闭

    站长推荐上一条 /4 下一条

    Archiver|手机版|小黑屋|恩智浦技术社区

    GMT+8, 2024-5-14 14:03 , Processed in 0.134879 second(s), 26 queries , MemCache On.

    Powered by Discuz! X3.4

    Copyright © 2001-2024, Tencent Cloud.

    快速回复 返回顶部 返回列表