在写STM32程序的时候
①我用到了#include “stdlib.h”这个头文件,里面包括一些malloc、exit、free等函数;
②我是用的正点原子的官方usart函数文件。
在这样的前提下出现错误:
Library reports error: __use_no_semihosting was requested, but _ttywrch was referenced

解决办法:
在usart.c文件的
_sys_exit(int x)
{
x = x;
}
大约47行后面加入
//__use_no_semihosting was requested, but _ttywrch was
_ttywrch(int ch)
{
ch = ch;
}
STM32报错、报错状况以及解决办法:Library reports error: __use_no_semihosting was requested, but _ttywrch was refer

这样就完美解决了!

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-03
  • 2022-01-03
  • 2021-05-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-03
  • 2022-01-04
  • 2021-05-28
  • 2021-04-05
  • 2021-07-06
  • 2022-02-24
相关资源
相似解决方案