5 Star 59 Fork 12

格维融创开源社区 / FreeRTOS for MCS-251

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

FreeRTOS for MCS-251

介绍

支持MCS-251(STC32G系列)的FreeRTOS

使用说明

目前移植的FreeRTOS版本支持STC32G的larg-ROM和huge-ROM两个版本

切换larg-ROM的配置方法:

  1. FreeRTOSConfig.h 里面配置configUSE_ROMHUGE 为 0
  2. 点击Keil工程配置按钮【Options for Target】
  3. 点击【Target】-> 【Code Rom Size】-> Larg模式
  4. 点击【Target】-> 【C251】 -> 【Define】 输入 configSUPPORT_MCS251
  5. 点击【Target】-> 【C251】 -> 【Level】 选择4级
  6. 点击【Target】-> 【C251】 勾选 Link Code
  7. 点击【Target】-> 【C251】 勾选 Generate reentrant

切换Huge-ROM的配置方式:

  1. FreeRTOSConfig.h 里面配置configUSE_ROMHUGE 为 1
  2. 点击Keil工程配置按钮【Options for Target】
  3. 点击【Target】-> 【Code Rom Size】-> Huge模式
  4. 点击【Target】-> 【Exeternal Memory】-> 【ROM】 起始地址:0xFE2000 大小:0x1E000
  5. 点击【Target】-> 【C251】 -> 【Define】 输入 configSUPPORT_MCS251
  6. 点击【Target】-> 【C251】 -> 【Level】 选择4级
  7. 点击【Target】-> 【C251】 勾选 Link Code
  8. 点击【Target】-> 【C251】 勾选 Generate reentrant

port.c 为移植接口,注释用英文撰写,为了保持字体编码兼容。

为了方便阅读和学习,以C语言编写为主,但这不是最优方案,还可以使用汇编进行优化。

当前方案,在35M速度下: 任务切换速度耗时在10us左右,使用汇编优化,可以到5~8us左右。

默认系统时钟24M,可以根据需要,自己调整。

如果要启动软件仿真,需要进行如下操作:

点击Keil工程配置按钮【Options for Target】-> 【Target】-> 【C251】 -> 【Define】 输入 __SOFT_DEBUG__ (注意不要删除configSUPPORT_MCS251)

开启软件仿真以后,不能在真实硬件上跑。

参与贡献

  1. 请加QQ群:1001220381
  2. Fork 本仓库
  3. 新建 Feat_xxx 分支
  4. 提交代码
  5. 新建 Pull Request
MIT License Copyright (c) 2022 zevorn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

支持MCS-251(STC32G系列)的FreeRTOS 展开 收起
C 等 2 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C
1
https://gitee.com/gevico/freertos.git
git@gitee.com:gevico/freertos.git
gevico
freertos
FreeRTOS for MCS-251
master

搜索帮助