计算机与现代化

• 应用与开发 • 上一篇    下一篇

FreeRTOS动态软件模块

  

  1. 北京交通大学电子信息工程学院,北京100044
  • 收稿日期:2015-12-14 出版日期:2016-06-16 发布日期:2016-06-17
  • 作者简介:陈紫卿 (1991-),男,福建龙岩人,北京交通大学电子信息工程学院硕士研究生,研究方向:无线通信系统与嵌入式; 孙昕,女,教授,博士生导师,研究方向:宽带移动通信系统与专用移动通信。
  • 基金资助:
    北京交通大学基金资助项目(2012JBZ015)

Dynamic Software Module for FreeRTOS

  1. School of Electronic and Information Engineering, Beijing Jiaotong University, Beijing 100044, China
  • Received:2015-12-14 Online:2016-06-16 Published:2016-06-17

摘要: FreeRTOS作为一种开源的轻量级多任务实时操作系统,被广泛应用在各种嵌入式仪器和设备中,但该操作系统不支持软件模块的动态加载,这限制了它的灵活性和扩展性。本文在详细分析ELF文件符号重定位原理的基础上,通过修改FreeRTOS任务的内存布局,并在其内核中添加ELF文件加载器,实现软件模块的动态加载和卸载功能。程序在STM32平台上的测试结果表明,软件模块能够在系统运行时被动态加载入内存,并成功被FreeRTOS内核调度执行。

关键词: FreeRTOS, ELF文件, 动态软件模块, 符号重定位

Abstract: FreeRTOS, as an open source lightweight multi-task real-time operating system, is widely used in all kinds of embedded instruments and equipments. But FreeRTOS does not support the dynamic loading of the software module, which limits its flexibility and scalability. Based on the detailed analysis of symbol relocation principle in the ELF file, dynamic loading and unloading function of the software module is realized by modifying the memory layout for FreeRTOS task, and adding the ELF file loader in the kernel. The test results on the STM32 platform show that the software module can be dynamically loaded into the memory and successfully scheduled by the kernel, while the OS is running.

Key words: FreeRTOS, ELF file, dynamic software module, symbol relocation

中图分类号: