Computer Engineering and Applications ›› 2020, Vol. 56 ›› Issue (20): 46-51.DOI: 10.3778/j.issn.1002-8331.1911-0046

Previous Articles     Next Articles

Anatomy of Real-Time Operating System mbedOS Startup Process

LIU Changyong, WANG Yihuai, CAI Chuanghua, JIANG Jianwu   

  1. 1.School of Mathematics and Computer Science, Wuyi University, Wuyishan, Fujian 354300, China
    2.School of Computer Science and Technology, Soochow University, Suzhou, Jiangsu 215006, China
    3.Key Laboratory of Cognitive Computing and Intelligent Information Processing of  Fujian Education Institutions, Wuyishan, Fujian 354300, China
  • Online:2020-10-15 Published:2020-10-13

实时操作系统mbedOS启动流程剖析

刘长勇,王宜怀,蔡闯华,蒋建武   

  1. 1.武夷学院 数学与计算机学院,福建 武夷山 354300
    2.苏州大学 计算机科学与技术学院,江苏 苏州 215006
    3.认知计算与智能信息处理福建省高校重点实验室,福建 武夷山 354300

Abstract:

The mbedOS is a real-time operating system for intelligent terminals and IoT nodes launched by ARM in 2014. It provides basic functional elements such as thread management and scheduling, memory management, clock management, and queue management. Based on an in-depth analysis of the functional elements and function call relationships of mbedOS, the article briefly gives the startup process of the KL36 chip, focuses on the settings of the mbedOS stack, the redirection of the interrupt vector table, the initialization of the kernel, the creation of the main thread, and the startup of the kernel. Finally, it also analyzes the storage usage during the mbedOS startup process, provides a technical foundation for the migration of mbedOS on different microcontrollers. It can also provide a reference for analyzing the startup of other RTOSs.

Key words: mbedOS, startup process, thread, KL36

摘要:

mbedOS是ARM公司于2014年开始推出的一款面向智能终端与物联网节点的实时操作系统,它提供了线程管理与调度、内存管理、时钟管理、队列管理等基本功能要素。在深入分析mbedOS的功能要素和函数调用关系的基础上,简要给出了KL36芯片的启动流程,重点剖析了mbedOS堆栈的设置、中断向量表的重定向、内核的初始化、主线程的创建以及内核的启动,最后对mbedOS启动过程中存储使用情况进行了分析,为mbedOS在不同微控制器上的移植提供了技术基础,也可为分析其他RTOS的启动提供参考。

关键词: mbedOS, 启动流程, 线程, KL36