..\SYSTEM\usart\usart.c(21): error: #260-D: explicit type is missing (“int“ assumed)
#include "sys.h"
#include "usart.h"
#if SYSTEM_SUPPORT_OS
#include "includes.h" //ucos 使用
#endif
//加入以下代码,支持printf函数,而不需要选择use MicroLIB
#if 1
#pragma import(__use_no_semihosting)
//标准库需要的支持函数
struct __FILE
{
int handle;
};
FILE __stdout;
//定义_sys_exit()以避免使用半主机模式
_sys_exit(int x)
{
x = x;
}
//重定义fputc函数
int fputc(int ch, FILE *f)
{
while((USART1->SR&0X40)==0);//循环发送,直到发送完毕
USART1->DR = (u8) ch;
return ch;
}
#endif
出现报错:..\SYSTEM\usart\usart.c(21): error: #260-D: explicit type is missing ("int" assumed)
报错分析:该函数没有返回类型,假定其返回类型为int,可以写为void void _sys_exit(int x) ,否则编译器会默认为返回int类型,故会出现上述警告。
解决办法:应该写成void _sys_exit(int x)
..\SYSTEM\usart\usart.c(21): error: #260-D: explicit type is missing (“int“ assumed)相关推荐
- [error] Keil:..\SYSTEM\usart\usart.c(38): error: #260-D: explicit type is missing (“int“ assumed)
问题描述 在学习正点原子寄存器建立工程的时候,在对最终的文件进行编译,但是出现了:..\SYSTEM\usart\usart.c(38): error: #260-D: explicit type i ...
- Error: #260-D: explicit type is missing (int assumed)的解决方法
今天编译一个STM32程序的时候,遇到了一个问题,编译通不过. 输出的错误信息是: ..\SYSTEM\usart\usart.c(41): error: #260-D: explicit type ...
- Caffe编译踩坑(一):/usr/include/boost/system/error_code.hpp:233:21: error: looser throw specifier
近期在尝试跑LiteFlowNet,需要编译caffe,因为服务器上已经安装了CUDA11.3,其采用的环境是CUDA8.0+Cudnn5.1,因此安装了CUDA8.0的相关文件,并安装了gcc-4. ...
- nodejs error Windows_NT 6.1.7601 21 error code ELIFECYCLE 22 error angular-adminlte-plugin@0.1.0
报错日志: 17 error Windows_NT 6.1.7601 18 error argv "D:\\Program Files\\nodejs\\node.exe" &qu ...
- TensorRT升级错误,plugins/poly_layer.h:19:21: error: looser throw specifier for ‘virtual int nvinfer1::
在将tensorrt由7升级到8的过程中,遇到了如下错误 In file included from plugins/poly_layer.cpp:1:0: plugins/poly_layer.h: ...
- ARM平台编译dante出现【configure: error: cannot guess build type; you must specify one】解决方法
编译dante的时候出现: root@ak:~/dante-1.4.2# ./configure --prefix=/usr/local/dante --sysconfdir=/etc --disab ...
- Linux交叉编译问题strace解决 signalfd.c:15: xlat/sfd_flags.h:17: error: size of array 'type name' is negative
产品不是很稳定,执行shell容易出现段错误,为了定位打算移植strace到嵌入式板子上,环境是MIPS平台,从github上下载的strace源码,编译ARM平台通过( ubuntu 12.04 交 ...
- MFC Edit控件 error:“DDX_Control”: 不能将参数 3 从“int”转换为“CWnd ”
在使用MFC的Edit Control等控件时可能你会遇到这样的问题:error:"DDX_Control": 不能将参数 3 从"int"转换为"C ...
- fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
xxxxxx.lib(xxxxxx.obj) : fatal error LNK1112: module machine type 'X86' conflicts with target machin ...
最新文章
- java 加密服务器_Javascript端加密java服务端解密
- web worker原理 SSE原理
- BeetleX之vue-autoui自匹配UI插件
- 【Python管理GPU】pynvml工具的安装与使用
- 数据表的查看 mysql
- 测试用例组织结构_用例和组织结构
- 微信开放平台Android应用的签名
- mssql查询过去一段时间数据库中执行过的语句及执行效率
- 文件包含漏洞的审计(审计思路)
- python怎么更新列表_python更新列表的方法
- 如何查看android应用签名信息
- 不小心删除电脑系统所有字体的解决方法
- FBreader多端同步心得补充
- mdk ac6 CLANG
- 是配置在计算机硬件上的最基本的系统软件,试题库
- 小数化分数的口诀表_循环小数化分数口诀
- jzoj 3426. 封印一击 (Standard IO)
- 基于SPI方式实现OLED屏显
- 大数据、人工智能如何助力市场监管?专家们这样说
- android输入法剪切板历史记录,讯飞输入法剪切板功能知多少?