GD32H759IMT6 Cortex-M7 OpenHarmony轻量系统移植——4.1版本升级到5.0.3
笔者在去年利用国庆时间,将Cortex-M7 的国产厂商兆易创新GD32H459移植OpenHarmony轻量系统,但是适配不太完善——只能选择liteos-m接管中断。这样导致使用中断非常麻烦。于是笔者最近将接管中断模式修改为不接管,这样可以方便的使用gd32提供的中断。 相关开源地址:https://gitee.com/GD32H759_OpenHarmony/docs/blob/OpenHa
·
笔者在去年利用国庆时间,将Cortex-M7 的国产厂商兆易创新GD32H459移植OpenHarmony轻量系统,但是适配不太完善——只能选择liteos-m接管中断。这样导致使用中断非常麻烦。于是笔者最近将接管中断模式修改为不接管,这样可以方便的使用gd32提供的中断。
相关开源地址:https://gitee.com/GD32H759_OpenHarmony/docs/blob/OpenHarmony-v5.0.3-Release/README.md
往期文章
如何在GD32H759IMT6 上使用OpenHarmony 5.0.3 轻量系统开发
1.首先搭建好OpenHarmony开发环境后,下载OpenHarmony轻量系统5.0.3r的hi3861代码
# 下载v5.0.3 版本hi3861源码
repo init -u https://gitee.com/openharmony/manifest -b refs/tags/OpenHarmony-v5.0.3-Release -m chipsets/hispark_pegasus.xml -g ohos:mini
repo sync -c
repo forall -c 'git lfs pull'
# 安装依赖
./build/build_scripts/env_setup.sh
source ~/.bashrc
# 下载编译工具
bash build/prebuilts_download.sh
# 执行一遍3861的编译命令确认环境有没有问题
./build.sh --product-name wifiiot_hispark_pegasus --ccache --no-prebuilt-sdk
2.将本组织下GD32H759的vendor和device替换掉上一步拉取的3861代码的vendor和device目录
# 5.0.3版本中需要将third_party/cmsis回退到4.1
rm -rf third_party/cmsis
git clone -b OpenHarmony-v4.1-Release https://gitee.com/openharmony/third_party_cmsis.git third_party/cmsis
rm -rf device
git clone -b OpenHarmony-v5.0.3-Release https://gitee.com/GD32H759_OpenHarmony/device.git device
rm -rf vendor
git clone -b OpenHarmony-v5.0.3-Release https://gitee.com/GD32H759_OpenHarmony/vendor.git
5.0.3版本中需要将third_party/cmsis回退到4.1,如果不回退,会显示cmsis版本太高导致无法编译通过(厂家提供的裸机文件一般是没问题的)
[OHOS ERROR] ../../../device/soc/gigadevice/gd32h7xx/libraries/drivers/src/gd32h7xx_misc.c: In function 'nvic_irq_enable':
[OHOS ERROR] ../../../device/soc/gigadevice/gd32h7xx/libraries/drivers/src/gd32h7xx_misc.c:101:11: error: 'NVIC_Type' {aka 'struct <anonymous>'} has no member named 'IP'; did you mean 'IPR'?
[OHOS ERROR] 101 | NVIC->IP[nvic_irq] = (uint8_t)temp_priority;
[OHOS ERROR] | ^~
[OHOS ERROR] | IPR
[OHOS ERROR] Traceback (most recent call last):
3.编译固件
rm -rf out
./build.sh --product-name GD32H759IMT6_BOARD --ccache --no-prebuilt-sdk
更多推荐
所有评论(0)