Hi there 👋

啥也不懂,但是感觉很有趣

Markdwown

markdown 速查 <!-- markdown-cheat-sheet.md --> <!-- 用 Markdown Preview Enhanced 打开效果最佳 --> # Markdown 语法速查表 > 一份文件看遍所有常用语法。 --- ## 1. 标题(Heading) ```markdown # H1 ## H2 ### H3 #### H4 ##### H5 ###### H6 渲染效果: H1 H2 H3 H4 H5 H6 段落与换行 这是第一段。 行尾两个空格 → 换行。 这是第二段,中间空一行才是新段落。 强调 *斜体* 或 _斜体_ **粗体** 或 __粗体__ ***粗斜体*** 或 ___粗斜体___ ~~删除线~~ 高亮(需扩展)==高亮文字== 渲染: 斜体 粗体 粗斜体 删除线 ==高亮文字== 引用(Blockquote) > 一级引用 >> 二级引用 >>> 三级引用 一级引用 ...

August 7, 2025 · 2 min · 331 words · Me

Aqtinstall一个qt安装工具

aqt( aqtinstall )是一个 Python 命令行工具,用来“离线”下载并安装 Qt 官方二进制包,而不用打开 Qt Online Installer 它把 Qt 维护工具背后的在线仓库接口封装成了 pip 一键装、脚本一键拉的形式,CI/CD 跑镜像、Docker 打包、嵌入式 SDK 自动构建时特别好用。 核心能力 持 Windows、macOS、Linux(x64、aarch64 等)。 可按版本、模块、目标架构精确拉包,比如只装 6.7.2 的 mingw 版或 msvc2019_arm64 版。 支持附加工具:QtCreator、IFW、MinGW、Ninja、CMake、llvm-mingw 等。 支持文档、示例、源码的独立下载 安装aqt pip3 install aqt 或者 scoop install aqtinstall #需要使用scoop工具 查看可用的版本 可以使用aqt list-qt <系统类型> <平台类型> 进行可用版本的检索 aqt list-qt linux desktop 此指令将先科可用的所有版本号 每行一个 如下 5.9.0 5.9.1 5.9.2 5.9.3 5.9.4 5.9.5 5.9.6 5.9.7 5.9.8 5.9.9 5.10.0 5.10.1 5.11.0 5.11.1 5.11.2 5.11.3 5.12.0 5.12.1 5.12.2 5.12.3 5.12.4 5.12.5 5.12.6 5.12.7 5.12.8 5.12.9 5.12.10 5.12.11 5.12.12 5.13.0 5.13.1 5.13.2 5.14.0 5.14.1 5.14.2 5.15.0 5.15.1 5.15.2 6.0.0 6.0.1 6.0.2 6.0.3 6.0.4 6.1.0 6.1.1 6.1.2 6.1.3 6.2.0 6.2.1 6.2.2 6.2.3 6.2.4 6.3.0 6.3.1 6.3.2 6.4.0 6.4.1 6.4.2 6.4.3 6.5.0 6.5.1 6.5.2 6.5.3 6.6.0 6.6.1 6.6.2 6.6.3 6.7.0 6.7.1 6.7.2 6.7.3 6.8.0 6.8.1 6.8.2 6.8.3 6.9.0 6.9.1 6.10.0 可以 使用 aqt list-qt <host> <target> --arch <版本号>来获得可用编译器例如 ...

September 15, 2020 · 1 min · 209 words · CL

Code_snippet

自制printf #include <stdio.h> #include "stdint.h" #include <stdarg.h> int my_printf(const char *format, ...) { staitc char tmp_str[100] = {0}; va_list args; va_start(args, format); uint8_t len = vsprintf(tmp_str, format, args); va_end(args); // 长度为 len 内容在 tmp_str中 // uart_send_buf(串口, tmp_str,len); printf("str len->%d str is [%s]\n", len, tmp_str); return 0; } int main(void) { printf("Hello, World!\n"); my_printf("hello world %d\n",100); return 0; } hex dump void hexdump(uint8_t *buf, uint32_t len) { int i = 0; printf("----------------------hexdump------------------------"); for(i = 0; i < len; i++) { printf("%02x ", buf[i]); if( (i+1) % 16 == 0) { printf("\n"); } } if(i%16 != 0) { printf("\n"); } printf("---------------------hexdump-------------------------\n"); } pandas 大量数据绘图 import pandas as pd import matplotlib.pyplot as plt # 假设 A 和 B 是你的大数据集 A = pd.Series(your_large_array_A) B = pd.Series(your_large_array_B) # 创建 DataFrame df = pd.DataFrame({'A': A, 'B': B}) # 绘制折线图 df.plot(x='A', y='B') plt.show() keil生成bin文件 fromelf --bin -o "$L@L.bin" "#L 激活windows irm https://get.activated.win | iex vscode中 clangd插件 在 设置中增加-compile-commands-dir=${workspaceFolder}/build 出现stdio.h找不到时 在项目根目录下创建 .clangd文件 写入以下内容 两个头文件路径添加 CompileFlags: Add: --target=arm-none-eabi -isystem C:/RJ/arm-gnu-toolchain-14.3.rel1-mingw-w64-x86_64-arm-none-eabi/arm-none-eabi/include -isystem C:/RJ/arm-gnu-toolchain-14.3.rel1-mingw-w64-x86_64-arm-none-eabi/lib/gcc/arm-none-eabi/14.3.1/include

