Skip to content

Commit

Permalink
修改了所有文档图片链接为imgs.ronan.ud.kg
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronan authored and Ronan committed Oct 12, 2024
1 parent 2bde66e commit 82080dc
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 33 deletions.
4 changes: 2 additions & 2 deletions _posts/2024-09-02-Dockerfile的简单实现.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ FROM是必须的,这是搭建镜像的基础

* `python:3.9.19-alpine3.18`前面的`python`为镜像名称,可到dockerhub按需搜索,如下图

![img](https://imgs-dx3.pages.dev/blog_imgs/dockerfile1.png)
![img](https://imgs.ronan.us.kg/dockerfile1.png)

* `python:3.9.19-alpine3.18`冒号后面的是tag,也就是标签(版本号)。**标签必须与dockerhub镜像里提供的一致,在上图点击所需镜像名称即可看到可用标签。**

![img](https://imgs-dx3.pages.dev/blog_imgs/dockerfile2.png)
![img](https://imgs.ronan.us.kg/dockerfile2.png)

```
FROM ubuntu:20.04
Expand Down
2 changes: 1 addition & 1 deletion _posts/2024-09-02-Docker常用命令.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ header-style: text
tags:
- docs
---
![DockerCheatSheet.png](https://imgs-dx3.pages.dev/blog_imgs/docker_command.png)
![DockerCheatSheet.png](https://imgs.ronan.us.kg/docker_command.png)

# 启动docker

Expand Down
2 changes: 1 addition & 1 deletion _posts/2024-09-02-JavaScript.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ tags:

简单说,对象就是一组“键值对”(key-value)的集合,是一种无序的复合数据集合

![img](https://imgs-dx3.pages.dev/blog_imgs/js1.png)
![img](https://imgs.ronan.us.kg/js1.png)

```js
var user = {
Expand Down
4 changes: 2 additions & 2 deletions _posts/2024-09-02-SSH 免密登录.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ssh-keygen

之后一路回车,不出意外的话,你将看到以下内容

![img](https://imgs-dx3.pages.dev/blog_imgs/ssh-keygen.png)
![img](https://imgs.ronan.us.kg/ssh-keygen.png)

恭喜,你已经完成第一步!

Expand All @@ -32,7 +32,7 @@ ls .ssh

看到以下内容

![img](https://imgs-dx3.pages.dev/blog_imgs/ls_.ssh.png)
![img](https://imgs.ronan.us.kg/ls_.ssh.png)

看到其中有`id_ed25519`(私钥))**其中的ed25519在不同设备可能会有不同,有的可能是id_rsa**`id_ed25519.pub`(公钥)两个文件,恭喜,你已经完成第二步了,离成功更近了!

Expand Down
4 changes: 2 additions & 2 deletions _posts/2024-09-02-Typora图床自动上传脚本.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ done

进入Typroa`设置`->`图像`->`上传服务设定`,将上传服务改为`自定义命令`,命令为`脚本路径`

![img](https://imgs-dx3.pages.dev/blog_imgs/typora_upload.png)
![img](https://imgs.ronan.us.kg/typora_upload.png)

记得在插入图片时选择`上传图片`,并勾选`对本地位置的图片应用上述规则`

Expand Down Expand Up @@ -223,7 +223,7 @@ pyinstaller --onefile ui.py

进入Typroa`设置`->`图像`->`上传服务设定`,将上传服务改为`自定义命令`,命令为`脚本路径`

![img](https://imgs-dx3.pages.dev/blog_imgs/typora_upload.png)
![img](https://imgs.ronan.us.kg/typora_upload.png)

记得在插入图片时选择`上传图片`,并勾选`对本地位置的图片应用上述规则`

2 changes: 1 addition & 1 deletion _posts/2024-09-02-vscode磨砂效果配置.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ tags:

右键将以下图片保存到本地,假设保存的路径为 /Users/einson/Pictures/vscbg/,保存名称为 Noisefigure.png。

![img](https://imgs-dx3.pages.dev/blog_imgs/noise.png)
![img](https://imgs.ronan.us.kg/noise.png)

## 3.配置文件

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ tags:

如果你也觉得 Docker Desktop 太慢了,或者之前没有可视化工具,不妨试试 OrbStack。

![img](https://imgs-dx3.pages.dev/blog_imgs/orbstack.png)
![img](https://imgs.ronan.us.kg/orbstack.png)

OrbStack 是一款针对 macOS 操作系统的定制的,它的目的就是提供一个高效、轻量级的 Docker 和虚拟机(VM)管理平台。

Expand Down
8 changes: 4 additions & 4 deletions _posts/2024-09-02-静态库与动态库.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ tags:
* `参数s`:创建目标文件索引,这在创建较大的库时能加快时间。
* `参数r`:在库中插入模块(替换)。默认新的成员添加在库的结尾处,如果模块名已经在库中存在,则替换同名的模块。

![img](https://imgs-dx3.pages.dev/blog_imgs/lib1.png)
![img](https://imgs.ronan.us.kg/lib1.png)

生成静态链接库的具体步骤如下:

Expand Down Expand Up @@ -295,7 +295,7 @@ $ tree
* -fPIC 或 -fpic 参数的作用是使得 gcc 生成的代码是与位置无关的,也就是使用相对位置。
* -shared参数的作用是告诉编译器生成一个动态链接库。

![img](https://imgs-dx3.pages.dev/blog_imgs/lib1.png)
![img](https://imgs.ronan.us.kg/lib1.png)

生成动态链接库的具体步骤如下:

Expand Down Expand Up @@ -596,7 +596,7 @@ $ ldd app
相同的库文件数据可能在内存中被加载多份, 消耗系统资源,浪费内存
库文件更新需要重新编译项目文件, 生成新的可执行程序, 浪费时间。

![img](https://imgs-dx3.pages.dev/blog_imgs/lib1.png)
![img](https://imgs.ronan.us.kg/lib1.png)

#### 3.2 动态库

Expand All @@ -609,4 +609,4 @@ $ ldd app

加载速度比静态库慢, 以现在计算机的性能可以忽略
发布程序需要提供依赖的动态库
![img](https://imgs-dx3.pages.dev/blog_imgs/lib1.1.png)
![img](https://imgs.ronan.us.kg/lib1.1.png)
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ tags:
## 遭遇问题

***platformIO一直卡在烧录程序中,导致开发版一直处于断电状态***
![问题](https://imgs-dx3.pages.dev/blog_imgs/PIO1.png)
![问题](https://imgs.ronan.us.kg/PIO1.png)

## 解决方法

将main.py里的这一行注释即可
![解决1](https://imgs-dx3.pages.dev/blog_imgs/PIO2.png)
![解决1](https://imgs.ronan.us.kg/PIO2.png)

该文件在以下路径
`~/.platformio/platforms/intel_mcs51/builder/main.py`
![解决2](https://imgs-dx3.pages.dev/blog_imgs/PIO3.png)
![解决2](https://imgs.ronan.us.kg/PIO3.png)
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ tags:

# 2.在 platformIO 新建一个 CMSIS 工程

![NO1](https://imgs-dx3.pages.dev/blog_imgs/PIOproject1.png)
![NO1](https://imgs.ronan.us.kg/PIOproject1.png)

![NO2](https://imgs-dx3.pages.dev/blog_imgs/PIOproject2.png)
![NO2](https://imgs.ronan.us.kg/PIOproject2.png)

工程建立成功之后,应该是下面这样:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,17 @@ test
1.新建一个 STM32CubeMX_projects 目录(以后的工程就统一放置在该目录下,建议不要放置在桌面,放在自己容易记忆的位置),然后使用 vscode 打开该目录,并且将其保存为工作区,将工作区文件保存在希望的位置,以后可以通过双击该文件直接打开 STM32CubeMX_projects 工作区:

![设立工作区](https://imgs-dx3.pages.dev/blog_imgs/vscode_stm32_makefile_config1.png)
![设立工作区](https://imgs.ronan.us.kg/vscode_stm32_makefile_config1.png)


2.在 STM32CubeMX 配置好工程,点击左侧选项卡,然后勾选绿色框里的选项选择 Makefile 导出:

![建立并导出工程](https://imgs-dx3.pages.dev/blog_imgs/cubemx_makefile_project1.png)
![建立并导出工程](https://imgs-dx3.pages.dev/blog_imgs/cubemx_makefile_project2.png)
![建立并导出工程](https://imgs.ronan.us.kg/cubemx_makefile_project1.png)
![建立并导出工程](https://imgs.ronan.us.kg/cubemx_makefile_project2.png)

3.使用 vscode 打开该工程目录,点开`./Core/Src/main.c`,你会发现:满是令人高血压的红色波浪线,难以忍受。

![红色波浪线](https://imgs-dx3.pages.dev/blog_imgs/vscode_stm32_makefile_config2.png)
![红色波浪线](https://imgs.ronan.us.kg/vscode_stm32_makefile_config2.png)

---

Expand All @@ -95,31 +95,31 @@ test
1.在工作区根目录中按下(macos)`cmd+shift+p`,(windows)`ctrl+shift+p`,输入 `C/C++` 然后点击`Edit Configurrations(JSON)`选择

![创建 cpp_json](https://imgs-dx3.pages.dev/blog_imgs/vscode_stm32_makefile_config3.png)
![创建 cpp_json](https://imgs.ronan.us.kg/vscode_stm32_makefile_config3.png)

2.接下来 vscode 会在你的工作区根目录下创建一个 .vscode 目录和一个 c_cpp_properties.json ,默认情况下你在 c_cpp_properties.json 会看到以下内容

![cpp_json](https://imgs-dx3.pages.dev/blog_imgs/vscode_stm32_makefile_config4.png)
![cpp_json](https://imgs.ronan.us.kg/vscode_stm32_makefile_config4.png)

3.打开工程根目录的`Makefile`,找到`#C defines`(也就是宏定义这部分),然后`复制绿色框里的内容`

![Makefile](https://imgs-dx3.pages.dev/blog_imgs/vscode_stm32_makefile_config5.png)
![Makefile](https://imgs.ronan.us.kg/vscode_stm32_makefile_config5.png)

4.回到`c_cpp_properties.json`,将上面复制的内容按 `以下格式(一定要注意格式)` 粘贴到`"defines"`的中括号里,就像下面这样:

![c_cpp_properties.json](https://imgs-dx3.pages.dev/blog_imgs/vscode_stm32_makefile_config6.png)
![c_cpp_properties.json](https://imgs.ronan.us.kg/vscode_stm32_makefile_config6.png)

5.打开工程根目录的`Makefile`,找到`#C includes`(也就是头文件搜索这部分),然后`复制绿色框里的内容`

![Makefile](https://imgs-dx3.pages.dev/blog_imgs/vscode_stm32_makefile_config7.png)
![Makefile](https://imgs.ronan.us.kg/vscode_stm32_makefile_config7.png)

6.回到`c_cpp_properties.json`,将上面复制的内容按 `以下格式(一定要注意格式)` 粘贴到`"includePath"`的中括号里。自带的第一行不要删除,在后面加上英文的逗号即可。将复制的内容前面的 -D 替换为工程名,这里的工程名是test,将所有内容使用英文引号包裹,每一行后面使用英文逗号结尾,最后一行不使用逗号,就像下面这样:

![c_cpp_properties.json](https://imgs-dx3.pages.dev/blog_imgs/vscode_stm32_makefile_config8.png)
![c_cpp_properties.json](https://imgs.ronan.us.kg/vscode_stm32_makefile_config8.png)

> 以后每新增加一个工程都可用一样的方法,区别是替换的 `-D` 的工程名要修改为你希望添加的工程名,如果红色警告仍然存在,可能是重复包含,所以你可以在`c_cpp_properties.json` 中的 `"includePath"` 将之前添加的所有 include 路径注释掉,然后只保留你当前聚焦的工程 include 路径即可
![c_cpp_properties.json](https://imgs-dx3.pages.dev/blog_imgs/vscode_stm32_makefile_config8.1.png)
![c_cpp_properties.json](https://imgs.ronan.us.kg/vscode_stm32_makefile_config8.1.png)

# 3.工程调试
### 3.1使用 openocd + stlink 调试
Expand Down Expand Up @@ -155,7 +155,7 @@ Remote debugging using : 3333
先看效果;

![debug](https://imgs-dx3.pages.dev/blog_imgs/vscode_stm32_debug.png)
![debug](https://imgs.ronan.us.kg/vscode_stm32_debug.png)

实现方法:

Expand Down Expand Up @@ -226,9 +226,9 @@ tasks.json:

调试一直卡在 `HAL_Init` 函数里...

![issue](https://imgs-dx3.pages.dev/blog_imgs/vscode_stm32_debug_issue1.png)
![issue](https://imgs.ronan.us.kg/vscode_stm32_debug_issue1.png)

![issue](https://imgs-dx3.pages.dev/blog_imgs/vscode_stm32_debug_issue2.png)
![issue](https://imgs.ronan.us.kg/vscode_stm32_debug_issue2.png)

---

Expand Down

0 comments on commit 82080dc

Please sign in to comment.