sync mdk pack and cubemx pack develop by linwei
sync mdk pack and cubemx pack develop by linwei
BIN
tools/STM32CubeMX_pack/Documentation/2、Demo video/1、软件包安装.mp4
Normal file
656
tools/STM32CubeMX_pack/Documentation/README.md
Normal file
@@ -0,0 +1,656 @@
|
|||||||
|

|
||||||
|
|
||||||
|
# 基于STM32Cube MX开发的TencentOS-Tiny软件包
|
||||||
|
|
||||||
|
TencentOS-Tiny software package based on STM32Cube MX
|
||||||
|
|
||||||
|
2021/11/10
|
||||||
|
|
||||||
|
东南大学
|
||||||
|
|
||||||
|
导师:汪礼超
|
||||||
|
|
||||||
|
学员:崔林威
|
||||||
|
|
||||||
|
Email:1797878653@qq.com
|
||||||
|
|
||||||
|
<https://github.com/OpenAtomFoundation/TencentOS-tiny>
|
||||||
|
|
||||||
|
# 摘要
|
||||||
|
|
||||||
|
腾讯物联网操作系统(TencentOS
|
||||||
|
tiny)是腾讯面向物联网领域开发的实时操作系统,具有低功耗,低资源占用,模块化,可裁剪等特性。TencentOS
|
||||||
|
tiny提供了最精简的 RTOS 内核,内核组件可裁剪可配置,可灵活移植到多种终端
|
||||||
|
MCU上;基于RTOS内核提供了COAP/MQTT/TLS/DTLS等常用物联网协议栈及组件,方便用户快速接入腾讯云物联网通信IoT
|
||||||
|
Hub;同时,为物联网终端厂家提供一站式软件解决方案,方便各种物联网设备快速接入腾讯云,可支撑智慧城市、智能穿戴、车联网等多种行业应用。
|
||||||
|
|
||||||
|
为了减少开发人员移植TencentOS
|
||||||
|
tiny到STM32系列单片机上的开发时间,研究了**STM32Cube MX软件包的制作**,基于STM32
|
||||||
|
PackCreator完成了TencentOS Tiny软件包的封装,并在STM32Cube IDE和MDK-ARM
|
||||||
|
v5上完成了软件包的**移植测试**,从而用户在安装本软件包后,能够使用pack**在STM32Cube
|
||||||
|
MX上直**接生成适合不同MCU的TencentOS Tiny工程。
|
||||||
|
|
||||||
|
目录
|
||||||
|
|
||||||
|
[1、STM32 Cube MX软件包介绍](#1stm32-cube-mx软件包介绍)
|
||||||
|
|
||||||
|
[1.1 软件包简介](#11-软件包简介)
|
||||||
|
|
||||||
|
[1.2 软件包制作](#12-软件包开发)
|
||||||
|
|
||||||
|
[1.2.1 软件包开发过程](#121-软件包开发过程)
|
||||||
|
|
||||||
|
[1.2.2 PDSC文件的编写](#122-利用stm32packcreator制作软件包)
|
||||||
|
|
||||||
|
[1.2.3 生成软件包](#_Toc82013881)
|
||||||
|
|
||||||
|
[2、TencentOS-tiny软件包](#2tencentos-tiny软件包)
|
||||||
|
|
||||||
|
[2.1 软件包内容](#21-软件包内容)
|
||||||
|
|
||||||
|
[2.2 软件包安装](#22-软件包安装)
|
||||||
|
|
||||||
|
[3、软件包测试](#3软件包测试)
|
||||||
|
|
||||||
|
[3.1 ARM内核移植TencentOS
|
||||||
|
tiny软件包](#31-stm32-mcu移植测试生成stm32-cubeide工程)
|
||||||
|
|
||||||
|
[3.2 STM32不依赖裸机工程移植](#32-stm32-board移植测试生成mdk-arm-v5工程)
|
||||||
|
|
||||||
|
[3.3 单片机裸机工程移植](#33-单片机测试)
|
||||||
|
|
||||||
|
[4、总结](#_Toc82013889)
|
||||||
|
|
||||||
|
[5、开发参考](#4开发参考)
|
||||||
|
|
||||||
|
[6、附录-移植配置参考](#_Toc82013891)
|
||||||
|
|
||||||
|
[6.1 MDK5.14版本移植到ARM内核](#_Toc82013892)
|
||||||
|
|
||||||
|
[6.1.1 Cortex-M0内核移植](#_Toc82013893)
|
||||||
|
|
||||||
|
[6.1.2 Cortex-M0+内核移植](#_Toc82013894)
|
||||||
|
|
||||||
|
[6.1.3 Cortex-M3内核移植](#_Toc82013895)
|
||||||
|
|
||||||
|
[6.1.4 Cortex-M4内核移植](#_Toc82013896)
|
||||||
|
|
||||||
|
[6.1.5 Cortex-M7内核移植](#_Toc82013897)
|
||||||
|
|
||||||
|
[6.2 MDK5.14版本移植到基于ARM内核的芯片](#_Toc82013898)
|
||||||
|
|
||||||
|
[6.2.1 移植到stm32f103c8芯片](#_Toc82013899)
|
||||||
|
|
||||||
|
[6.2.2 移植到stm32f767igt芯片](#_Toc82013900)
|
||||||
|
|
||||||
|
[6.3
|
||||||
|
MDK5.30和MDK5.35版本移植(Cortex-M0+、0、3、4、7内核和芯片)](#_Toc82013901)
|
||||||
|
|
||||||
|
[6.4 MDK5.30和MDK5.35版本移植(Cortex-M23、33)](#_Toc82013902)
|
||||||
|
|
||||||
|
[6.4.1 Cortex-M23内核移植](#_Toc82013903)
|
||||||
|
|
||||||
|
[6.4.2 Cortex-M33内核移植](#_Toc82013904)
|
||||||
|
|
||||||
|
# 1、STM32 Cube MX软件包介绍
|
||||||
|
|
||||||
|
## 1.1 软件包简介
|
||||||
|
|
||||||
|
在进行嵌入式软件开发时,ARM为我们提供了软件包功能,能够将软件算法等模块进行集成封装,从而方便第三方用户使用。ARM软件包能够为微控制器设备和开发板提供支持,包含软件组件(Software
|
||||||
|
Component)如驱动程序和中间件,还可以包含示例项目和代码模板等,主要有以下类型的软件包:
|
||||||
|
|
||||||
|
(1) 器件系列包(Device Family
|
||||||
|
Pack):由硅供应商或工具供应商生成,为特定的目标微控制器创建软件应用提供支持;
|
||||||
|
|
||||||
|
(2) 板级支持包(Board Support
|
||||||
|
Pack):由电路板供应商发布,为安装在电路板上的外围硬件提供软件支持。
|
||||||
|
|
||||||
|
(3) CMSIS软件包:由ARM提供,包括对CMSIS核心、DSP和RTOS的支持;
|
||||||
|
|
||||||
|
(4) 中间件包(Middleware
|
||||||
|
Pack):由芯片供应商、工具供应商或第三方创建;通过提供对常用软件组件(如软件堆栈、特殊硬件库等)的软件集成,从而减少开发时间;
|
||||||
|
|
||||||
|
(5) 内部组件(In-house components):由工具用户开发,用于内部或外部分发。
|
||||||
|
|
||||||
|
软件组件包括以下几部分:
|
||||||
|
|
||||||
|
(1) 源代码、库、头文件/配置文件和文档;
|
||||||
|
|
||||||
|
(2) 完整的示例项目,展示了软件组件的使用,可以下载并在评估硬件上执行;
|
||||||
|
|
||||||
|
(3) 代码模板,方便使用软件组件。
|
||||||
|
|
||||||
|
一个完整的软件包是一个ZIP文件,包含所有需要的软件库和文件,以及一个包含软件包所有信息的包描述文件(PDSC文件),ARM软件包的结构是在CMSIS中定义的(<http://www.keil.com/CMSIS/Pack>)。
|
||||||
|
|
||||||
|
STM32
|
||||||
|
CubeMX是ST公司推出了专门用于生成STM32的HAL代码的代码生成软件,可以通过可视化界面完成工程的配置,同时生成能够在STM32
|
||||||
|
CubeMX、Keil等软件中运行的工程。STM32 Cube
|
||||||
|
MX软件包是在ARM软件包的基础上,结合ST公司提供的软件包生成工具STM32
|
||||||
|
PackCreator制作的,利用这个软件我们可以很方便地以图形化界面的方式进行软件包的制作。
|
||||||
|
|
||||||
|
如下图所示,使用STM32PackCreator需要我们的操作系统安装Java™ Runtime Environment
|
||||||
|
(JRE)和JavaFX™,目前STM32CubeMX已经更新到了6.3版本,但这个版本并没有集成JavaFX,最为方便的方式是安装STM32
|
||||||
|
CubeMX 6.2版本,省去了JavaFX的配置问题。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图1.1 STM32PackCreator使用要求
|
||||||
|
|
||||||
|
具体步骤如下:
|
||||||
|
|
||||||
|
(1)安装STM32CubeMX6.2.0:[STM32CubeMX - STM32Cube初始化代码生成器 -
|
||||||
|
STMicroelectronics](https://www.st.com/zh/development-tools/stm32cubemx.html#get-software);
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图1.2 下载STM32CubeMX6.2.0
|
||||||
|
|
||||||
|
(2)双击安装目录下的STM32PackCreator,此时会提示需要安装JRE,点击确定,跳转到[https://java.com/zh-CN/download/](https://aijishu.com/link?target=https%3A%2F%2Fjava.com%2Fzh-CN%2Fdownload%2F),然后下载安装。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图1.3 STM32PackCreator使用前的配置
|
||||||
|
|
||||||
|
(3)然后再次双击打开STM32PackCreator.exe,STM32 PackCreator的界面如下图所示。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图1.4 STM32 PackCreator界面
|
||||||
|
|
||||||
|
## 1.2 软件包开发
|
||||||
|
|
||||||
|
### 1.2.1 软件包开发过程
|
||||||
|
|
||||||
|
软件包的开发过程相当于完成了一项产品的制作,因此引入产品生命周期管理(PLM)的概念,PLM包括以下四个阶段:(1)概念的产生,基于软件包需求进行产品定义,并创建第一个功能原型;(2)设计,根据技术特征和要求,进行原型测试和产品的实施,通过广泛的测试验证产品的功能与规格;(3)发布,产品被制造出来并推向市场;(4)服务,对产品的维护,包括对客户的支持,最后不断优化,结束产品的周期。
|
||||||
|
|
||||||
|
在制作软件包时,主要面临以下几个过程:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图1.5 软件包开发流程
|
||||||
|
|
||||||
|
首先,根据特定组件生成软件包即根据需求将相应的头文件、库文件等软件组件利用PDSC文件进行组织,在组织完成后即可利用软件包生成工具生成对应版本的软件包,然后对新生成的软件包进行测试,给出示例测试程序,再将其包含如PDSC文件中,最后经测试完成后生成最终的软件包。
|
||||||
|
|
||||||
|
### 1.2.2 利用STM32PackCreator制作软件包
|
||||||
|
|
||||||
|
STM32PackCreator能够通过图形化界面设计软件包,省去了我们手动编写PDSC文件和软件包生成脚本文件的步骤,使用起来非常方便快捷,以下是使用STM32PackCreator制作软件包的步骤。
|
||||||
|
|
||||||
|
(1)打开STM32 PackCreator后,点击File-new project from scratch。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图1.6 生成新软件包
|
||||||
|
|
||||||
|
(2)进行软件包的配置,包括软件包生成的文件夹、软件包的vendor、name和description属性。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图1.7 软件包初始配置
|
||||||
|
|
||||||
|
(3)配置完成后,可以看到有四个属性栏,他们分别代表软件包的基本配置、版本控制、组件内容和附加文件,如图1.7所示:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图1.8 软件包属性栏
|
||||||
|
|
||||||
|
(4)如下为制作Tencent OS-tiny软件包时的配置:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
(a)基础配置
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
(b)软件包版本控制
|
||||||
|
|
||||||
|
图1.9 软件包配置
|
||||||
|
|
||||||
|
(5)制作软件包的关键在于Pack
|
||||||
|
Details的配置,这里实际上就是手工编写PDSC文件的图形化界面显示,我们按照ARM
|
||||||
|
PDSC文件的编写规范设计condition、设计组件结构、添加组件即可。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图1.10 软件包组件配置
|
||||||
|
|
||||||
|
(6)添加附件,在Additional
|
||||||
|
Files中,我们需要添加上软件包的说明文件(README.md)、利用软件包生成的示例工程(Projects)和STM32CubeMX文件夹,此时我们点击File-Save
|
||||||
|
and Generate
|
||||||
|
Pack,可以在之前设定的路径下看到软件包。然后我们再次将这个软件包也加入到Additional
|
||||||
|
Files中,如图1.11所示,我们再次点击File-Save and Generate
|
||||||
|
Pack,就可以生成一个完整的STM32CubeMX软件包了。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图1.11 STM32CubeMX文件夹
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图1.12 Additional Files界面
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图1.13 生成软件包
|
||||||
|
|
||||||
|
(7)另外,STM32PackCreator提供了参数预先配置的功能,使得我们在STM32 Cube
|
||||||
|
MX生成工程时,可以对软件包的参数进行提前配置。首先在图1.13(a)中添加我们需要用户提前配置的一系列参数,然后在图1.13(b)中制作一个模板文件,此处我设置为头文件的形式,然后将之前设置的一系列参数添加过来并保存,这样用户在使用软件包生成工程的时候就可以预先配置参数,并在生成工程时自动生成名为tos_config的文件。
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
(a) (b)
|
||||||
|
|
||||||
|
图1.14 软件包参数配置
|
||||||
|
|
||||||
|
# 2、TencentOS-tiny软件包
|
||||||
|
|
||||||
|
## 2.1 软件包内容
|
||||||
|
|
||||||
|
结合TencentOS tiny的算法架构,本文设计的软件包包括如表2-1所示的内容:
|
||||||
|
|
||||||
|
表2-1 软件包内容
|
||||||
|
|
||||||
|
| 内容 | 功能 | |
|
||||||
|
|----------|-------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------|
|
||||||
|
| arch | 包括TencentOS-tiny\\arch\\arm下内核为Cortex-M0+、Cortex-M0、Cortex-M3、Cortex-M4、Cortex-M7、Cortex-M23、Cortex-M33的arch文件 | |
|
||||||
|
| kernel | 包括TencentOS-tiny\\kernel下的core、hal路径中的文件、tos_config文件 | |
|
||||||
|
| cmsis_os | 对应TencentOS-tiny\\osal\\cmsis_os的文件 | |
|
||||||
|
| example | helloworld_main | 用于测试软件包的main文件 |
|
||||||
|
| | mcu_it.c | 移植软件包时需要按照该文件对中断函数进行修改 |
|
||||||
|
| | mcu_platform.h | 用户可在此文件在添加对应单片机的头文件 |
|
||||||
|
|
||||||
|
软件包具有以下功能:
|
||||||
|
|
||||||
|
(1)软件包针对ARMCortex-M0+、Cortex-M0、Cortex-M3、Cortex-M4、Cortex-M7、Cortex-M23和Cortex-M33内核进行了TencentOS
|
||||||
|
tiny软件的封装,用户在安装软件包后能够快速将TencentOS tiny相应内核的Keil工程中;
|
||||||
|
|
||||||
|
(2)软件包能够自动适应用户所选的内核,arch文件能够根据内核自动显示,从而方便用户使用;
|
||||||
|
|
||||||
|
(3)用户在勾选一个组件时,软件包会自动提示还需要勾选其他模块,并可利用界面中的Resolve一键勾选,防止遗漏;
|
||||||
|
|
||||||
|
(4)用户可在STM32CubeMX上修改tos_config文件中的参数,对TencentOS
|
||||||
|
tiny的功能进行裁剪。
|
||||||
|
|
||||||
|
## 2.2 软件包安装
|
||||||
|
|
||||||
|
接下来介绍Tencent.TencentOS-tiny软件包的安装,首先打开STM32 Cube
|
||||||
|
MX软件,如图2.1(a)所示,点击INSTALL/REMOVE,然后将软件包拖进来,点击I agree to
|
||||||
|
all the terms of the preceding License
|
||||||
|
Agreement,再点击next进行安装,安装完成界面如图2.1(b)所示。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
(a) (b)
|
||||||
|
|
||||||
|
图2.1 软件包安装
|
||||||
|
|
||||||
|
安装好的软件包可以在安装路径中查看内容,路径在Help-Updater Settings中查看。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
(a)安装路径
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
(b) 软件包安装查看
|
||||||
|
|
||||||
|
图2.2 软件包安装
|
||||||
|
|
||||||
|
# 3、软件包测试
|
||||||
|
|
||||||
|
## 3.1 STM32 MCU移植测试(生成STM32 CubeIDE工程)
|
||||||
|
|
||||||
|
移植步骤如下:
|
||||||
|
|
||||||
|
(1)点击ACCESS TO MCU SELECTOR:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.1 打开MCU选择的界面
|
||||||
|
|
||||||
|
(2)选择STM32F407ZGTx,点击Start Project:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.2 选择MCU
|
||||||
|
|
||||||
|
(3)点击红框中选项
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.3 选择软件包
|
||||||
|
|
||||||
|
(4)此时生成使用STM32
|
||||||
|
CubeIDE编译的工程,首先选择gcc版本的arch(如果是MDK-ARM版本的话就点击armcc版本的arch),然后点击黄色感叹号,再点击Resolve。之后手动添加helloworld_main和cmsis_os,并选择对应MCU版本的mcu_platform。最后点击ok完成配置。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.4 软件包配置
|
||||||
|
|
||||||
|
(5)点击Software Packs,打勾,并在下方进行软件包的参数配置。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.5 软件包参数配置
|
||||||
|
|
||||||
|
(6)注释掉中断函数PendSV()、void
|
||||||
|
SysTick_Handler(void)等,这些在软件包中都进行了配置。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.6 中断函数处理
|
||||||
|
|
||||||
|
(7)进行生成工程配置,按如下界面进行配置,最后点击GENERATE CODE,并点击Open
|
||||||
|
Project。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.7 工程生成配置
|
||||||
|
|
||||||
|
(8)在tos_config头文件中加入头文件:**\#include**
|
||||||
|
"mcu_platform_M4.h",点击Build All,如下界面所示,编译通过,完成软件包的移植。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.8 工程配置与编译
|
||||||
|
|
||||||
|
## 3.2 STM32 Board移植测试(生成MDK-ARM v5工程)
|
||||||
|
|
||||||
|
(1)点击ACCESS TO BOARD SELECTOR,选择Board为NUCLEO-F401RE,点击Start Project:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.9 Board选择
|
||||||
|
|
||||||
|
(2)点击红框中选项
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.10 选择软件包
|
||||||
|
|
||||||
|
(3)此时生成使用MDK-ARM编译的工程,首先选择armcc版本的arch(如果是STM32
|
||||||
|
CubeIDE版本的话就点击gcc版本的arch),然后点击黄色感叹号,再点击Resolve。之后手动添加helloworld_main和cmsis_os,并选择对应MCU版本的mcu_platform。最后点击ok完成配置。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.11 软件包配置
|
||||||
|
|
||||||
|
(4)点击Software Packs,打勾,并在下方进行软件包的参数配置。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.12 软件包参数配置
|
||||||
|
|
||||||
|
(5)注释掉中断函数PendSV()、void
|
||||||
|
SysTick_Handler(void)等,这些在软件包中都进行了配置。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.13 中断函数处理
|
||||||
|
|
||||||
|
(6)进行生成工程配置,按如下界面进行配置,最后点击GENERATE CODE,并点击Open
|
||||||
|
Project。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.14 工程生成配置
|
||||||
|
|
||||||
|
(8)打开main_example.c,跳转到tos_config头文件,在其中加入头文件:**\#include**
|
||||||
|
"mcu_platform_M4.h",点击Build All,如下界面所示,编译通过,完成软件包的移植。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.15 移植编译
|
||||||
|
|
||||||
|
## 3.3 单片机测试
|
||||||
|
|
||||||
|
对单片机开发板进行测试,以正点原子探索者STM32F407ZGT6为例介绍TencentOS-tiny软件包的移植。
|
||||||
|
|
||||||
|
(1)点击ACCESS TO MCU SELECTOR:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.16 打开MCU选择的界面
|
||||||
|
|
||||||
|
(2)选择STM32F407ZGTx,点击Start Project:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.17 选择MCU
|
||||||
|
|
||||||
|
(3)点击红框中选项
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.18 选择软件包
|
||||||
|
|
||||||
|
(4)此时生成使用MDK-ARM编译的工程,首先选择armcc版本的arch(如果是STM32
|
||||||
|
CubeIDE版本的话就点击gcc版本的arch),然后点击黄色感叹号,再点击Resolve。之后手动添加cmsis_os,并选择对应MCU版本的mcu_platform。最后点击ok完成配置。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.19 软件包配置
|
||||||
|
|
||||||
|
(5)点击Software Packs,打勾,并在下方进行软件包的参数配置。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.20 软件包参数配置
|
||||||
|
|
||||||
|
(6)注释掉中断函数PendSV()、void
|
||||||
|
SysTick_Handler(void)等,这些在软件包中都进行了配置,然后我们还需要对串口、下载等模块进行修改,如下:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
(a)中断函数处理
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
(b)中断优先级配置
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
(c)RCC配置
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
(d)SYS配置
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
(e)串口1配置
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
(f)时钟树配置
|
||||||
|
|
||||||
|
图3.21 模块配置
|
||||||
|
|
||||||
|
(7)进行生成工程配置,按如下界面进行配置,最后点击右上角GENERATE
|
||||||
|
CODE,生成工程后点击Open Project。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.22 工程配置
|
||||||
|
|
||||||
|
(8)打开tos_config头文件,在其中加入头文件:**\#include**
|
||||||
|
"mcu_platform_M4.h",然后使用如下的main文件:
|
||||||
|
|
||||||
|
/\* USER CODE BEGIN Includes \*/
|
||||||
|
|
||||||
|
\#include "cmsis_os.h"
|
||||||
|
|
||||||
|
/\* USER CODE END Includes \*/
|
||||||
|
|
||||||
|
/\* USER CODE BEGIN 0 \*/
|
||||||
|
|
||||||
|
//task1
|
||||||
|
|
||||||
|
\#define TASK1_STK_SIZE 512
|
||||||
|
|
||||||
|
void task1(void \*pdata);
|
||||||
|
|
||||||
|
osThreadDef(task1, osPriorityNormal, 1, TASK1_STK_SIZE);
|
||||||
|
|
||||||
|
//task2
|
||||||
|
|
||||||
|
\#define TASK2_STK_SIZE 512
|
||||||
|
|
||||||
|
void task2(void \*pdata);
|
||||||
|
|
||||||
|
osThreadDef(task2, osPriorityNormal, 1, TASK2_STK_SIZE);
|
||||||
|
|
||||||
|
void task1(void \*pdata)
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
int count = 1;
|
||||||
|
|
||||||
|
char buffer[64] = {0};
|
||||||
|
|
||||||
|
while(1) {
|
||||||
|
|
||||||
|
snprintf(buffer, sizeof(buffer), "task 1 %04d\\r\\n", count++);
|
||||||
|
|
||||||
|
HAL_UART_Transmit(&huart1, (uint8_t\*)buffer, strlen(buffer), 0xFFFF);
|
||||||
|
|
||||||
|
osDelay(2000);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void task2(void \*pdata)
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
int count = 1;
|
||||||
|
|
||||||
|
char buffer[64] = {0};
|
||||||
|
|
||||||
|
while(1) {
|
||||||
|
|
||||||
|
snprintf(buffer, sizeof(buffer), "task 2 %04d\\r\\n", count++);
|
||||||
|
|
||||||
|
HAL_UART_Transmit(&huart1, (uint8_t\*)buffer, strlen(buffer), 0xFFFF);
|
||||||
|
|
||||||
|
osDelay(1000);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/\* USER CODE END 0 \*/
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
/\* USER CODE BEGIN 1 \*/
|
||||||
|
|
||||||
|
/\* USER CODE END 1 \*/
|
||||||
|
|
||||||
|
/\* MCU Configuration--------------------------------------------------------\*/
|
||||||
|
|
||||||
|
/\* Reset of all peripherals, Initializes the Flash interface and the Systick.
|
||||||
|
\*/
|
||||||
|
|
||||||
|
HAL_Init();
|
||||||
|
|
||||||
|
/\* USER CODE BEGIN Init \*/
|
||||||
|
|
||||||
|
/\* USER CODE END Init \*/
|
||||||
|
|
||||||
|
/\* Configure the system clock \*/
|
||||||
|
|
||||||
|
SystemClock_Config();
|
||||||
|
|
||||||
|
/\* USER CODE BEGIN SysInit \*/
|
||||||
|
|
||||||
|
/\* USER CODE END SysInit \*/
|
||||||
|
|
||||||
|
/\* Initialize all configured peripherals \*/
|
||||||
|
|
||||||
|
MX_GPIO_Init();
|
||||||
|
|
||||||
|
MX_USART1_UART_Init();
|
||||||
|
|
||||||
|
/\* USER CODE BEGIN 2 \*/
|
||||||
|
|
||||||
|
osKernelInitialize(); //TOS Tiny kernel initialize
|
||||||
|
|
||||||
|
osThreadCreate(osThread(task1), NULL);// Create task1
|
||||||
|
|
||||||
|
osThreadCreate(osThread(task2), NULL);// Create task2
|
||||||
|
|
||||||
|
osKernelStart(); //Start TOS Tiny
|
||||||
|
|
||||||
|
/\* USER CODE END 2 \*/
|
||||||
|
|
||||||
|
/\* Infinite loop \*/
|
||||||
|
|
||||||
|
/\* USER CODE BEGIN WHILE \*/
|
||||||
|
|
||||||
|
while (1)
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
/\* USER CODE END WHILE \*/
|
||||||
|
|
||||||
|
/\* USER CODE BEGIN 3 \*/
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/\* USER CODE END 3 \*/
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
(9)编译,然后使用ST-LINK下载到正点原子探索者单片机中
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.23 编译、下载程序
|
||||||
|
|
||||||
|
(10)使用串口助手查看,两个任务的延时设置不一样,运行效果也不一样:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.24 串口查看界面
|
||||||
|
|
||||||
|
# 4、开发参考
|
||||||
|
|
||||||
|
1、腾讯物联网操作系统网址<https://github.com/OpenAtomFoundation/TencentOS-tiny>
|
||||||
|
|
||||||
|
2、ST官方教程[How to develop a STM32Cube Expansion Package - stm32mcu
|
||||||
|
(stmicroelectronics.cn)](https://wiki.stmicroelectronics.cn/stm32mcu/wiki/How_to_develop_a_STM32Cube_Expansion_Package)
|
||||||
|
|
||||||
|
3、[制作STM32Cube软件包-STM32 PackCreator的使用及软件包的制作 - 极术社区 -
|
||||||
|
连接开发者与智能计算生态 (aijishu.com)](https://aijishu.com/a/1060000000243533)
|
||||||
|
|
||||||
|
4、[(1)STM32
|
||||||
|
CubeMX软件包的制作---STM32PackCreator的使用_linwei_Cui的博客-CSDN博客](https://blog.csdn.net/qq_40259429/article/details/120557456?spm=1001.2014.3001.5501)
|
||||||
|
|
||||||
|
5、[(2)STM32
|
||||||
|
CubeMX软件包的制作---简易软件包的制作_linwei_Cui的博客-CSDN博客](https://blog.csdn.net/qq_40259429/article/details/120583659?spm=1001.2014.3001.5501)
|
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 213 KiB |
After Width: | Height: | Size: 84 KiB |
After Width: | Height: | Size: 156 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 67 KiB |
After Width: | Height: | Size: 187 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 94 KiB |
After Width: | Height: | Size: 291 KiB |
After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 217 KiB |
After Width: | Height: | Size: 172 KiB |
After Width: | Height: | Size: 68 KiB |
After Width: | Height: | Size: 123 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 112 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 51 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 115 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 78 KiB |
After Width: | Height: | Size: 609 KiB |
After Width: | Height: | Size: 181 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 78 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 27 KiB |
32
tools/STM32CubeMX_pack/README.md
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# 基于STM32 CubeMX开发的TencentOS-Tiny Software Pack v1.0.0
|
||||||
|
##TencentOS-Tiny 1.0.0
|
||||||
|
软件包具有以下功能:
|
||||||
|
|
||||||
|
(1)软件包针对ARM Cortex-M0+、Cortex-M0、Cortex-M3、Cortex-M4、Cortex-M7、Cortex-M23和Cortex-M33内核进行了TencentOS tiny操作系统的封装,在安装软件包后能够快速将TencentOS tiny相应内核的Keil工程中;
|
||||||
|
(2)软件包能够自动适应工程所选的内核,arch文件能够根据内核自动显示;
|
||||||
|
(3)用户在勾选一个组件时,软件包会自动提示还需要勾选其他模块,并可利用界面中的Resolve一键勾选;
|
||||||
|
(4)用户可自主修改对应内核的tos_config文件,对TencentOS tiny的功能进行裁剪;
|
||||||
|
(5)目前软件包已经在STM32 CubeMX 6.2.0上进行了测试,完成了基于ARM Cortex-M0+、Cortex-M0、Cortex-M3、Cortex-M4、Cortex-M7和Cortex-M33内核的ST芯片以及单片机移植测试。
|
||||||
|
|
||||||
|
CSDN博客: <https://blog.csdn.net/qq_40259429/article/details/121334816>
|
||||||
|
|
||||||
|
极术社区:[https://aijishu.com/a/1060000000243533](https://aijishu.com/a/1060000000243533 "STM32 CubeMX软件包制作")
|
||||||
|
|
||||||
|
TencentOS Tiny GitHub网页: <https://github.com/OpenAtomFoundation/TencentOS-tiny/tree/master/tools/STM32CubeMX_pack>
|
||||||
|
|
||||||
|
|
||||||
|
# TencentOS-Tiny Software Pack v1.0.0 based on STM32 CubeMX
|
||||||
|
##TencentOS-Tiny 1.0.0
|
||||||
|
The software pack has the following features:
|
||||||
|
|
||||||
|
Updated new pack:
|
||||||
|
(1) The package packages the TencentOS tiny operating system for the ARM Cortex-M0+, Cortex-M0, Cortex-M3, Cortex-M4, Cortex-M7, Cortex-M23 and Cortex-M33 cores, enabling quick installation of the TencentOS tiny corresponding kernel in a Keil project.
|
||||||
|
(2) The package can automatically adapt to the kernel selected for the project, and the arch file can be displayed automatically according to the kernel.
|
||||||
|
(3) When the user checks a component, the package will automatically indicate that other modules need to be checked, and can be checked with one click using Resolve in the interface.
|
||||||
|
(4) The user can modify the tos_config file of the corresponding kernel to tailor the functions of TencentOS tiny on their own.
|
||||||
|
(5) The package has been tested on STM32 CubeIDE 6.2.0, completed with core-based based chips and microcontroller development boards based on ARM Cortex-M0+, Cortex-M0, Cortex-M3, Cortex-M4, Cortex-M7, Cortex-M33 cores were ported.
|
||||||
|
|
||||||
|
web of TencentOS Tiny: <https://github.com/OpenAtomFoundation/TencentOS-tiny/tree/master/tools/mdk_pack>
|
||||||
|
# License
|
||||||
|
Licensed under BSD 3-Clause License.
|
||||||
|
|
BIN
tools/STM32CubeMX_pack/Tencent.TencentOS-tiny.1.0.0.pack
Normal file
566
tools/STM32CubeMX_pack/Tencent.TencentOS-tiny.pdsc
Normal file
@@ -0,0 +1,566 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<package schemaVersion="1.6.3" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="PACK.xsd">
|
||||||
|
<vendor>Tencent</vendor>
|
||||||
|
<name>TencentOS-tiny</name>
|
||||||
|
<description>TencentOS tiny for external devices</description>
|
||||||
|
<url>https://github.com/OpenAtomFoundation/TencentOS-tiny/tree/master/tools/mdk_pack/</url>
|
||||||
|
<license>LICENSE.txt</license>
|
||||||
|
<supportContact>1797878653@qq.com</supportContact>
|
||||||
|
<releases>
|
||||||
|
<release date="2020-10-03" version="1.0.0">Updated new pack:
|
||||||
|
(1) The package packages the TencentOS tiny operating system for the ARM Cortex-M0+, Cortex-M0, Cortex-M3, Cortex-M4, Cortex-M7, Cortex-M23 and Cortex-M33 cores, enabling quick installation of the TencentOS tiny corresponding kernel in a Keil project.
|
||||||
|
(2) The package can automatically adapt to the kernel selected for the project, and the arch file can be displayed automatically according to the kernel.
|
||||||
|
(3) When the user checks a component, the package will automatically indicate that other modules need to be checked, and can be checked with one click using Resolve in the interface.
|
||||||
|
(4) The user can modify the tos_config file of the corresponding kernel to tailor the functions of TencentOS tiny on their own.
|
||||||
|
(5) The package has been tested on STM32 CubeIDE 6.2.0, completed with core-based based chips and microcontroller development boards based on ARM Cortex-M0+, Cortex-M0, Cortex-M3, Cortex-M4, Cortex-M7, Cortex-M33 cores were ported.</release>
|
||||||
|
</releases>
|
||||||
|
<keywords>
|
||||||
|
<keyword>TencentOS tiny</keyword>
|
||||||
|
<keyword>ARM</keyword>
|
||||||
|
<keyword>STM32</keyword>
|
||||||
|
<keyword>CUBE_RULES_COMPLIANT</keyword>
|
||||||
|
<keyword>IMPLEMENTED_WITH_STM32CUBEMX</keyword>
|
||||||
|
</keywords>
|
||||||
|
<requirements>
|
||||||
|
<packages>
|
||||||
|
<package name="CMSIS" vendor="ARM" version="5.0.0-0"/>
|
||||||
|
</packages>
|
||||||
|
</requirements>
|
||||||
|
<conditions>
|
||||||
|
<condition id="Cortex_M0">
|
||||||
|
<require Dcore="Cortex-M0"/>
|
||||||
|
</condition>
|
||||||
|
<condition id="Cortex_M0plus">
|
||||||
|
<require Dcore="Cortex-M0+"/>
|
||||||
|
</condition>
|
||||||
|
<condition id="Cortex_M3">
|
||||||
|
<require Dcore="Cortex-M3"/>
|
||||||
|
</condition>
|
||||||
|
<condition id="Cortex_M4">
|
||||||
|
<require Dcore="Cortex-M4"/>
|
||||||
|
</condition>
|
||||||
|
<condition id="Cortex_M7">
|
||||||
|
<require Dcore="Cortex-M7"/>
|
||||||
|
</condition>
|
||||||
|
<condition id="Cortex_M23">
|
||||||
|
<require Dcore="Cortex-M23"/>
|
||||||
|
</condition>
|
||||||
|
<condition id="Cortex_M33">
|
||||||
|
<require Dcore="Cortex-M33"/>
|
||||||
|
</condition>
|
||||||
|
<condition id="tos_config_for_arm">
|
||||||
|
<require condition="example_mcu_platform"/>
|
||||||
|
<require condition="tencent_tiny_kernel_core_hal"/>
|
||||||
|
</condition>
|
||||||
|
<condition id="tencent_tiny_kernel_core_hal">
|
||||||
|
<require Cclass="TencentOS tiny" Cgroup="Kernel" Csub="core"/>
|
||||||
|
<require Cclass="TencentOS tiny" Cgroup="Kernel" Csub="hal"/>
|
||||||
|
</condition>
|
||||||
|
<condition id="tencent_tiny_kernel">
|
||||||
|
<require Cclass="TencentOS tiny" Cgroup="Kernel" Csub="core"/>
|
||||||
|
<require Cclass="TencentOS tiny" Cgroup="Kernel" Csub="hal"/>
|
||||||
|
</condition>
|
||||||
|
<condition id="example_mcu_platform">
|
||||||
|
<require Cclass="TencentOS tiny" Cgroup="Example" Csub="mcu_platform"/>
|
||||||
|
<require Cclass="TencentOS tiny" Cgroup="Example" Csub="mcu_it"/>
|
||||||
|
</condition>
|
||||||
|
<condition id="arch_for_cortex_m0plus">
|
||||||
|
<require condition="tencent_tiny_kernel"/>
|
||||||
|
<require condition="Cortex_M0plus"/>
|
||||||
|
<require condition="example_mcu_platform"/>
|
||||||
|
</condition>
|
||||||
|
<condition id="arch_for_cortex_m0">
|
||||||
|
<require condition="tencent_tiny_kernel"/>
|
||||||
|
<require condition="Cortex_M0"/>
|
||||||
|
<require condition="example_mcu_platform"/>
|
||||||
|
</condition>
|
||||||
|
<condition id="arch_for_cortex_m3">
|
||||||
|
<require condition="tencent_tiny_kernel"/>
|
||||||
|
<require condition="Cortex_M3"/>
|
||||||
|
<require condition="example_mcu_platform"/>
|
||||||
|
</condition>
|
||||||
|
<condition id="arch_for_cortex_m4">
|
||||||
|
<require condition="tencent_tiny_kernel"/>
|
||||||
|
<require condition="Cortex_M4"/>
|
||||||
|
<require condition="example_mcu_platform"/>
|
||||||
|
</condition>
|
||||||
|
<condition id="arch_for_cortex_m7">
|
||||||
|
<require condition="tencent_tiny_kernel"/>
|
||||||
|
<require condition="Cortex_M7"/>
|
||||||
|
<require condition="example_mcu_platform"/>
|
||||||
|
</condition>
|
||||||
|
<condition id="arch_for_cortex_m23">
|
||||||
|
<require condition="tencent_tiny_kernel"/>
|
||||||
|
<require condition="Cortex_M23"/>
|
||||||
|
<require condition="example_mcu_platform"/>
|
||||||
|
</condition>
|
||||||
|
<condition id="arch_for_cortex_m33">
|
||||||
|
<require condition="tencent_tiny_kernel"/>
|
||||||
|
<require condition="Cortex_M33"/>
|
||||||
|
<require condition="example_mcu_platform"/>
|
||||||
|
</condition>
|
||||||
|
</conditions>
|
||||||
|
<components>
|
||||||
|
<bundle Cbundle="ARM_pack" Cclass="TencentOS tiny" Cversion="1.0.0">
|
||||||
|
<description>TencentOS tiny for Cortex-M</description>
|
||||||
|
<doc>OpenAtomFoundation_TencentOS-tiny_ 腾讯物联网终端操作系统.html</doc>
|
||||||
|
<component Cgroup="Arch" Csub="Cortex_M0" Cvariant="armcc" condition="arch_for_cortex_m0" isDefaultVariant="true" maxInstances="1">
|
||||||
|
<description>arch for cortex_m0_armcc</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v6m/common/include/tos_cpu.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v6m/common/include/tos_cpu_def.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v6m/common/include/tos_cpu_types.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v6m/common/include/tos_fault.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v6m/common/tos_cpu.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v6m/common/tos_fault.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v6m/cortex-m0/armcc/port.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v6m/cortex-m0/armcc/port_c.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v6m/cortex-m0/armcc/port_config.h"/>
|
||||||
|
<file category="sourceAsm" name="Middlewares/Third_Party/Arch/arm/arm-v6m/cortex-m0/armcc/port_s.S"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Arch" Csub="Cortex_M0" Cvariant="gcc" condition="arch_for_cortex_m0" maxInstances="1">
|
||||||
|
<description>arch for cortex_m0_gcc</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v6m/common/include/tos_cpu.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v6m/common/include/tos_cpu_def.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v6m/common/include/tos_cpu_types.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v6m/common/include/tos_fault.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v6m/common/tos_cpu.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v6m/common/tos_fault.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v6m/cortex-m0/gcc/port.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v6m/cortex-m0/gcc/port_c.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v6m/cortex-m0/gcc/port_config.h"/>
|
||||||
|
<file category="sourceAsm" name="Middlewares/Third_Party/Arch/arm/arm-v6m/cortex-m0/gcc/port_s.S"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Arch" Csub="Cortex_M0" Cvariant="iccarm" condition="arch_for_cortex_m0" maxInstances="1">
|
||||||
|
<description>arch for cortex_m0_iccarm</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v6m/common/include/tos_cpu.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v6m/common/include/tos_cpu_def.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v6m/common/include/tos_cpu_types.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v6m/common/include/tos_fault.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v6m/common/tos_cpu.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v6m/common/tos_fault.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v6m/cortex-m0/iccarm/port.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v6m/cortex-m0/iccarm/port_c.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v6m/cortex-m0/iccarm/port_config.h"/>
|
||||||
|
<file category="sourceAsm" name="Middlewares/Third_Party/Arch/arm/arm-v6m/cortex-m0/iccarm/port_s.S"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Arch" Csub="Cortex_M0plus" Cvariant="armcc" condition="arch_for_cortex_m0plus" isDefaultVariant="true" maxInstances="1">
|
||||||
|
<description>arch for cortex_m0plus_armcc</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu_def.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu_types.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_fault.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/tos_cpu.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/tos_fault.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m0+/armcc/port.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m0+/armcc/port_c.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m0+/armcc/port_config.h"/>
|
||||||
|
<file category="sourceAsm" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m0+/armcc/port_s.S"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Arch" Csub="Cortex_M0plus" Cvariant="gcc" condition="arch_for_cortex_m0plus" maxInstances="1">
|
||||||
|
<description>arch for cortex_m0plus_gcc</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu_def.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu_types.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_fault.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/tos_cpu.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/tos_fault.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m0+/gcc/port.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m0+/gcc/port_c.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m0+/gcc/port_config.h"/>
|
||||||
|
<file category="sourceAsm" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m0+/gcc/port_s.S"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Arch" Csub="Cortex_M0plus" Cvariant="iccarm" condition="arch_for_cortex_m0plus" maxInstances="1">
|
||||||
|
<description>arch for cortex_m0plus_iccarm</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu_def.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu_types.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_fault.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/tos_cpu.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/tos_fault.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m0+/iccarm/port.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m0+/iccarm/port_c.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m0+/iccarm/port_config.h"/>
|
||||||
|
<file category="sourceAsm" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m0+/iccarm/port_s.S"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Arch" Csub="Cortex_M3" Cvariant="armcc" condition="arch_for_cortex_m3" isDefaultVariant="true" maxInstances="1">
|
||||||
|
<description>arch for cortex_m3_armcc</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu_def.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu_types.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_fault.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/tos_cpu.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/tos_fault.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m3/armcc/port.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m3/armcc/port_c.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m3/armcc/port_config.h"/>
|
||||||
|
<file category="sourceAsm" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m3/armcc/port_s.S"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Arch" Csub="Cortex_M3" Cvariant="gcc" condition="arch_for_cortex_m3" maxInstances="1">
|
||||||
|
<description>arch for cortex_m3_gcc</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu_def.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu_types.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_fault.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/tos_cpu.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/tos_fault.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m3/gcc/port.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m3/gcc/port_c.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m3/gcc/port_config.h"/>
|
||||||
|
<file category="sourceAsm" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m3/gcc/port_s.S"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Arch" Csub="Cortex_M3" Cvariant="iccarm" condition="arch_for_cortex_m3" maxInstances="1">
|
||||||
|
<description>arch for cortex_m3_iccarm</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu_def.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu_types.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_fault.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/tos_cpu.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/tos_fault.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m3/iccarm/port.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m3/iccarm/port_c.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m3/iccarm/port_config.h"/>
|
||||||
|
<file category="sourceAsm" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m3/iccarm/port_s.S"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Arch" Csub="Cortex_M4" Cvariant="armcc" condition="arch_for_cortex_m4" isDefaultVariant="true" maxInstances="1">
|
||||||
|
<description>arch for cortex_m4_armcc</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu_def.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu_types.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_fault.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/tos_cpu.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/tos_fault.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m4/armcc/port.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m4/armcc/port_c.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m4/armcc/port_config.h"/>
|
||||||
|
<file category="sourceAsm" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m4/armcc/port_s.S"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Arch" Csub="Cortex_M4" Cvariant="gcc" condition="arch_for_cortex_m4" maxInstances="1">
|
||||||
|
<description>arch for cortex_m4_gcc</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m4/gcc/port.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m4/gcc/port_c.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m4/gcc/port_config.h"/>
|
||||||
|
<file category="sourceAsm" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m4/gcc/port_s.S"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu_def.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu_types.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_fault.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/tos_cpu.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/tos_fault.c"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Arch" Csub="Cortex_M4" Cvariant="iccarm" condition="arch_for_cortex_m4" maxInstances="1">
|
||||||
|
<description>arch for cortex_m4_iccarm</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu_def.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu_types.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_fault.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/tos_cpu.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/tos_fault.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m4/iccarm/port.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m4/iccarm/port_c.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m4/iccarm/port_config.h"/>
|
||||||
|
<file category="sourceAsm" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m4/iccarm/port_s.S"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Arch" Csub="Cortex_M7" Cvariant="armcc" condition="arch_for_cortex_m7" isDefaultVariant="true" maxInstances="1">
|
||||||
|
<description>arch for cortex_m7_armcc</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m7/armcc/port.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m7/armcc/port_c.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m7/armcc/port_config.h"/>
|
||||||
|
<file category="sourceAsm" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m7/armcc/port_s.S"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu_def.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu_types.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_fault.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/tos_cpu.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/tos_fault.c"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Arch" Csub="Cortex_M7" Cvariant="gcc" condition="arch_for_cortex_m7" maxInstances="1">
|
||||||
|
<description>arch for cortex_m7_gcc</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu_def.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu_types.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_fault.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/tos_cpu.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/tos_fault.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m7/gcc/port.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m7/gcc/port_c.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m7/gcc/port_config.h"/>
|
||||||
|
<file category="sourceAsm" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m7/gcc/port_s.S"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Arch" Csub="Cortex_M7" Cvariant="iccarm" condition="arch_for_cortex_m7" maxInstances="1">
|
||||||
|
<description>arch for cortex_m7_iccarm</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu_def.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_cpu_types.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/include/tos_fault.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/tos_cpu.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/common/tos_fault.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m7/iccarm/port.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m7/iccarm/port_c.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m7/iccarm/port_config.h"/>
|
||||||
|
<file category="sourceAsm" name="Middlewares/Third_Party/Arch/arm/arm-v7m/cortex-m7/iccarm/port_s.S"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Arch" Csub="Cortex_M23" Cvariant="armcc" condition="arch_for_cortex_m23" isDefaultVariant="true" maxInstances="1">
|
||||||
|
<description>arch for cortex_m23_armcc</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/include/tos_cpu.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/include/tos_cpu_def.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/include/tos_cpu_types.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/include/tos_fault.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/tos_cpu.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/tos_fault.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/cortex-m23/armcc/port.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v8m/cortex-m23/armcc/port_c.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/cortex-m23/armcc/port_config.h"/>
|
||||||
|
<file category="sourceAsm" name="Middlewares/Third_Party/Arch/arm/arm-v8m/cortex-m23/armcc/port_s.S"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Arch" Csub="Cortex_M23" Cvariant="gcc" condition="arch_for_cortex_m23" maxInstances="1">
|
||||||
|
<description>arch for cortex_m23_gcc</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/include/tos_cpu.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/include/tos_cpu_def.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/include/tos_cpu_types.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/include/tos_fault.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/tos_cpu.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/tos_fault.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/cortex-m23/gcc/port.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v8m/cortex-m23/gcc/port_c.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/cortex-m23/gcc/port_config.h"/>
|
||||||
|
<file category="sourceAsm" name="Middlewares/Third_Party/Arch/arm/arm-v8m/cortex-m23/gcc/port_s.S"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Arch" Csub="Cortex_M23" Cvariant="iccarm" condition="arch_for_cortex_m23" maxInstances="1">
|
||||||
|
<description>arch for cortex_m23_iccarm</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/include/tos_cpu.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/include/tos_cpu_def.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/include/tos_cpu_types.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/include/tos_fault.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/tos_cpu.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/tos_fault.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/cortex-m23/iccarm/port.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v8m/cortex-m23/iccarm/port_c.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/cortex-m23/iccarm/port_config.h"/>
|
||||||
|
<file category="sourceAsm" name="Middlewares/Third_Party/Arch/arm/arm-v8m/cortex-m23/iccarm/port_s.S"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Arch" Csub="Cortex_M33" Cvariant="armcc" condition="arch_for_cortex_m33" isDefaultVariant="true" maxInstances="1">
|
||||||
|
<description>arch for cortex_m33_armcc</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/cortex-m33/armcc/port.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v8m/cortex-m33/armcc/port_c.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/cortex-m33/armcc/port_config.h"/>
|
||||||
|
<file category="sourceAsm" name="Middlewares/Third_Party/Arch/arm/arm-v8m/cortex-m33/armcc/port_s.S"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/include/tos_cpu.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/include/tos_cpu_def.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/include/tos_cpu_types.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/include/tos_fault.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/tos_cpu.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/tos_fault.c"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Arch" Csub="Cortex_M33" Cvariant="gcc" condition="arch_for_cortex_m33" maxInstances="1">
|
||||||
|
<description>arch for cortex_m33_gcc</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/include/tos_cpu.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/include/tos_cpu_def.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/include/tos_cpu_types.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/include/tos_fault.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/tos_cpu.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/tos_fault.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/cortex-m33/gcc/port.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v8m/cortex-m33/gcc/port_c.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/cortex-m33/gcc/port_config.h"/>
|
||||||
|
<file category="sourceAsm" name="Middlewares/Third_Party/Arch/arm/arm-v8m/cortex-m33/gcc/port_s.S"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Arch" Csub="Cortex_M33" Cvariant="iccarm" condition="arch_for_cortex_m33" maxInstances="1">
|
||||||
|
<description>arch for cortex_m33_iccarm</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/include/tos_cpu.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/include/tos_cpu_def.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/include/tos_cpu_types.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/include/tos_fault.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/tos_cpu.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v8m/common/tos_fault.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/cortex-m33/iccarm/port.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Arch/arm/arm-v8m/cortex-m33/iccarm/port_c.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Arch/arm/arm-v8m/cortex-m33/iccarm/port_config.h"/>
|
||||||
|
<file category="sourceAsm" name="Middlewares/Third_Party/Arch/arm/arm-v8m/cortex-m33/iccarm/port_s.S"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Cmsis_os" Csub="cmsis_os" condition="tencent_tiny_kernel" maxInstances="1">
|
||||||
|
<description>cmsis_os</description>
|
||||||
|
<files>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Cmsis_os/cmsis_os.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Cmsis_os/cmsis_os.h"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Cmsis_os" Csub="cmsis_os2" condition="tencent_tiny_kernel" maxInstances="1">
|
||||||
|
<description>cmsis_os_2</description>
|
||||||
|
<files>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Cmsis_os/cmsis_os2.c"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Cmsis_os/cmsis_os2.h"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Kernel" Csub="hal" maxInstances="1">
|
||||||
|
<description>kernel_hal</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/hal/include/tos_hal.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/hal/include/tos_hal_sd.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/hal/include/tos_hal_uart.h"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Kernel" Csub="core" maxInstances="1">
|
||||||
|
<description>kernel_core</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_barrier.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_binary_heap.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_bitmap.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_char_fifo.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_compiler.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_completion.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_config_check.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_config_default.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_countdownlatch.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_event.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_global.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_k.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_kerr.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_klib.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_ktypes.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_list.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_mail_queue.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_message_queue.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_mmblk.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_mmheap.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_mutex.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_pend.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_priority_mail_queue.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_priority_message_queue.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_priority_queue.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_ring_queue.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_robin.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_rwlock.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_sched.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_sem.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_slist.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_stopwatch.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_sys.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_task.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_tick.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_time.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_timer.h"/>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Kernel/core/include/tos_version.h"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Kernel/core/tos_barrier.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Kernel/core/tos_binary_heap.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Kernel/core/tos_bitmap.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Kernel/core/tos_char_fifo.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Kernel/core/tos_completion.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Kernel/core/tos_countdownlatch.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Kernel/core/tos_event.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Kernel/core/tos_global.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Kernel/core/tos_mail_queue.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Kernel/core/tos_message_queue.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Kernel/core/tos_mmblk.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Kernel/core/tos_mmheap.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Kernel/core/tos_mutex.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Kernel/core/tos_pend.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Kernel/core/tos_priority_mail_queue.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Kernel/core/tos_priority_message_queue.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Kernel/core/tos_priority_queue.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Kernel/core/tos_ring_queue.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Kernel/core/tos_robin.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Kernel/core/tos_rwlock.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Kernel/core/tos_sched.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Kernel/core/tos_sem.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Kernel/core/tos_stopwatch.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Kernel/core/tos_sys.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Kernel/core/tos_task.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Kernel/core/tos_tick.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Kernel/core/tos_time.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Kernel/core/tos_timer.c"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Example" Csub="helloworld_main" maxInstances="1">
|
||||||
|
<description>helloworld.c and main.c</description>
|
||||||
|
<files>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Example/hello_world.c"/>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Example/main_example.c"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Example" Csub="mcu_it" maxInstances="1">
|
||||||
|
<description>Interrupt function modification</description>
|
||||||
|
<files>
|
||||||
|
<file category="source" name="Middlewares/Third_Party/Example/mcu_it.c"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Example" Csub="mcu_platform" Cvariant="Cortex_M0" condition="Cortex_M0" maxInstances="1">
|
||||||
|
<description>mcu_platform.h</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Example/mcu_platform_M0.h"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Example" Csub="mcu_platform" Cvariant="Cortex_M0plus" condition="Cortex_M0plus" maxInstances="1">
|
||||||
|
<description>mcu_platform.h</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Example/mcu_platform_M0plus.h"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Example" Csub="mcu_platform" Cvariant="Cortex_M3" condition="Cortex_M3" maxInstances="1">
|
||||||
|
<description>mcu_platform.h</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Example/mcu_platform_M3.h"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Example" Csub="mcu_platform" Cvariant="Cortex_M4" condition="Cortex_M4" maxInstances="1">
|
||||||
|
<description>mcu_platform.h</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Example/mcu_platform_M4.h"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Example" Csub="mcu_platform" Cvariant="Cortex_M7" condition="Cortex_M7" maxInstances="1">
|
||||||
|
<description>mcu_platform.h</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Example/mcu_platform_M7.h"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
<component Cgroup="Example" Csub="mcu_platform" Cvariant="Cortex_M33" condition="Cortex_M33" maxInstances="1">
|
||||||
|
<description>mcu_platform.h</description>
|
||||||
|
<files>
|
||||||
|
<file category="header" name="Middlewares/Third_Party/Example/mcu_platform_M33.h"/>
|
||||||
|
</files>
|
||||||
|
</component>
|
||||||
|
</bundle>
|
||||||
|
</components>
|
||||||
|
</package>
|
908
tools/mdk_pack/Documentation/README.md
Normal file
@@ -0,0 +1,908 @@
|
|||||||
|

|
||||||
|
|
||||||
|
# 基于MDK开发的TencentOS-Tiny Software Pack
|
||||||
|
|
||||||
|
TencentOS-Tiny software package based on MDK development
|
||||||
|
|
||||||
|
[(English Documents Available)](README_EN.md)
|
||||||
|
|
||||||
|
2021/9/3
|
||||||
|
|
||||||
|
东南大学
|
||||||
|
|
||||||
|
导师:汪礼超
|
||||||
|
|
||||||
|
学员:崔林威
|
||||||
|
|
||||||
|
Email:1797878653@qq.com
|
||||||
|
|
||||||
|
<https://github.com/OpenAtomFoundation/TencentOS-tiny>
|
||||||
|
|
||||||
|
目录
|
||||||
|
|
||||||
|
[1、ARM软件包介绍](#1arm软件包介绍)
|
||||||
|
|
||||||
|
[1.1 软件包简介](#11-软件包简介)
|
||||||
|
|
||||||
|
[1.2 软件包开发](#12-软件包开发)
|
||||||
|
|
||||||
|
[1.2.1 软件包开发过程](#121-软件包开发过程)
|
||||||
|
|
||||||
|
[1.2.2 PDSC文件的编写](#122-pdsc文件的编写)
|
||||||
|
|
||||||
|
[1.2.3 生成软件包](#123-生成软件包)
|
||||||
|
|
||||||
|
[2、TencentOS-tiny软件包](#2tencentos-tiny软件包)
|
||||||
|
|
||||||
|
[2.1 软件包内容](#21-软件包内容)
|
||||||
|
|
||||||
|
[2.2 软件包安装](#22-软件包安装)
|
||||||
|
|
||||||
|
[3、软件包测试](#3软件包测试)
|
||||||
|
|
||||||
|
[3.1 ARM内核移植TencentOS tiny软件包](#31-arm内核移植tencentos-tiny软件包)
|
||||||
|
|
||||||
|
[3.2 STM32不依赖裸机工程移植](#32-stm32不依赖裸机工程移植)
|
||||||
|
|
||||||
|
[3.3 单片机裸机工程移植](#33-单片机裸机工程移植)
|
||||||
|
|
||||||
|
[4、总结](#4总结)
|
||||||
|
|
||||||
|
[5、开发参考](#5开发参考)
|
||||||
|
|
||||||
|
[6、附录-移植配置参考](#6附录-移植配置参考)
|
||||||
|
|
||||||
|
[6.1 MDK5.14版本移植到ARM内核](#61-mdk514版本移植到arm内核)
|
||||||
|
|
||||||
|
[6.1.1 Cortex-M0内核移植](#611-cortex-m0内核移植)
|
||||||
|
|
||||||
|
[6.1.2 Cortex-M0+内核移植](#612-cortex-m0内核移植)
|
||||||
|
|
||||||
|
[6.1.3 Cortex-M3内核移植](#613-cortex-m3内核移植)
|
||||||
|
|
||||||
|
[6.1.4 Cortex-M4内核移植](#614-cortex-m4内核移植)
|
||||||
|
|
||||||
|
[6.1.5 Cortex-M7内核移植](#615-cortex-m7内核移植)
|
||||||
|
|
||||||
|
[6.2 MDK5.14版本移植到基于ARM内核的芯片](#62-mdk514版本移植到基于arm内核的芯片)
|
||||||
|
|
||||||
|
[6.2.1 移植到stm32f103c8芯片](#621-移植到stm32f103c8芯片)
|
||||||
|
|
||||||
|
[6.2.2 移植到stm32f767igt芯片](#622-移植到stm32f767igt芯片)
|
||||||
|
|
||||||
|
[6.3
|
||||||
|
MDK5.30和MDK5.35版本移植(Cortex-M0+、0、3、4、7内核和芯片)](#63-mdk530和mdk535版本移植cortex-m00347内核和芯片)
|
||||||
|
|
||||||
|
[6.4
|
||||||
|
MDK5.30和MDK5.35版本移植(Cortex-M23、33)](#64-mdk530和mdk535版本移植cortex-m2333)
|
||||||
|
|
||||||
|
[6.4.1 Cortex-M23内核移植](#641-cortex-m23内核移植)
|
||||||
|
|
||||||
|
[6.4.2 Cortex-M33内核移植](#642-cortex-m33内核移植)
|
||||||
|
|
||||||
|
# 1、ARM软件包介绍
|
||||||
|
|
||||||
|
## 1.1 软件包简介
|
||||||
|
|
||||||
|
在进行嵌入式软件开发时,ARM为我们提供了软件包功能,能够将软件算法等模块进行集成封装,从而方便第三方用户使用。ARM软件包能够为微控制器设备和开发板提供支持,包含软件组件(Software
|
||||||
|
Component)如驱动程序和中间件,还可以包含示例项目和代码模板等,主要有以下类型的软件包:
|
||||||
|
|
||||||
|
(1) 器件系列包(Device Family
|
||||||
|
Pack):由硅供应商或工具供应商生成,为特定的目标微控制器创建软件应用提供支持;
|
||||||
|
|
||||||
|
(2) 板级支持包(Board Support
|
||||||
|
Pack):由电路板供应商发布,为安装在电路板上的外围硬件提供软件支持。
|
||||||
|
|
||||||
|
(3) CMSIS软件包:由ARM提供,包括对CMSIS核心、DSP和RTOS的支持;
|
||||||
|
|
||||||
|
(4) 中间件包(Middleware
|
||||||
|
Pack):由芯片供应商、工具供应商或第三方创建;通过提供对常用软件组件(如软件堆栈、特殊硬件库等)的软件集成,从而减少开发时间;
|
||||||
|
|
||||||
|
(5) 内部组件(In-house components):由工具用户开发,用于内部或外部分发。
|
||||||
|
|
||||||
|
软件组件包括以下几部分:
|
||||||
|
|
||||||
|
(1) 源代码、库、头文件/配置文件和文档;
|
||||||
|
|
||||||
|
(2) 完整的示例项目,展示了软件组件的使用,可以下载并在评估硬件上执行;
|
||||||
|
|
||||||
|
(3) 代码模板,方便使用软件组件。
|
||||||
|
|
||||||
|
一个完整的软件包是一个ZIP文件,包含所有需要的软件库和文件,以及一个包含软件包所有信息的包描述文件(PDSC文件),软件包的结构是在CMSIS中定义的(<http://www.keil.com/CMSIS/Pack>)。
|
||||||
|
|
||||||
|
## 1.2 软件包开发
|
||||||
|
|
||||||
|
### 1.2.1 软件包开发过程
|
||||||
|
|
||||||
|
软件包的开发过程相当于完成了一项产品的制作,因此引入产品生命周期管理(PLM)的概念,PLM包括以下四个阶段:(1)概念的产生,基于软件包需求进行产品定义,并创建第一个功能原型;(2)设计,根据技术特征和要求,进行原型测试和产品的实施,通过广泛的测试验证产品的功能与规格;(3)发布,产品被制造出来并推向市场;(4)服务,对产品的维护,包括对客户的支持,最后不断优化,结束产品的周期。
|
||||||
|
|
||||||
|
在制作软件包时,主要面临以下几个过程:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图1.1 软件包开发流程
|
||||||
|
|
||||||
|
首先,根据特定组件生成软件包即根据需求将相应的头文件、库文件等软件组件利用PDSC文件进行组织,在组织完成后即可利用软件包生成工具生成对应版本的软件包,然后对新生成的软件包进行测试,给出示例测试程序,再将其包含如PDSC文件中,最后经测试完成后生成最终的软件包。
|
||||||
|
|
||||||
|
### 1.2.2 PDSC文件的编写
|
||||||
|
|
||||||
|
PDSC文件时基于可扩展标记语言(XML)进行编写的,能够将软件包包含的各个模块按照特定的格式组织起来,接下来按照PDSC文件的结构对文件的编写进行详细介绍:
|
||||||
|
|
||||||
|
首先是PDSC文件的开头,前两句是声明为XML格式,它是在MDK中的PACK.xsd文件定义的,所以不用修改;\<name\>和\<vendor\>标签定义了软件包的基本内容,也用于PACK文件的文件名,故该PDSC文件应命名为Tencent.TencentOS-tiny.pdsc;\<
|
||||||
|
description
|
||||||
|
\>标签描述了软件包的信息,它将显示在包安装程序中;\<url\>标签可以包含一个带有软件包下载链接的网址,方便用户下载;\<
|
||||||
|
license \>标签包含了用户使用该软件包时需要遵守的协议,\< supportContact
|
||||||
|
\>标签表示软件包的支持人员联系方式,可以提供一个电子邮件地址或网页URL。如图1.2为下列代码对应的软件包界面。
|
||||||
|
|
||||||
|
\<?xml version="1.0" encoding="utf-8"?\>
|
||||||
|
|
||||||
|
\<package schemaVersion="1.0"
|
||||||
|
xmlns:xs=<http://www.w3.org/2001/XMLSchema-instance>
|
||||||
|
xs:noNamespaceSchemaLocation="PACK.xsd"\>
|
||||||
|
|
||||||
|
\<name\>Tencent\</name\>
|
||||||
|
|
||||||
|
\<description\>Description of your pack\</description\>
|
||||||
|
|
||||||
|
\<vendor\>TencentOS-tiny\</vendor\>
|
||||||
|
|
||||||
|
\<url\>[https://github.com/OpenAtomFoundation/TencentOS-tiny\</url](https://github.com/OpenAtomFoundation/TencentOS-tiny%3c/url)\>
|
||||||
|
|
||||||
|
\<license\>LICENSE.txt\</license\>
|
||||||
|
|
||||||
|
\<supportContact\>…\</supportContact\>
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图1.2 程序对应的软件包
|
||||||
|
|
||||||
|
接下来是PDSC文件的各个模块,\<releases\>标签定义了软件包的版本,开发者可以在版本更新时在此进行标注,从而在生成软件包时,系统会自动生成最新版本的软件包;
|
||||||
|
|
||||||
|
\<releases\>
|
||||||
|
|
||||||
|
\<release version=**"1.0.1"**\>
|
||||||
|
|
||||||
|
Sep/3/2021, version name
|
||||||
|
|
||||||
|
\</release\>
|
||||||
|
|
||||||
|
\<release version=**"1.0.0"**\>
|
||||||
|
|
||||||
|
Sep/1/2021, version name
|
||||||
|
|
||||||
|
\</release\>
|
||||||
|
|
||||||
|
\</releases\>
|
||||||
|
|
||||||
|
\<taxonomy\>标签用于定义每个组件的description,如图1.3所示,通过下列代码中的Cclass、Cgroup和Csub来确定description所在的位置,doc用于指定description文件(也可以不加),然后添加description的名字。
|
||||||
|
|
||||||
|
\<taxonomy\>
|
||||||
|
|
||||||
|
\<description Cclass="TencentOS tiny" Cgroup="xx" Csub="xx"
|
||||||
|
doc="examples/index.html"\>TencentOS tiny\</description\> \<!—添加网页功能 --\>
|
||||||
|
|
||||||
|
\</taxonomy\>
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图1.3 \<taxonomy\>标签
|
||||||
|
|
||||||
|
\< keywords
|
||||||
|
\>标签定义了软件包的关键词,在ARM官网下载软件包时可利用关键词搜索到需要的软件包。
|
||||||
|
|
||||||
|
\<keywords \>
|
||||||
|
|
||||||
|
\<keyword\>Tencent\</keyword\>
|
||||||
|
|
||||||
|
\</keywords \>
|
||||||
|
|
||||||
|
\< requirements
|
||||||
|
\>标签定义了软件包的关联安装需求,即在安装本软件包时,还需要在网上安装其他包(网址:MDK5
|
||||||
|
Software Packs (keil.com)),例如下面的定义则需要我们安装ARM的CMSIS5.7.0软件包。
|
||||||
|
|
||||||
|
\<requirements\>
|
||||||
|
|
||||||
|
\<packages\>
|
||||||
|
|
||||||
|
\<package vendor="ARM" name="CMSIS" version="5.7.0"/\>
|
||||||
|
|
||||||
|
\</packages\>
|
||||||
|
|
||||||
|
\</requirements\>
|
||||||
|
|
||||||
|
接下来是\<conditions\>标签,该标签在设计\<components\>时使用,用以说明软件包中各个组件的依赖关系,即使用本组件还需要选择其他组件。在该标签下可以定义多个condition,每个condition可以定义多个条件。其中\<conditions
|
||||||
|
id\>表示条件名,\<description\>为条件信息,然后便是定义的条件,其中\<accept\>表示该条件时可选的,当同时存在多个\<accept\>时,用户需要至少满足其中一个条件才可以使用;\<require\>表示该条件是必选的,否则便无法使用相应的组件。在条件内部,包含一些特定的指示性语法,如果在设计\<component\>的时候开发者选择了名为Cortex_M0的条件,那么用户在使用该\<component\>时,则需要遵守条件要求:其中\<accept
|
||||||
|
Dvendor="ARM:82" Dname="ARMCM0"/\>表示用户选择ARM-Cortex
|
||||||
|
M0内核时才会触发该条件,\<require condition="condition id
|
||||||
|
"/\>为条件嵌套,表示用户还需要满足嵌套条件对应的要求,\<require
|
||||||
|
Cclass="TencentOS tiny" Cgroup="kernel"
|
||||||
|
Csub="core"/\>表示用户还需要选择core组件。
|
||||||
|
|
||||||
|
\<conditions\>
|
||||||
|
|
||||||
|
\<condition id="Cortex_M0"\>
|
||||||
|
|
||||||
|
\<description\> Cortex-M0\</description\>
|
||||||
|
|
||||||
|
\<accept Dvendor="ARM:82" Dname="ARMCM0"/\>
|
||||||
|
|
||||||
|
\<require condition="condition id "/\>
|
||||||
|
|
||||||
|
\< require Tcompiler="ARMCC"/\>
|
||||||
|
|
||||||
|
\<require Cclass="TencentOS tiny" Cgroup="kernel" Csub="core"/\>
|
||||||
|
|
||||||
|
\</condition\>
|
||||||
|
|
||||||
|
\<condition id=" condition_2 "\>
|
||||||
|
|
||||||
|
\<description\>\</description\>
|
||||||
|
|
||||||
|
\<!-- 第二个condition的内容 --\>
|
||||||
|
|
||||||
|
\</condition\>
|
||||||
|
|
||||||
|
\</conditions\>
|
||||||
|
|
||||||
|
然后是\<components\>标签,该标签描述了软件包包含的所有文件,在编写该标签下的程序时,需要按照文件类别将文件进行划分,在下列代码中,定义了一个Keil::
|
||||||
|
TencentOS tiny::
|
||||||
|
arch::arch的\<component\>,\<description\>为该组件的信息,具体如图1.4所示。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图1.4 \<component\>定义界面
|
||||||
|
|
||||||
|
\<components\>
|
||||||
|
|
||||||
|
\<component Cvendor="Keil" Cclass="TencentOS tiny" Cgroup="arch" Csub="arch"
|
||||||
|
Cversion="1.0.1" condition=" condition id"\>
|
||||||
|
|
||||||
|
\<description\> description \</description\>
|
||||||
|
|
||||||
|
\<files\>
|
||||||
|
|
||||||
|
\<file category="doc" name="Documentation/General/html/driver_I2C.html"/\>--\>
|
||||||
|
|
||||||
|
\<file category="include" name="arch/arm/arm-v7m/common/include/"/\>
|
||||||
|
|
||||||
|
\<file category="header" name="arch/arm/arm-v7m/cortex-m0+/armcc/port.h"/\>
|
||||||
|
|
||||||
|
\<file category="header" name="arch/arm/arm-v7m/cortex-m0+/armcc/port_config.h"
|
||||||
|
attr="config"
|
||||||
|
|
||||||
|
version="1.1.0"/\>
|
||||||
|
|
||||||
|
\<file category="source" name="arch/arm/arm-v7m/common/tos_cpu.c"/\>
|
||||||
|
|
||||||
|
\</files\>
|
||||||
|
|
||||||
|
\</component\>
|
||||||
|
|
||||||
|
\</components\>
|
||||||
|
|
||||||
|
condition=" condition
|
||||||
|
id"即为上述介绍的\<condition\>标签,从而用户在使用该组件时,还需要满足condition所要求的依赖组件。另外,在定义某一个\<component\>时,需要按照上面程序的\<files\>…\</files\>语法进行文件添加,其中file
|
||||||
|
category的定义如表1-1所示,在name中可以添加文件路径和具体的某个文件,在软件包中,我们添加的文件默认是不可编辑的,为了方便用户对文件进行进行配置,我们需要添加attr="config"属性,并可通过version更新不同版本的文件。
|
||||||
|
|
||||||
|
表1-1 file category定义
|
||||||
|
|
||||||
|
| category | 含义 |
|
||||||
|
|----------|------------------------------|
|
||||||
|
| doc | 文件,可以是网页或者其他链接 |
|
||||||
|
| include | 包含某一个路径下的所有头文件 |
|
||||||
|
| header | 包含某路径下的具体头文件 |
|
||||||
|
| source | .c源文件 |
|
||||||
|
|
||||||
|
为了使我们设计的软件包能够适配不同的内核,即在使用软件包时与用户ARM核不一致的文件都不出现,可以按如下步骤进行\<files\>的添加:(1)在condition条件中,加入\<require
|
||||||
|
Dvendor="ARM:82" Dname="ARMCM0"/\>这样的程序,该程序表示需要用户选择ARM
|
||||||
|
Cortex-M0内核才会触发该条件;(2)在添加\<files\>时,我们可以将针对不同内核,同一类型文件的Cgroup和Csub保持同样的名字,并添加上(1)中定义的condition,这样用户选择不同内核时,将只会出现与用户内核一致的文件。
|
||||||
|
|
||||||
|
同时,如果需要在PDSC文件中定义多个软件包,可以采用下列代码结构,其中每一个\<bundle\>标签定义了一个软件包。
|
||||||
|
|
||||||
|
\<components\>
|
||||||
|
|
||||||
|
\<bundle Cbundle="MDK-ARM" Cclass="TencentOS tiny" Cversion="1.0.0"\>
|
||||||
|
|
||||||
|
\<description\>TencentOS tiny\</description\>
|
||||||
|
|
||||||
|
\<doc\>examples/index.html\</doc\> \<!—添加网页功能 --\>
|
||||||
|
|
||||||
|
\<component
|
||||||
|
|
||||||
|
\<!-- 组件内容 --\>
|
||||||
|
|
||||||
|
\</component\>
|
||||||
|
|
||||||
|
\</bundle\>
|
||||||
|
|
||||||
|
\<bundle Cbundle="MDK-ARM" Cclass="TencentOS tiny" Cversion="1.0.0"\>
|
||||||
|
|
||||||
|
\<description\>TencentOS tiny\</description\>
|
||||||
|
|
||||||
|
\<doc\>examples/index.html\</doc\>
|
||||||
|
|
||||||
|
\<component
|
||||||
|
|
||||||
|
\<!-- 组件内容 --\>
|
||||||
|
|
||||||
|
\</component\>
|
||||||
|
|
||||||
|
\</bundle\>
|
||||||
|
|
||||||
|
\</components\>
|
||||||
|
|
||||||
|
另外,PDSC文件还可以包含\<devices\>、\<apis\>、\<boards\>和\<examples\>,这些为ARM公司或者其他器件、开发板厂商提供,为针对器件、api库文件、板级和相应的示例文件,具体可以参阅ARM
|
||||||
|
CMSIS的软件包。
|
||||||
|
|
||||||
|
最后,PDSC文件后还需要在最后加上\</package\>,表示该文件的结束,从而完成PDSC文件的编写。
|
||||||
|
|
||||||
|
### 1.2.3 生成软件包
|
||||||
|
|
||||||
|
在完成PDSC文件的编写后,为了生成最终的软件包,还需要准备如图1.5所示的3个文件,其中PackChk.exe用于验证软件包包含的文件是否都存在,即是否完整;gen_pack.bat为Windows批处理文件,需要我们对文件中的路径进行修改,并用于生成软件包;PACK.xsd是schema,主要用来制定XML规范,用以验证我们编写的PDSC文件。另外,还需要准备7-Zip
|
||||||
|
File Manager软件,用于对文件进行压缩,制作集成的软件包。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图1.5 生成软件包所需的软件配置
|
||||||
|
|
||||||
|
首先利用记事本或Notepad++打开gen_pack.bat,对以下几个地方需要修改,如表1-2所示:
|
||||||
|
|
||||||
|
SET ZIPPATH=C:\\Program Files\\7-Zip
|
||||||
|
|
||||||
|
SET RELEASE_PATH=..\\Local_Release
|
||||||
|
|
||||||
|
SET PACK_VENDOR=Tencent
|
||||||
|
|
||||||
|
SET PACK_NAME=TencentOS-tiny
|
||||||
|
|
||||||
|
SET PACK_FOLDER_LIST=arch osal kernel examples
|
||||||
|
|
||||||
|
SET PACK_FILE_LIST=%PACK_VENDOR%.%PACK_NAME%.pdsc README.md LICENSE.txt
|
||||||
|
|
||||||
|
表1-2 gen_pack.bat修改内容
|
||||||
|
|
||||||
|
| 代码 | 含义 |
|
||||||
|
|----------------------|----------------------------------|
|
||||||
|
| SET ZIPPATH | 7-Zip File Manager软件的安装路径 |
|
||||||
|
| SET RELEASE_PATH | 生成的软件包路径,为相对路径 |
|
||||||
|
| SET PACK_VENDOR | PDSC文件中的\<vendor\>标签 |
|
||||||
|
| SET PACK_NAME | PDSC文件中的\<name\>标签 |
|
||||||
|
| SET PACK_FOLDER_LIST | 软件包包含文件所在路径 |
|
||||||
|
| SET PACK_FILE_LIST | README.md LICENSE.txt所在路径 |
|
||||||
|
|
||||||
|
修改完毕gen_pack.bat后,便可以制作软件包了,首先利用cmd打开电脑的命令行界面,执行cd命令转到gen_pack.bat所在的路径,然后输入gen_pack.bat点击enter,如图1.6所示,gen_pack.bat会按照顺序压缩文件,然后读取PDSC文件,检查数据完整性和文件依赖是否完整,然后生成软件包,当提示gen_pack.bat
|
||||||
|
completed sucessfully后就完成了软件报的创建。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图1.6 软件包生成界面
|
||||||
|
|
||||||
|
此时在Local_Release路径下,可以看到生成的软件包。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图1.7 软件包
|
||||||
|
|
||||||
|
# 2、TencentOS-tiny软件包
|
||||||
|
|
||||||
|
腾讯物联网操作系统(TencentOS
|
||||||
|
tiny)是腾讯面向物联网领域开发的实时操作系统,具有低功耗,低资源占用,模块化,可裁剪等特性。TencentOS
|
||||||
|
tiny提供了最精简的 RTOS 内核,内核组件可裁剪可配置,可灵活移植到多种终端 MCU
|
||||||
|
上。而且,基于RTOS内核,提供了 COAP/MQTT/TLS/DTLS
|
||||||
|
等常用物联网协议栈及组件,方便用户快速接入腾讯云物联网通信 IoT
|
||||||
|
Hub。同时,TencentOS tiny
|
||||||
|
为物联网终端厂家提供一站式软件解决方案,方便各种物联网设备快速接入腾讯云,可支撑智慧城市、智能水表、智能家居、智能穿戴、车联网等多种行业应用。
|
||||||
|
|
||||||
|
因此,为了有效减少开发人员在移植TencentOS
|
||||||
|
tiny到ARM内核单片机上的开发时间,本文基于MDK完成了第三方TencentOS Tiny
|
||||||
|
pack和软件包的封装,能够使用MDK pack直接生成适合不同MCU的TencentOS Tiny工程。
|
||||||
|
|
||||||
|
## 2.1 软件包内容
|
||||||
|
|
||||||
|
结合TencentOS tiny的算法架构,本文设计的软件包包括如表2-1所示的内容:
|
||||||
|
|
||||||
|
表2-1 软件包内容
|
||||||
|
|
||||||
|
| 内容 | 功能 | |
|
||||||
|
|----------|-------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------|
|
||||||
|
| arch | 包括TencentOS-tiny\\arch\\arm下内核为Cortex-M0+、Cortex-M0、Cortex-M3、Cortex-M4、Cortex-M7、Cortex-M23、Cortex-M33的arch文件 | |
|
||||||
|
| kernel | 包括TencentOS-tiny\\kernel下的core、hal路径中的文件、tos_config文件 | |
|
||||||
|
| cmsis_os | 对应TencentOS-tiny\\osal\\cmsis_os的文件 | |
|
||||||
|
| example | helloworld_main | 用于测试软件包的main文件 |
|
||||||
|
| | mcu_it.c | 移植软件包时需要按照该文件对中断函数进行修改 |
|
||||||
|
| | mcu_platform.h | 用户可在此文件在添加对应单片机的头文件 |
|
||||||
|
|
||||||
|
软件包具有以下功能:
|
||||||
|
|
||||||
|
(1)软件包针对ARMCortex-M0+、Cortex-M0、Cortex-M3、Cortex-M4、Cortex-M7、Cortex-M23和Cortex-M33内核进行了TencentOS
|
||||||
|
tiny软件的封装,用户在安装软件包后能够快速将TencentOS tiny相应内核的Keil工程中;
|
||||||
|
|
||||||
|
(2)软件包能够自动适应用户所选的内核,arch文件能够根据内核自动显示,从而方便用户使用;
|
||||||
|
|
||||||
|
(3)用户在勾选一个组件时,软件包会自动提示还需要勾选其他模块,并可利用界面中的Resolve一键勾选,防止遗漏;
|
||||||
|
|
||||||
|
(4)用户可自主修改对应内核的tos_config文件,对TencentOS tiny的功能进行裁剪。
|
||||||
|
|
||||||
|
## 2.2 软件包安装
|
||||||
|
|
||||||
|
接下来介绍Tencent.TencentOS-tiny软件包的安装,首先双击图1.5中的软件包,然后进入安装界面,如图2.1(a),点击I
|
||||||
|
agree to all the terms of the preceding License
|
||||||
|
Agreement,再点击next进行安装,安装完成界面如图2.1(b)所示;
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
(a) (b)
|
||||||
|
|
||||||
|
图2.1 安装界面
|
||||||
|
|
||||||
|
此时软件包已经安装到Keil 5之中,打开Keil 5软件,并点击Pack
|
||||||
|
Installer图标,可以进行不同软件包版本的安装与移除:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图2.2 Pack Installer界面
|
||||||
|
|
||||||
|
接下来就可以安装Tencent.TencentOS-tiny软件包中的组件,点击Manage Run-Time
|
||||||
|
Environment图标,对需要从软件包中移植的文件进行勾选,如图2.3所示,如果有依赖可以点击Resolve进行一键安装。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图2.3 Manage Run-Time Environment界面
|
||||||
|
|
||||||
|
# 3、软件包测试
|
||||||
|
|
||||||
|
## 3.1 ARM内核移植TencentOS tiny软件包
|
||||||
|
|
||||||
|
首先在[MDK5 Software Packs
|
||||||
|
(keil.com)](https://www.keil.com/dd2/pack/#!#eula-container)下载安装ARM
|
||||||
|
CMSIS-5.7.0软件包,以便在不同内核下测试本软件包。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.1 ARM CMSIS-5.7.0软件包
|
||||||
|
|
||||||
|
在安装完软件包后,以ARM
|
||||||
|
Cortex-M3内核为例对软件包进行移植,并进行编译,首先利用Keil5-5.30版本软件新建工程,并选择ARMCM3,如图3.2所示,然后按照图3.3勾选相应的TencentOS-tiny组件和Cortex-M3内核文件,可以看到arch和tos_config都已经根据内核进行了自动适配。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.2勾选内核
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.3勾选组件
|
||||||
|
|
||||||
|
接下来点击Options for target,选中默认编译版本5,然后选择C99 mode。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.4 Options for target
|
||||||
|
|
||||||
|
然后在mcu_platform.h中添加\#include "ARMCM3.h"和\#include "core_cm3.h"头文件。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.5 添加对应内核的头文件
|
||||||
|
|
||||||
|
最后点击Build图标进行测试,如图3.6所示:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.6 编译测试
|
||||||
|
|
||||||
|
与之类似,如果要在ARM
|
||||||
|
Cortex-M4内核下对本软件包进行测试,只需要在上述步骤修改mcu_platform.h中的头文件为\#include
|
||||||
|
"ARMCM4.h"和\#include "core_cm4.h"即可,如果是其他内核则对应修改头文件。
|
||||||
|
|
||||||
|
## 3.2 STM32不依赖裸机工程移植
|
||||||
|
|
||||||
|
接下来选取具体单片机芯片,进行软件包的测试,按照以下步骤:
|
||||||
|
|
||||||
|
在网站MDK5 Software Packs
|
||||||
|
(keil.com)上下载STM32F1的软件支持包,如图3.7所示,并进行安装。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.7 STM32软件支持包
|
||||||
|
|
||||||
|
新建工程,选择芯片为STM32F103C8,如图3.8所示,然后点击ok,按照图3.9所示,选择TencentOS-tiny软件包的组件和STM32的启动文件。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.8 选择STM32F103C8芯片
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.9 选择组件
|
||||||
|
|
||||||
|
然后按照图3.10(a)所示勾选编译版本5,并选择C99mode。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
(a)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
(b)
|
||||||
|
|
||||||
|
图3.10 软件设置
|
||||||
|
|
||||||
|
然后按照图3.11,在mcu_platform.h中添加以下头文件:
|
||||||
|
|
||||||
|
\#include "stm32f10x.h"
|
||||||
|
|
||||||
|
\#include "core_cm3.h"
|
||||||
|
|
||||||
|
\#include "system_stm32f10x.h"
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.11 修改mcu_platform.h
|
||||||
|
|
||||||
|
最后点击Build编译,没有报错则移植成功。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.12 编译界面
|
||||||
|
|
||||||
|
## 3.3 单片机裸机工程移植
|
||||||
|
|
||||||
|
最后对单片机开发板进行测试,以正点原子探索者STM32F407ZGT6为例介绍TencentOS-tiny软件包的移植。
|
||||||
|
|
||||||
|
(1)如下图为软件包勾选的内容:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.13 软件包组件勾选
|
||||||
|
|
||||||
|
在正点原子探索者STM32F407ZGT6裸机工程模板中移植软件包后的界面如图3.14所示:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.14 移植界面
|
||||||
|
|
||||||
|
(2)然后按照mcu_it.c对stm32f4xx_it.c中的PendSV_Handler()函数和SysTick_Handler()函数进行修改,如下图所示,注释stm32f4xx_it.c中的PendSV_Handler()函数,并修改SysTick_Handler()函数。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.15 函数修改
|
||||||
|
|
||||||
|
(3)对mcu_platform.h进行修改,添加\#include "stm32f4xx.h"
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.16 修改mcu_platform.h
|
||||||
|
|
||||||
|
(4)接下来,使用如下main程序:
|
||||||
|
|
||||||
|
\#include "stm32f4xx.h"
|
||||||
|
|
||||||
|
\#include "usart.h"
|
||||||
|
|
||||||
|
\#include "tos_k.h"
|
||||||
|
|
||||||
|
k_task_t task1;
|
||||||
|
|
||||||
|
k_task_t task2;
|
||||||
|
|
||||||
|
k_stack_t task_stack1[1024];
|
||||||
|
|
||||||
|
k_stack_t task_stack2[1024];
|
||||||
|
|
||||||
|
void test_task1(void \*Parameter)
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
while(1)
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
printf("task1 running\\r\\n");
|
||||||
|
|
||||||
|
tos_task_delay(200);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void test_task2(void \*Parameter)
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
k_err_t err;
|
||||||
|
|
||||||
|
printf("task2 running\\r\\n");
|
||||||
|
|
||||||
|
tos_task_delay(2000);
|
||||||
|
|
||||||
|
// suspend task1暂停
|
||||||
|
|
||||||
|
printf("suspend task1\\r\\n");
|
||||||
|
|
||||||
|
err = tos_task_suspend(&task1);
|
||||||
|
|
||||||
|
if(err != K_ERR_NONE)
|
||||||
|
|
||||||
|
printf("suspend task1 fail! code : %d \\r\\n",err);
|
||||||
|
|
||||||
|
tos_task_delay(2000);
|
||||||
|
|
||||||
|
// resume task1恢复
|
||||||
|
|
||||||
|
printf("resume task1\\r\\n");
|
||||||
|
|
||||||
|
err = tos_task_resume(&task1);
|
||||||
|
|
||||||
|
if(err != K_ERR_NONE)
|
||||||
|
|
||||||
|
printf("resume task1 fail! code : %d \\r\\n",err);
|
||||||
|
|
||||||
|
tos_task_delay(2000);
|
||||||
|
|
||||||
|
// destroy task1销毁
|
||||||
|
|
||||||
|
printf("destroy task1\\r\\n");
|
||||||
|
|
||||||
|
err = tos_task_destroy(&task1);
|
||||||
|
|
||||||
|
if(err != K_ERR_NONE)
|
||||||
|
|
||||||
|
printf("destroy task1 fail! code : %d \\r\\n",err);
|
||||||
|
|
||||||
|
// task2 running
|
||||||
|
|
||||||
|
while(1)
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
printf("task2 running\\r\\n");
|
||||||
|
|
||||||
|
tos_task_delay(1000);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
k_err_t err;
|
||||||
|
|
||||||
|
/\*初始化USART 配置模式为 115200 8-N-1,中断接收\*/
|
||||||
|
|
||||||
|
uart_init(115200);
|
||||||
|
|
||||||
|
printf("Welcome to TencentOS tiny\\r\\n");
|
||||||
|
|
||||||
|
tos_knl_init(); // TOS Tiny kernel initialize
|
||||||
|
|
||||||
|
tos_robin_default_timeslice_config((k_timeslice_t)500u);
|
||||||
|
|
||||||
|
printf("create task1\\r\\n");
|
||||||
|
|
||||||
|
err = tos_task_create(&task1, "task1", test_task1, NULL, 3, task_stack1, 1024,
|
||||||
|
20);
|
||||||
|
|
||||||
|
if(err != K_ERR_NONE)
|
||||||
|
|
||||||
|
printf("TencentOS Create task1 fail! code : %d \\r\\n",err);
|
||||||
|
|
||||||
|
printf("create task2\\r\\n");
|
||||||
|
|
||||||
|
err = tos_task_create(&task2, "task2", test_task2, NULL, 4, task_stack2, 1024,
|
||||||
|
20);
|
||||||
|
|
||||||
|
if(err != K_ERR_NONE)
|
||||||
|
|
||||||
|
printf("TencentOS Create task2 fail! code : %d \\r\\n",err);
|
||||||
|
|
||||||
|
tos_knl_start(); // Start TOS Tiny
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
(5)点击编译,并利用ST
|
||||||
|
LINK-V2将程序下载到单片机上,如图3.17,然后将单片机的串口与电脑连接起来,利用XCOM串口通讯助手进行查看,结果如图3.18所示。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.17 编译界面
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
图3.18 测试界面
|
||||||
|
|
||||||
|
另外,在编译过程中如果遇到图3.19(a)的报错,需要将图3.19(b)中的\#define
|
||||||
|
TOS_CFG_OBJECT_VERIFY_EN 1u修改为TOS_CFG_OBJECT_VERIFY_EN 0u
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
(a)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
(b)
|
||||||
|
|
||||||
|
图3.19 报错修改
|
||||||
|
|
||||||
|
# 4、总结
|
||||||
|
|
||||||
|
本文首先研究了基于MDK完成第三方软件包封装的开发过程,并编写了软件包制作的步骤,然后结合TencentOS
|
||||||
|
Tiny物联网操作系统,对其中的ARM内核架构下的文件进行了封装,从而设计了基于TencentOS
|
||||||
|
Tiny的软件包。
|
||||||
|
|
||||||
|
本软件包能够方便开发者快速地将TencentOS
|
||||||
|
Tiny操作系统移植到用户的ARM内核单片机上,大大节省了开发移植的时间,同时软件包具有自动适配内核和依赖提示的功能,能够提高移植的效率。
|
||||||
|
|
||||||
|
# 5、开发参考
|
||||||
|
|
||||||
|
1、腾讯物联网操作系统网址<https://github.com/OpenAtomFoundation/TencentOS-tiny>
|
||||||
|
|
||||||
|
2、MDK5软件包MDK5 Software Packs (keil.com)
|
||||||
|
|
||||||
|
3、制作软件包培训视频https://www.bilibili.com/video/BV1AK411p7d9
|
||||||
|
|
||||||
|
4、制作软件包博客https://blog.csdn.net/qq_40259429/article/details/119320319
|
||||||
|
|
||||||
|
5、制作简易软件包https://www.cnblogs.com/libra13179/p/6273415.html
|
||||||
|
|
||||||
|
6、CMSIS-Driver软件包ARM-software/CMSIS-Driver: Repository of microcontroller
|
||||||
|
peripheral driver implementing the CMSIS-Driver API specification (github.com)
|
||||||
|
|
||||||
|
# 6、附录-移植配置参考
|
||||||
|
|
||||||
|
## 6.1 MDK5.14版本移植到ARM内核
|
||||||
|
|
||||||
|
### 6.1.1 Cortex-M0内核移植
|
||||||
|
|
||||||
|
(1)Manage Run-Time Environment勾选如下:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
(2)在mcu_platform.h中添加:
|
||||||
|
|
||||||
|
\#include "ARMCM0.h"
|
||||||
|
|
||||||
|
\#include "core_cm0.h"
|
||||||
|
|
||||||
|
### 6.1.2 Cortex-M0+内核移植
|
||||||
|
|
||||||
|
(1)Manage Run-Time Environment勾选如下:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
(2)在mcu_platform.h中添加:
|
||||||
|
|
||||||
|
\#include "ARMCM0plus.h"
|
||||||
|
|
||||||
|
\#include "core_cm0plus.h"
|
||||||
|
|
||||||
|
### 6.1.3 Cortex-M3内核移植
|
||||||
|
|
||||||
|
(1)Manage Run-Time Environment勾选如下:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
(2)在mcu_platform.h中添加:
|
||||||
|
|
||||||
|
\#include "ARMCM3.h"
|
||||||
|
|
||||||
|
\#include "core_cm3.h"
|
||||||
|
|
||||||
|
### 6.1.4 Cortex-M4内核移植
|
||||||
|
|
||||||
|
(1)Manage Run-Time Environment勾选如下:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
(2)在mcu_platform.h中添加:
|
||||||
|
|
||||||
|
\#include "ARMCM4.h"
|
||||||
|
|
||||||
|
\#include "core_cm4.h"
|
||||||
|
|
||||||
|
### 6.1.5 Cortex-M7内核移植
|
||||||
|
|
||||||
|
1、Manage Run-Time Environment勾选如下:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
2、在MDK中修改为C99
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
3、在mcu_platform.h中添加:
|
||||||
|
|
||||||
|
\#include "ARMCM7.h"
|
||||||
|
|
||||||
|
\#include "core_cm7.h"
|
||||||
|
|
||||||
|
## 6.2 MDK5.14版本移植到基于ARM内核的芯片
|
||||||
|
|
||||||
|
### 6.2.1 移植到stm32f103c8芯片
|
||||||
|
|
||||||
|
1、Manage Run-Time Environment勾选如下:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
2、在mcu_platform.h中添加:
|
||||||
|
|
||||||
|
\#include "stm32f10x.h"
|
||||||
|
|
||||||
|
\#include "core_cm3.h"
|
||||||
|
|
||||||
|
\#include "system_stm32f10x.h"
|
||||||
|
|
||||||
|
### 6.2.2 移植到stm32f767igt芯片
|
||||||
|
|
||||||
|
1、Manage Run-Time Environment勾选如下:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
2、在MDK中修改为C99
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
3、在mcu_platform.h中添加:
|
||||||
|
|
||||||
|
\#include "stm32f7xx.h"
|
||||||
|
|
||||||
|
\#include "core_cm7.h"
|
||||||
|
|
||||||
|
\#include "system_stm32f7xx.h"
|
||||||
|
|
||||||
|
## 6.3 MDK5.30和MDK5.35版本移植(Cortex-M0+、0、3、4、7内核和芯片)
|
||||||
|
|
||||||
|
在MDK5.30和MDK5.35版本的Keil移植TencentOS-tiny
|
||||||
|
Pack时,对于Cortex-M0+、0、3、4、7的内核和芯片,勾选组件和添加头文件的步骤之前一致,但是需要修改编译器的版本,具体修改如下,然后执行编译即可。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## 6.4 MDK5.30和MDK5.35版本移植(Cortex-M23、33)
|
||||||
|
|
||||||
|
### 6.4.1 Cortex-M23内核移植
|
||||||
|
|
||||||
|
(1)Manage Run-Time Environment勾选如下:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
(2)在mcu_platform.h中添加:
|
||||||
|
|
||||||
|
\#include "ARMCM23.h"
|
||||||
|
|
||||||
|
\#include "core_cm23.h"
|
||||||
|
|
||||||
|
(3)修改为不查看报错:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### 6.4.2 Cortex-M33内核移植
|
||||||
|
|
||||||
|
(1)选择带FPU的芯片
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
(2)Manage Run-Time Environment勾选如下:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
(3)在mcu_platform.h中添加:
|
||||||
|
|
||||||
|
\#include "ARMCM33_DSP_FP.h"
|
||||||
|
|
||||||
|
\#include "core_cm33.h"
|
||||||
|
|
||||||
|
(4)修改为不查看报错:
|
||||||
|
|
||||||
|

|
1021
tools/mdk_pack/Documentation/README_EN.md
Normal file
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 78 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 78 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 93 KiB |
After Width: | Height: | Size: 8.5 KiB |
After Width: | Height: | Size: 90 KiB |
After Width: | Height: | Size: 79 KiB |
After Width: | Height: | Size: 94 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 78 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 78 KiB |
After Width: | Height: | Size: 160 KiB |
After Width: | Height: | Size: 49 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 112 KiB |