September 15, 2020 · 1 min · 163 words · CL

Flashdb

移植falshDB步骤 下载 FlashDB和 SFUD两个代码库 FLashDB SFUD 将项目文件添加到项目中 关键文件如下: sfud库文件包括:sfud.c sfud_sfdp.c sfud_port.c fal库文件包括 :fal.c fal_flash.c fal_partition.c flashDB库文件包括: fdb.c fdb.file.c fdb_kvdb.c fdb_tsdb.c fdb-utils.c 头文件夹包括 FUD\sfud\inc lashDB\port\fal\inc lashDB\inc 在 flashDB\inc文件夹中 找到 fdb_cfg_template.h 复制一份并修改为 fdb_cfg.h 在 flashDB\port\fal\src中 新建fal_falsh_sfud_port.c并加入项目中 内容何以仿照FlashDB\port\fal\samples\porting\fal_flash_sfud_port.c中的内容。 修改sfud库中的 sfud_port文件内容 主要是编写spi_write_read函数,和sfud_spi_port_init 修改sfud_cfg.h文件,调整 SFUD_FLASH_DEVICE_TABLE中的falsh配置。如果使用的falsh不支持JEDEC切sfud未添加支持,则需要在sfud_flash_def.h文件中 增加相关内容。 调整fal_falsh_sfud_port.c 使他配合时机falsh情况,在使用sfud的情况下 配合sfud相关函数, 在 fal_cfg.h中 调整fal分区表(FAL_PART_TABLE)和和falsh设备表(FAL_FLASH_DEV_TABLE) 分区表的第二个项目是分区名称,需要在后续数据库初始化时使用。设备表中的项目来自于 前面添加的fal_falsh_sfud_port.c中的结构体。 在合适的位置增加printf兼容移植内容,方便debug部分输出。 初始化部分流程:sfud_init()→sfud_device_init()→fal_init()→fdb_xxdb_init()在没有出错的情况下 就已经可以进行falshdb的功能的使用了。

September 15, 2020 · 1 min · 52 words · CL

Git 子模块

速查表 查看状态:git submodule status 拉取远端变更:git submodule update --remote 递归遍历执行命令:git submodule foreach 'git checkout main && git pull' Git 子模块(submodule)允许你在一个仓库里嵌套并追踪另一个仓库的某个特定提交。 它常用于“主项目 + 库依赖”的场景:主项目保持独立版本演进,库代码又始终指向一个确定的提交。 首次引入子模块 # 把 https://github.com/vendor/libfoo.git 固定到 v2.1.0 并放到主仓库的 deps/libfoo 目录 git submodule add -b v2.1.0 https://github.com/vendor/libfoo.git deps/libfoo git commit -m "Add libfoo as submodule at v2.1.0" 这一步会生成 .gitmodules 文件并记录子模块路径 & URL。 子模块目录里只有“指针文件”(gitlink),真正的仓库在 .git/modules/...。 克隆带子模块的仓库(第一次拉代码的人) git clone https://github.com/you/main.git cd main # 方法 A:一次性把子模块代码也拉下来(推荐) git submodule update --init --recursive # 方法 B:clone 时一步到位 git clone --recurse-submodules https://github.com/you/main.git 日常更新子模块(指向新版本) cd deps/libfoo git fetch git checkout v2.3.0 # 或 git pull origin main 等 cd ../.. git add deps/libfoo # 更新指针 git commit -m "Bump libfoo to v2.3.0" 注意:主仓库只记录“子模块的提交 ID”,不记录分支名;所以切换后一定要 git add 再提交。 ...

September 15, 2020 · 1 min · 200 words · CL

各种换源

pip换源 可用源 清华:https://pypi.tuna.tsinghua.edu.cn/simple 阿里云:http://mirrors.aliyun.com/pypi/simple/ 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/ 更换方式(以阿里云为例) 永久更换1 pip config set global.index-url http://mirrors.aliyun.com/pypi/simple/ 永久更换2 修改 ~/.pip/pip.conf文件 [global] index-url = [http://xxxxxx](http://mirrors.aliyun.com/pypi/simple/) [install] trusted-host = [mirrors.xxxxxx.com](http://mirrors.aliyun.com/pypi/simple/) 临时更换 pip install pandas -i https://xxxxx.com/simple npm换源 可用下的源列表 更换方式 指令设置 设置为 阿里云镜像 npm config set registry https://npm.aliyun.com 设置为 官方镜像 npm config set registry https://registry.npmjs.org/ 查看当前设置的镜像 npm config get registry

September 15, 2020 · 1 min · 53 words · CL