ModusToolbox 实战入门
- 安装ModusToolbox
- 创建项目(快速开始)
- 烧写程序
- 运行结果
- 常见问题
- 1. 在Build Application后报错 Makefile:192: *** Unable to find any of the available CY_TOOLS_PATHS -- . On Windows, use forward slashes.. Stop.
- 2. 报错 server replied:Not Found
- 3. 报错:fatal: unable to access 'https://github.com/Infineon/device-db/': HTTP/2 stream 1 was not closed cleanly before end of the underlying stream
参考网站:
大大通-ModusToolbox 实战入门系列
英飞凌ModusToolbox™ Software安装向导
本篇文章仅供学习交流。如有侵权,请联系删除
相关链接:英飞凌开发者社区、英飞凌github、Eclipse IDE for ModusToolbox™ 3.1.0 用户指南
安装ModusToolbox
下面的过程以
Version: 3.1.0.12257
Windows (x64) (exe)为例
Mac系统的需要修改Modus URL Modifier相关的环境变量
下载后会得到名为ModusToolbox_3.1.0.12257-windows-install.exe的可执行文件,如下图所示
选择"install for all users"(省事)
按默认安装设置即可,直至finish
添加环境变量
在windows搜索中搜索环境变量,选择“编辑系统环境变量”
添加环境变量
CY_TOOLS_PATHS
C:/Infineon/Tools/ModusToolbox/tools_3.1
//注意!!!使用Winodws风格的路径,即正斜杠“/”
//注意!!!按照自己实际安装路径,这里选择为默认安装路径
可在cmd终端中验证环境变量是否生效:
ECHO Tools Version: %CY_TOOLS_PATHS%
//不是power shell 是cmd。Windows+R键输入cmd即可快速调出
如需设置其它环境变量来修改功能,请阅读英飞凌ModusToolbox™ Software安装向导
更改执行策略为remotesigned
以管理员身份运行power shell
输入以下命令
get-executionpolicy
set-executionpolicy remotesigned
a
设置git代理
下载ModusToolbox_URL_Modifier-main
解压并以管理员身份运行其中的install.cmd文件
选择更多信息后出现“仍要运行”选项。
选择仍要运行
设置代理后ModusToolbox就不会直接访问github,而是通过代理服务器
ModusToolboxURLModifier作用
ModusToolbox_URL_Modifier的作用为:
ModusToolbox的用户在执行与github.com相关的git_clone/git_fetch等操作时,因为你的网络到github.com的连接被屏蔽或限制,可能会遇到错误:“OpenSSL SSL_read: Software caused connection abort, errno 113”。ModusToolbox_URL_Modifier
ModusToolboxURLModifier使用以下命令,可将git通过一些第三方的repo中继服务器(譬如ghproxy.com),来绕过这个限制。
git config --system url."https://ghproxy.com/https://github.com".insteadOf https://github.com
具体细节请点击访问英飞凌论坛
在Mac OS系统中需要执行以上git命令行再添加环境变量
export CyRemoteManifestOverride=https://gitee.com/dreamscaperia/mtb-super-manifest/raw/master/mtb-super-manifest-fv2.xml
创建项目(快速开始)
初次安装后,在Windows的所有程序中找到IDE,如图
点击后启动ModusToolbox
单击 Eclipse IDE 快速面板中的 New Application 链接
也可以选择 File > New > ModusToolbox™ Application.
创建新的应用后需要过一段时间(由于需要请求github,这里可能需要特殊网络),选择对应的板级支持包。
选择Hello World示列代码创建应用
烧写程序
创建好应用后,如下图过程操作即可
运行结果
按下Reset button(SW1)具体位置如实物图所示:
打开ModusToolbox的串口终端
如下图设置串口调试参数
按下Reset button(SW1)后,终端对应串口号的窗口显示Hello World !!…等信息,Reset按钮旁的LED4(实物图所示)闪烁红灯。
常见问题
1. 在Build Application后报错 Makefile:192: *** Unable to find any of the available CY_TOOLS_PATHS – . On Windows, use forward slashes… Stop.
环境变量问题
2. 报错 server replied:Not Found
需要科学上网(Windows 系统可通过本文更换git代理解决)
3. 报错:fatal: unable to access ‘https://github.com/Infineon/device-db/’: HTTP/2 stream 1 was not closed cleanly before end of the underlying stream
不知道什么原因,梯子换个好一点的节点,retry能解决(Windows 系统可通过本文更换git代理解决)
遇到以下类似错误可以尝试运行Uninstall.cmd 再次运行Install.cmd 重装一下URL Modifier,然后重启计算机即可。