会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
纸船
博客园
首页
新随笔
联系
订阅
管理
2021年9月2日
STM32 printf() 重定向到串口UART
摘要: 1,重定义 fputc 函数 2,包含头文件 #include "stdio.h" 3,代码中即可使用 printf() 打印 ✳ 如果编译没有报错但是串口工具没有接收到打印,检查下有没有勾选 MicroLIB
阅读全文
posted @ 2021-09-02 00:35 纸船
阅读(220)
评论(0)
推荐(0)
2021年8月31日
正则表达式个人使用案例收集
摘要: 1,给所有日志打印添加换号 括号中的内容用 \1 代替 说明:※ 括号 () 选中的为一个字段,替换时用 \1 替代 ※ 字段中的括号 ( 和 \ 等特殊字符,需要加 \ 进行转义 ※ .*表示匹配任意个字符 2,删除空行【匹配命令:^\s*\n】
阅读全文
posted @ 2021-08-31 10:39 纸船
阅读(28)
评论(0)
推荐(0)
STM32 RTT打印日志
摘要: 1,获取RTT源码 在JLink的安装目录下,没有的去官网下载:SEGGER - The Embedded Experts - Downloads - J-Link / J-Trace 2,将RTT文件夹拷到项目代码中,参照下图添加进工程即可使用 3,打开JLink安装目录下的JLinkRTTVie
阅读全文
posted @ 2021-08-31 00:24 纸船
阅读(695)
评论(0)
推荐(0)
2021年8月30日
MDK 下使用 JLink ITM 输出log
摘要: 1,将如下内容拷贝到一个.c文件中放到工程中编译 #include <string.h> #include <stdio.h> #define ITM_Port8(n) (*((volatile unsigned char *)(0xE0000000+4*n))) #define ITM_Port1
阅读全文
posted @ 2021-08-30 23:19 纸船
阅读(339)
评论(0)
推荐(0)
2021年7月6日
TeraTerm下载方法
摘要: 1,官网下载页面确定需要的软件版本号和对应编号【https://zh.osdn.net/projects/ttssh2/releases/74780】 2,该网页下将网址中编号和版本号改为想要下载的版本【https://osdn.net/projects/ttssh2/downloads/74780
阅读全文
posted @ 2021-07-06 20:07 纸船
阅读(2071)
评论(0)
推荐(1)
2021年5月17日
C++ chrono使用简单示例
摘要: #include <iostream> #include <thread> void customSleep() { std::this_thread::sleep_for(std::chrono::milliseconds(5)); std::this_thread::sleep_for(std:
阅读全文
posted @ 2021-05-17 15:51 纸船
阅读(447)
评论(0)
推荐(0)
C++ tuple使用简单示例
摘要: #include <iostream> #include <string> #include <tuple> using namespace std; int main () { tuple<string,int> tt[10]; for(int i=0; i<10; i++) { tt[i] =
阅读全文
posted @ 2021-05-17 14:30 纸船
阅读(227)
评论(0)
推荐(0)
2021年5月5日
单链表创建
摘要: 示例代码: #include <iostream> using namespace std; typedef struct Lnode { int data; struct Lnode * next; }LNode; int main() { LNode *head, *p; head = (LNo
阅读全文
posted @ 2021-05-05 11:44 纸船
阅读(9)
评论(0)
推荐(0)
2021年4月16日
CodeBlocks C++编译调试器
摘要: 是时候淘汰VC++ 6.0这个老古董啦~ CodeBlocks不仅免费,而且体积小,功能还够强。 1,下载地址 https://www.codeblocks.org/downloads/binaries/ 根据需要下载我们需要的版本 2,配置编译工具(不带编译环境版本需要配置) 1)配置编译工具链路
阅读全文
posted @ 2021-04-16 14:36 纸船
阅读(242)
评论(0)
推荐(0)
2021年4月2日
GpsUtcTime定义
摘要: typedef int64_t GpsUtcTime; 原来一直找不到GpsUtcTime的定义,后来发现是在gps.h中 gps.h位于:https://android.googlesource.com/platform/hardware/libhardware/+/android-4.2.2_r
阅读全文
posted @ 2021-04-02 11:46 纸船
阅读(141)
评论(0)
推荐(0)
下一页
公告