问题一:SYSTEM\usart\usart.c(41): error: #260-D: explicit type is missing (“int” assumed)

在编译工程时出现了SYSTEM\usart\usart.c(41): error: #260-D: explicit type is missing ("int" assumed)这样的警告,
在定义 _sys_exit(int x) 以避免使用半主机模式,这时函数是没有返回类型的,
假定返回类型为int,可以改为void _sys_exit(int x)消除出现上述警告。

问题二:Library reports error: __use_no_semihosting was request

在处理问题一后编译出现了Library reports error: __use_no_semihosting was request错误,
解决办法是:在MDK Options 选项 Target选项卡下勾选Use MicroLIB
SYSTEM\usart\usart.c(41): error: #260-D: explicit type is missing ("int" assumed)
最后,完美编译。
SYSTEM\usart\usart.c(41): error: #260-D: explicit type is missing ("int" assumed)

相关文章:

  • 2021-09-03
  • 2021-06-07
  • 2022-12-23
  • 2021-11-10
  • 2021-06-17
  • 2022-12-23
  • 2021-10-22
猜你喜欢
  • 2021-12-08
  • 2022-01-14
  • 2022-01-25
  • 2021-07-11
  • 2021-08-29
  • 2021-08-31
相关资源
相似解决方案