2 Star 7 Fork 4

Harylee / nucleo_f767zi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

鸿蒙轻内核LiteOS-M移植支持Nucleo-F767Zi开发板

介绍

该仓包含鸿蒙轻内核LiteOS-M移植支持Nucleo-F767Zi开发板的工程代码,支持Ninja、GCC、IAR等方式进行编译。

一、Ninja编译

  1. 获取OpenHarmony完整仓代码,建议使用获取方式3:从代码仓库获取方法获取代码。假设检出目录为~/openHarmony

  2. 参考快速入门搭建环境。对于LiteOS-M内核,按搭建系统基础环境配置环境即可。

  3. 在本地目录,执行 git clone https://gitee.com/harylee/nucleo_f767zi.git 检出代码,假设检出目录为~/nucleo_f767zi。 执行如下命令把检出工程的devicevendor目录复制到openHarmony工程的相应目录。

cp -r ~/nucleo_f767zi/device/st  ~/openHarmony/device/st

cp -r ~/nucleo_f767zi/vendor/st  ~/openHarmony/vendor/st

chmod +x ~/openHarmony/device/st/nucleo_f767zi/build.sh
  1. 下载arm交叉编译器,git clone https://gitee.com/harylee/gcc-arm-none-eabi-10-2020-q4-major.git ,将交叉编译器环境变量bin目录配置到.bashrc文件中或者配置device/st/nucleo_f767zi/liteos_m/config.gni文件中board_toolchain_path宏为交叉编译器bin路径。

  2. 在OpenHarmony根目录:

haryslee@dev:~/OpenHarmony$ hb set
[OHOS INFO] Input code path:          # 直接按回车,然后选择nucleo_f767zi产品即可
OHOS Which product do you need?  nucleo_f767zi@st
haryslee@dev:~/OpenHarmony$ hb build
  1. 最终的镜像生成在~/openHarmony/out/nucleo_f767zi/目录中,通过STM32 ST-LINK Utility软件将镜像文件下载至单板即可。

二、GCC编译

需要确保已经安装好makearm gcc

  1. 执行命令git clone https://gitee.com/openharmony/kernel_liteos_m.git 检出kernel-liteos-m代码。假设检出目录为~/kernel-liteos-m

  2. 执行下述命令检出三方库,假设检出目录为~/kernel-liteos-m

mkdir ~/third_party

git clone https://gitee.com/openharmony/third_party_bounds_checking_function.git ~/third_party/bounds_checking_function

git clone https://gitee.com/openharmony/third_party_cmsis.git ~/third_party/cmsis

git clone https://gitee.com/openharmony/third_party_musl.git ~/third_party/musl
  1. 在本地目录,执行 git clone https://gitee.com/harylee/nucleo_f767zi.git 检出代码,假设检出目录为~/nucleo_f767zi。 执行如下命令把检出工程的、cortex-m7_nucleo_f767zi_gcc目录复制到kernel-liteos-m工程的targets目录。
cp -r ~/nucleo_f767zi/cortex-m7_nucleo_f767zi_gcc  ~/kernel-liteos-m/targets/cortex-m7_nucleo_f767zi_gcc
  1. 打开终端,切换到目录~/kernel-liteos-m/targets/cortex-m7_nucleo_f767zi_gcc,执行make clean; make -j即可启动编译。

  2. 烧录、运行类似第一小节的ninja部分。

三、IAR编译

需要确保已经安装好IAR Embedded Workbench

  1. 执行命令git clone https://gitee.com/openharmony/kernel_liteos_m.git 检出kernel-liteos-m代码。假设检出目录为~/kernel-liteos-m

  2. 在本地目录,执行 git clone https://gitee.com/harylee/nucleo_f767zi.git 检出代码,假设检出目录为~/nucleo_f767zi。 执行如下命令把检出工程的、cortex-cortex-m7_nucleo_f767zi_iar目录复制到kernel-liteos-m工程的targets目录。

cp -r ~/nucleo_f767zi/cortex-m7_nucleo_f767zi_iar  ~/kernel-liteos-m/targets/cortex-m7_nucleo_f767zi_iar
  1. 切换到目录~/kernel-liteos-m/targets/cortex-m7_nucleo_f767zi_iar/EWARM,双击文件Project.eww,打开IAR软件。即可开始编译、烧录、调测运行。

参与贡献

  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request

空文件

简介

暂无描述 展开 收起
C 等 4 种语言
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/harylee/nucleo_f767zi.git
git@gitee.com:harylee/nucleo_f767zi.git
harylee
nucleo_f767zi
nucleo_f767zi
master

搜索帮助