当前位置:网站首页>RT thread uses RT kprintf
RT thread uses RT kprintf
2022-06-24 23:16:00 【Struggling Xiaopeng】
One . brief introduction
be based on stm32 Hardware , Use rt-kprintf function .rtt It uses nano edition .
Welcome to WeChat official account. FPGA The journey
Two . Use
In this function , Finally, the output information is through the call rt_hw_console_output Functional 

And this function is a weak Empty function of type , You can add the output code directly here , Take the most common serial port as an example , Add the following code ok 了 .
/* empty console output */
rt_enter_critical();
while(*str != '\0')
{
HAL_UART_Transmit(&UART1_Handler,(uint8_t *)(str++),1,1000);
}
rt_exit_critical();
If you want to see the output RT Version information for , There is one thing to note , That's initialization usart The position of cannot be placed in main Function , Have to move .
Move to this position , It outputs version information first , Then we can get to main Execute in function , This is the time ,usart It's not initialized yet , So there will be no information output .Cache_Enable The function is stm32H7 Some of the types .

边栏推荐
- How should we measure agile R & D projects?
- 【js】-【数组应用】-学习笔记
- 去处电脑桌面小箭头
- 推送Markdown格式信息到釘釘機器人
- 二分查找数组下标
- Do you need to improve your code reading ability? It's a trick
- Accounting standards for business enterprises application [5]
- canvas 实现图片新增水印
- 花房集团二次IPO:成于花椒,困于花椒
- [postgraduate entrance examination English] prepare for 2023, learn list8 words
猜你喜欢

The extra points and sharp tools are worthy of the trust | know that Chuangyu won the letter of thanks from the defense side of the attack and defense drill!
![[Wuhan University] information sharing of the first and second postgraduate entrance examinations](/img/ec/884e656a921e20a5679a2960c9ac4d.jpg)
[Wuhan University] information sharing of the first and second postgraduate entrance examinations

Detailed explanation of online group chat and dating platform project (servlet implementation)

03_SpingBoot 核心配置文件

#22Map介绍与API

推送Markdown格式信息到釘釘機器人

EPICS记录参考2--EPICS过程数据库概念

Tech Talk 活动回顾|云原生 DevOps 的 Kubernetes 技巧

【基础知识】~ 半加器 & 全加器

并发之共享模型管程
随机推荐
Learn about redlock
Docker installation redis- simple without pit
Servlet
07_ Springboot for restful style
idea创建模块提示已存在
Research and investment strategy report on China's nano silver wire conductive film industry (2022 Edition)
数字IC设计经验整理(二)
Construction equipment [5]
Listen to the markdown file and hot update next JS page
vulnhub DC: 2
03_ Spingboot core profile
【nvm】
冒泡排序
MySQL kills 10 people. How many questions can you hold on to?
257. 关押罪犯
A big factory interview must ask: how to solve the problem of TCP reliable transmission? 8 pictures for you to learn in detail
伪原创智能改写api百度-收录良好
laravel 消息队列
Daily practice (22): maximum sum of continuous subarrays
2022 safety officer-a certificate examination questions and answers