Arch Linux wine H7-tool
自动安装的并配置 wine 的版本 H7-TOOL PC AUR 包
1. 用 lutris 环境搭建的 wine 环境
使用的是 h7-tool v2.0.0
字体使用的是 阿里巴巴普惠体,
如果显示字体为方框,要么安装 阿里巴巴普惠体,要么修改 wine 注册表里面的 字体链接名称。
下面注册表使用的是 文泉译微黑字体,根据自己系统字体不同进行相应的字体系统链接修改,注意:这里的字体名称要使用 Linux 系统的字体名称,
查看系统字体:
ls /usr/share/fonts/
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink]
"Lucida Sans Unicode"="wqy-microhei.ttc"
"Microsoft Sans Serif"="wqy-microhei.ttc"
"MS Sans Serif"="wqy-microhei.ttc"
"Tahoma"="wqy-microhei.ttc"
"Tahoma Bold"="wqy-microhei.ttc"
"SimSun"="wqy-microhei.ttc"
"Arial"="wqy-microhei.ttc"
"Arial Black"="wqy-microhei.ttc"
2. H7-tool wine 环境:H7-tool.7z
注意一定要用 7z 格式,因为一些系统链接方式,使用其他压缩格式可能会丢失。
linux 下解压 7z 格式,需要通过系统软件仓库安装 7z 软件包。
7za X H7-tool.7z
最好是配合 lutris 运行
使用 lutris 可以创建桌面快捷方式相比 其他 wine 环境要方便很多
3. 使用 Segger 的 JlinkSofowarePakeage Linux 版本的工具调试 H7-tool
可以到 Segger 官网下载 >= v7.0 版本:SEGGER - The Embedded Experts - Downloads - J-Link / J-Trace
Segger 现在重写 Jlink 工具,支持 Windows Linux MacOS ARM 等平台。
Jlink v7 版本支持 CMSIS-DAP 调试
配置 H7 的 udev 规则。在 /etc/udev/rule.d/ 下创建 99-h7-tool.rules
sudo cat > /etc/udev/rule.d/99-h7-tool.rules << EOF
# Copy this file to /etc/udev/rules.d/
# If rules fail to reload automatically, you can refresh udev rules
# with the command "udevadm control --reload"
# This rules are based on the udev rules from the OpenOCD project, with unsupported probes removed.
# See http://openocd.org/ for more details.
#
# This file is available under the GNU General Public License v2.0
ACTION!="add|change", GOTO="h7_tool_rules_end"
SUBSYSTEM=="gpio", MODE="0660", GROUP="plugdev", TAG+="uaccess"
SUBSYSTEM!="usb|tty|hidraw", GOTO="h7_tool_rules_end"
# Please keep this list sorted by VID:PID
# H7-tool
ATTRS{idVendor}=="C251", ATTRS{idProduct}=="F00A", MODE="666", GROUP="plugdev", TAG+="uaccess"
# CMSIS-DAP compatible adapters
ATTRS{product}=="*CMSIS-DAP*", MODE="666", GROUP="plugdev", TAG+="uaccess"
LABEL="h7_tool_rules_end"
EOF
复制上面的代码可以直接创建 99-h7-tool.rules 刷新 udev 信息
sudo udevadm control --reload
运行 JLinkExe 验证是否能和 H7-tool 通信,
至此,Linux 下使用 H7-tool 和 CMSIS-DAP 调试完成。
本文来自博客园,作者:饕餮人,转载请注明原文链接:https://www.cnblogs.com/taotieren/p/18458856