计算机工程与应用 ›› 2013, Vol. 49 ›› Issue (5): 51-54.

• 理论研究、研发设计 • 上一篇    下一篇

μC/OS-II系统下的代码执行时间测量方法

雷金奎1,3,邵元元2,田  力3   

  1. 1.西北工业大学 第365研究所,西安 710065
    2.西北工业大学 电子信息学院,西安 710072
    3.西安爱生技术集团公司,西安 710065
  • 出版日期:2013-03-01 发布日期:2013-03-14

Code execution time measurement method based on μC/OS-II

LEI Jinkui1,3, SHAO Yuanyuan2, TIAN Li3   

  1. 1.Research Institute of 365, Northwestern Polytechnical University, Xi’an 710065, China
    2.School of Electronics and Information, Northwestern Polytechnical University, Xi’an 710072, China
    3.ASN Technology Group, Xi’an 710065, China
  • Online:2013-03-01 Published:2013-03-14

摘要: 针对航空航天、军事、核工业等关键领域对软件实时性的苛刻要求,提出一种基于μC/OS-II实时操作系统的代码执行时间测量方法。分析了对代码执行时间的测量影响较大的因素,并在最终测得的代码执行时间中去除了这些因素的影响。使用Microsemi SoftConsole IDE集成开发环境,在基于Cortex-M3核的SmartFusion主控芯片上实现了相关的代码。测量了μC/OS-II 在SmartFusion平台下的一些实时性指标,为代码的实时性提供了一个时间上的参考,为系统的实时性提供了保障,具有较高的实用价值。

关键词: &mu, C/OS-II, 执行时间测量, 实时性, 多任务

Abstract: According to the strict requirement on software real-time in critical areas like aerospace, military and nuclear industry, it introduces a code execution time measurement method based on μC/OS-II real-time operating system. The paper analyzes factors which affect time measurement most, and get rid of them at last. Using SoftConsole IDE, it implements related code on control chip SmartFusion which is based on Cortex-M3. It measures some real-time indexes of μC/OS-II on SmartFusion platform, which gives a time reference to real-time, ensures the real-time of system, and has high pragmatic value.

Key words: μC/OS-II, code execution time measurement, real-time, multitask