摘要: 1,重定义 fputc 函数 2,包含头文件 #include "stdio.h" 3,代码中即可使用 printf() 打印 ✳ 如果编译没有报错但是串口工具没有接收到打印,检查下有没有勾选 MicroLIB 阅读全文
posted @ 2021-09-02 00:35 纸船 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 1,给所有日志打印添加换号 括号中的内容用 \1 代替 说明:※ 括号 () 选中的为一个字段,替换时用 \1 替代 ※ 字段中的括号 ( 和 \ 等特殊字符,需要加 \ 进行转义 ※ .*表示匹配任意个字符 2,删除空行【匹配命令:^\s*\n】 阅读全文
posted @ 2021-08-31 10:39 纸船 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 1,获取RTT源码 在JLink的安装目录下,没有的去官网下载:SEGGER - The Embedded Experts - Downloads - J-Link / J-Trace 2,将RTT文件夹拷到项目代码中,参照下图添加进工程即可使用 3,打开JLink安装目录下的JLinkRTTVie 阅读全文
posted @ 2021-08-31 00:24 纸船 阅读(595) 评论(0) 推荐(0) 编辑
摘要: 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 纸船 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 1,官网下载页面确定需要的软件版本号和对应编号【https://zh.osdn.net/projects/ttssh2/releases/74780】 2,该网页下将网址中编号和版本号改为想要下载的版本【https://osdn.net/projects/ttssh2/downloads/74780 阅读全文
posted @ 2021-07-06 20:07 纸船 阅读(1752) 评论(0) 推荐(1) 编辑
摘要: #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 纸船 阅读(414) 评论(0) 推荐(0) 编辑
摘要: #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 纸船 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 示例代码: #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 纸船 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 是时候淘汰VC++ 6.0这个老古董啦~ CodeBlocks不仅免费,而且体积小,功能还够强。 1,下载地址 https://www.codeblocks.org/downloads/binaries/ 根据需要下载我们需要的版本 2,配置编译工具(不带编译环境版本需要配置) 1)配置编译工具链路 阅读全文
posted @ 2021-04-16 14:36 纸船 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 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 纸船 阅读(122) 评论(0) 推荐(0) 编辑