跳到主要内容
View All Authors

博客的自动部署方案

· 阅读需 5 分钟

本站博客采用Markdown书写,在本地编辑完成后生成静态HTML文件,经 Git 推送至部署服务器,部署服务器基于 systemd 创建服务,实现自动部署。

STLink Mini刷v2固件

· 阅读需 5 分钟

1. 解除Read Protection

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

MacOS npm 网络访问疑难杂症

· 阅读需 1 分钟

镜像

npm一般需要通过镜像来访问,国内常见的镜像有:

推荐使用nrm管理要使用的镜像:

npm --registry https://registry.npmmirror.com install nrm
nrm use tencent