From 82080dcd861d286abaeca94b08e7d1c369b95942 Mon Sep 17 00:00:00 2001 From: Ronan Date: Sat, 12 Oct 2024 19:11:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E6=89=80=E6=9C=89?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E5=9B=BE=E7=89=87=E9=93=BE=E6=8E=A5=E4=B8=BA?= =?UTF-8?q?imgs.ronan.ud.kg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...00\345\215\225\345\256\236\347\216\260.md" | 4 +-- ...70\347\224\250\345\221\275\344\273\244.md" | 2 +- _posts/2024-09-02-JavaScript.md | 2 +- ...15\345\257\206\347\231\273\345\275\225.md" | 4 +-- ...12\344\274\240\350\204\232\346\234\254.md" | 4 +-- ...10\346\236\234\351\205\215\347\275\256.md" | 2 +- ...346\233\277\344\273\243 Docker Desktop.md" | 2 +- ...16\345\212\250\346\200\201\345\272\223.md" | 8 +++--- ...43\345\206\263\346\226\271\346\263\225.md" | 6 ++-- ...45\347\250\213\346\250\241\346\235\277.md" | 4 +-- ...56\351\242\230\350\247\243\345\206\263.md" | 28 +++++++++---------- 11 files changed, 33 insertions(+), 33 deletions(-) diff --git "a/_posts/2024-09-02-Dockerfile\347\232\204\347\256\200\345\215\225\345\256\236\347\216\260.md" "b/_posts/2024-09-02-Dockerfile\347\232\204\347\256\200\345\215\225\345\256\236\347\216\260.md" index d1acb5f..6c61ecc 100644 --- "a/_posts/2024-09-02-Dockerfile\347\232\204\347\256\200\345\215\225\345\256\236\347\216\260.md" +++ "b/_posts/2024-09-02-Dockerfile\347\232\204\347\256\200\345\215\225\345\256\236\347\216\260.md" @@ -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 diff --git "a/_posts/2024-09-02-Docker\345\270\270\347\224\250\345\221\275\344\273\244.md" "b/_posts/2024-09-02-Docker\345\270\270\347\224\250\345\221\275\344\273\244.md" index 3d88a7b..97e0ae9 100644 --- "a/_posts/2024-09-02-Docker\345\270\270\347\224\250\345\221\275\344\273\244.md" +++ "b/_posts/2024-09-02-Docker\345\270\270\347\224\250\345\221\275\344\273\244.md" @@ -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 diff --git a/_posts/2024-09-02-JavaScript.md b/_posts/2024-09-02-JavaScript.md index 14e4d21..832ffcc 100644 --- a/_posts/2024-09-02-JavaScript.md +++ b/_posts/2024-09-02-JavaScript.md @@ -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 = { diff --git "a/_posts/2024-09-02-SSH \345\205\215\345\257\206\347\231\273\345\275\225.md" "b/_posts/2024-09-02-SSH \345\205\215\345\257\206\347\231\273\345\275\225.md" index 7aed2be..e6aa5fd 100644 --- "a/_posts/2024-09-02-SSH \345\205\215\345\257\206\347\231\273\345\275\225.md" +++ "b/_posts/2024-09-02-SSH \345\205\215\345\257\206\347\231\273\345\275\225.md" @@ -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) 恭喜,你已经完成第一步! @@ -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`(公钥)两个文件,恭喜,你已经完成第二步了,离成功更近了! diff --git "a/_posts/2024-09-02-Typora\345\233\276\345\272\212\350\207\252\345\212\250\344\270\212\344\274\240\350\204\232\346\234\254.md" "b/_posts/2024-09-02-Typora\345\233\276\345\272\212\350\207\252\345\212\250\344\270\212\344\274\240\350\204\232\346\234\254.md" index 0f16c4e..85a5f74 100644 --- "a/_posts/2024-09-02-Typora\345\233\276\345\272\212\350\207\252\345\212\250\344\270\212\344\274\240\350\204\232\346\234\254.md" +++ "b/_posts/2024-09-02-Typora\345\233\276\345\272\212\350\207\252\345\212\250\344\270\212\344\274\240\350\204\232\346\234\254.md" @@ -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) 记得在插入图片时选择`上传图片`,并勾选`对本地位置的图片应用上述规则`。 @@ -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) 记得在插入图片时选择`上传图片`,并勾选`对本地位置的图片应用上述规则`。 diff --git "a/_posts/2024-09-02-vscode\347\243\250\347\240\202\346\225\210\346\236\234\351\205\215\347\275\256.md" "b/_posts/2024-09-02-vscode\347\243\250\347\240\202\346\225\210\346\236\234\351\205\215\347\275\256.md" index 9afb3a7..160d632 100644 --- "a/_posts/2024-09-02-vscode\347\243\250\347\240\202\346\225\210\346\236\234\351\205\215\347\275\256.md" +++ "b/_posts/2024-09-02-vscode\347\243\250\347\240\202\346\225\210\346\236\234\351\205\215\347\275\256.md" @@ -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.配置文件 diff --git "a/_posts/2024-09-02-\343\200\214OrbStack\343\200\215Mac \347\263\273\347\273\237\344\270\255\344\270\200\344\270\252\346\233\264\345\277\253\347\232\204 Docker \345\217\257\350\247\206\345\214\226\345\267\245\345\205\267\357\274\214\345\217\257\345\256\214\345\205\250\346\233\277\344\273\243 Docker Desktop.md" "b/_posts/2024-09-02-\343\200\214OrbStack\343\200\215Mac \347\263\273\347\273\237\344\270\255\344\270\200\344\270\252\346\233\264\345\277\253\347\232\204 Docker \345\217\257\350\247\206\345\214\226\345\267\245\345\205\267\357\274\214\345\217\257\345\256\214\345\205\250\346\233\277\344\273\243 Docker Desktop.md" index 14d4999..79061df 100644 --- "a/_posts/2024-09-02-\343\200\214OrbStack\343\200\215Mac \347\263\273\347\273\237\344\270\255\344\270\200\344\270\252\346\233\264\345\277\253\347\232\204 Docker \345\217\257\350\247\206\345\214\226\345\267\245\345\205\267\357\274\214\345\217\257\345\256\214\345\205\250\346\233\277\344\273\243 Docker Desktop.md" +++ "b/_posts/2024-09-02-\343\200\214OrbStack\343\200\215Mac \347\263\273\347\273\237\344\270\255\344\270\200\344\270\252\346\233\264\345\277\253\347\232\204 Docker \345\217\257\350\247\206\345\214\226\345\267\245\345\205\267\357\274\214\345\217\257\345\256\214\345\205\250\346\233\277\344\273\243 Docker Desktop.md" @@ -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)管理平台。 diff --git "a/_posts/2024-09-02-\351\235\231\346\200\201\345\272\223\344\270\216\345\212\250\346\200\201\345\272\223.md" "b/_posts/2024-09-02-\351\235\231\346\200\201\345\272\223\344\270\216\345\212\250\346\200\201\345\272\223.md" index 7bd9437..7c1bf16 100644 --- "a/_posts/2024-09-02-\351\235\231\346\200\201\345\272\223\344\270\216\345\212\250\346\200\201\345\272\223.md" +++ "b/_posts/2024-09-02-\351\235\231\346\200\201\345\272\223\344\270\216\345\212\250\346\200\201\345\272\223.md" @@ -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) 生成静态链接库的具体步骤如下: @@ -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) 生成动态链接库的具体步骤如下: @@ -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 动态库 @@ -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) diff --git "a/_posts/2024-09-03-PlatformIO\347\203\247\345\275\225\345\244\261\350\264\245(51\347\263\273\345\210\227)\350\247\243\345\206\263\346\226\271\346\263\225.md" "b/_posts/2024-09-03-PlatformIO\347\203\247\345\275\225\345\244\261\350\264\245(51\347\263\273\345\210\227)\350\247\243\345\206\263\346\226\271\346\263\225.md" index c17ed65..5abc574 100644 --- "a/_posts/2024-09-03-PlatformIO\347\203\247\345\275\225\345\244\261\350\264\245(51\347\263\273\345\210\227)\350\247\243\345\206\263\346\226\271\346\263\225.md" +++ "b/_posts/2024-09-03-PlatformIO\347\203\247\345\275\225\345\244\261\350\264\245(51\347\263\273\345\210\227)\350\247\243\345\206\263\346\226\271\346\263\225.md" @@ -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) diff --git "a/_posts/2024-09-08-\343\200\214platformIO\343\200\215\345\237\272\344\272\216 stm32 \346\240\207\345\207\206\345\244\226\350\256\276\345\272\223\347\232\204\345\267\245\347\250\213\346\250\241\346\235\277.md" "b/_posts/2024-09-08-\343\200\214platformIO\343\200\215\345\237\272\344\272\216 stm32 \346\240\207\345\207\206\345\244\226\350\256\276\345\272\223\347\232\204\345\267\245\347\250\213\346\250\241\346\235\277.md" index e35af4b..1fff4ed 100644 --- "a/_posts/2024-09-08-\343\200\214platformIO\343\200\215\345\237\272\344\272\216 stm32 \346\240\207\345\207\206\345\244\226\350\256\276\345\272\223\347\232\204\345\267\245\347\250\213\346\250\241\346\235\277.md" +++ "b/_posts/2024-09-08-\343\200\214platformIO\343\200\215\345\237\272\344\272\216 stm32 \346\240\207\345\207\206\345\244\226\350\256\276\345\272\223\347\232\204\345\267\245\347\250\213\346\250\241\346\235\277.md" @@ -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) 工程建立成功之后,应该是下面这样: diff --git "a/_posts/2024-09-26-vscode + stm32CubeMX + Makefile\345\267\245\347\250\213\344\273\245\345\217\212\351\227\256\351\242\230\350\247\243\345\206\263.md" "b/_posts/2024-09-26-vscode + stm32CubeMX + Makefile\345\267\245\347\250\213\344\273\245\345\217\212\351\227\256\351\242\230\350\247\243\345\206\263.md" index 26350c5..15fdf98 100644 --- "a/_posts/2024-09-26-vscode + stm32CubeMX + Makefile\345\267\245\347\250\213\344\273\245\345\217\212\351\227\256\351\242\230\350\247\243\345\206\263.md" +++ "b/_posts/2024-09-26-vscode + stm32CubeMX + Makefile\345\267\245\347\250\213\344\273\245\345\217\212\351\227\256\351\242\230\350\247\243\345\206\263.md" @@ -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) --- @@ -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 调试 @@ -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) 实现方法: @@ -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) ---