博客的自动部署方案
· 阅读需 5 分钟
本站博客采用Markdown书写,在本地编辑完成后生成静态HTML文件,经 Git 推送至部署服务器,部署服务器基于 systemd 创建服务,实现自动部署。
本站博客采用Markdown书写,在本地编辑完成后生成静态HTML文件,经 Git 推送至部署服务器,部署服务器基于 systemd 创建服务,实现自动部署。
STM32F1xx 系列的部分引脚默认作为 JTAG/SWD 调试接口引脚。官方文档对这些引脚的功能定义如下:
git config --global http.proxy 192.168.10.2:20172
git config --global https.proxy 192.168.10.2:20172
git config --global http.version HTTP/1.1
安装必要包:
pacman -S --needed base-devel
下载MINGW包仓库
git clone https://kkgithub.com/msys2/MINGW-packages.git
STLink V2的bootloader开启了Read Protection,导致起始的8KB Flash不能被修改,在刷写Flash前需要解除Read Protection。
可以使用openocd命令来解锁:
openocd -f interface/stlink.cfg -f target/stm32f1x.cfg \
-c "init" -c "reset init" \
-c "stm32f1x unlock 0; reset init" \
-c "reset" -c "shutdown"
输出如下:
Open On-Chip Debugger 0.12.0
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : clock speed 1000 kHz
Info : STLINK V2J43S7 (API v2) VID:PID 0483:3748
Info : Target voltage: 3.102632
Warn : UNEXPECTED idcode: 0x2ba01477
Error: expected 1 of 1: 0x1ba01477
Windows环境,使用VSCode调试STM32时,从点Debug按钮开始到板子启动需等待20s左右,这明显不太正常。当前使用的主要工具:
npm一般需要通过镜像来访问,国内常见的镜像有:
推荐使用nrm管理要使用的镜像:
npm --registry https://registry.npmmirror.com install nrm
nrm use tencent