您当前的位置: 首页 >  stm32

仙剑情缘

暂无认证

  • 0浏览

    0关注

    333博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

STM32加入RTT打印文件编译警告解决

仙剑情缘 发布时间:2020-03-09 22:56:11 ,浏览量:0

  • STM32加入RTT打印相关文件,编译产生以下错误
Build started: Project: led_blink
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'Target 1'
compiling core_cm3.c...
compiling misc.c...
compiling stm32f10x_usart.c...
compiling stm32f10x_gpio.c...
compiling stm32f10x_exti.c...
compiling system_stm32f10x.c...
compiling stm32f10x_rcc.c...
compiling main.c...
.\SEGGER\SEGGER_RTT_Conf.h(263): warning:  #47-D: incompatible redefinition of macro "SEGGER_RTT_LOCK"  (declared at line 197)
      #define SEGGER_RTT_LOCK()   {                                                                   \
.\SEGGER\SEGGER_RTT_Conf.h(270): warning:  #47-D: incompatible redefinition of macro "SEGGER_RTT_UNLOCK"  (declared at line 198)
      #define SEGGER_RTT_UNLOCK()   BASEPRI = LockState;                                              \
User\main.c: 2 warnings, 0 errors
compiling stm32f10x_it.c...
compiling list.c...
.\SEGGER\SEGGER_RTT_Conf.h(263): warning:  #47-D: incompatible redefinition of macro "SEGGER_RTT_LOCK"  (declared at line 197)
      #define SEGGER_RTT_LOCK()   {                                                                   \
.\SEGGER\SEGGER_RTT_Conf.h(270): warning:  #47-D: incompatible redefinition of macro "SEGGER_RTT_UNLOCK"  (declared at line 198)
      #define SEGGER_RTT_UNLOCK()   BASEPRI = LockState;                                              \
freeRTOS\list.c: 2 warnings, 0 errors
compiling croutine.c...
.\SEGGER\SEGGER_RTT_Conf.h(263): warning:  #47-D: incompatible redefinition of macro "SEGGER_RTT_LOCK"  (declared at line 197)
      #define SEGGER_RTT_LOCK()   {                                                                   \
.\SEGGER\SEGGER_RTT_Conf.h(270): warning:  #47-D: incompatible redefinition of macro "SEGGER_RTT_UNLOCK"  (declared at line 198)
      #define SEGGER_RTT_UNLOCK()   BASEPRI = LockState;                                              \
freeRTOS\croutine.c: 2 warnings, 0 errors
compiling event_groups.c...
.\SEGGER\SEGGER_RTT_Conf.h(263): warning:  #47-D: incompatible redefinition of macro "SEGGER_RTT_LOCK"  (declared at line 197)
      #define SEGGER_RTT_LOCK()   {                                                                   \
.\SEGGER\SEGGER_RTT_Conf.h(270): warning:  #47-D: incompatible redefinition of macro "SEGGER_RTT_UNLOCK"  (declared at line 198)
      #define SEGGER_RTT_UNLOCK()   BASEPRI = LockState;                                              \
freeRTOS\event_groups.c: 2 warnings, 0 errors
compiling stream_buffer.c...
.\SEGGER\SEGGER_RTT_Conf.h(263): warning:  #47-D: incompatible redefinition of macro "SEGGER_RTT_LOCK"  (declared at line 197)
      #define SEGGER_RTT_LOCK()   {                                                                   \
.\SEGGER\SEGGER_RTT_Conf.h(270): warning:  #47-D: incompatible redefinition of macro "SEGGER_RTT_UNLOCK"  (declared at line 198)
      #define SEGGER_RTT_UNLOCK()   BASEPRI = LockState;                                              \
freeRTOS\stream_buffer.c: 2 warnings, 0 errors
compiling queue.c...
.\SEGGER\SEGGER_RTT_Conf.h(263): warning:  #47-D: incompatible redefinition of macro "SEGGER_RTT_LOCK"  (declared at line 197)
      #define SEGGER_RTT_LOCK()   {                                                                   \
.\SEGGER\SEGGER_RTT_Conf.h(270): warning:  #47-D: incompatible redefinition of macro "SEGGER_RTT_UNLOCK"  (declared at line 198)
      #define SEGGER_RTT_UNLOCK()   BASEPRI = LockState;                                              \
freeRTOS\queue.c: 2 warnings, 0 errors
compiling SEGGER_RTT.c...
SEGGER\SEGGER_RTT_Conf.h(263): warning:  #47-D: incompatible redefinition of macro "SEGGER_RTT_LOCK"  (declared at line 197)
      #define SEGGER_RTT_LOCK()   {                                                                   \
SEGGER\SEGGER_RTT_Conf.h(270): warning:  #47-D: incompatible redefinition of macro "SEGGER_RTT_UNLOCK"  (declared at line 198)
      #define SEGGER_RTT_UNLOCK()   BASEPRI = LockState;                                              \
SEGGER\SEGGER_RTT.c: 2 warnings, 0 errors
compiling SEGGER_RTT_printf.c...
SEGGER\SEGGER_RTT_Conf.h(263): warning:  #47-D: incompatible redefinition of macro "SEGGER_RTT_LOCK"  (declared at line 197)
      #define SEGGER_RTT_LOCK()   {                                                                   \
SEGGER\SEGGER_RTT_Conf.h(270): warning:  #47-D: incompatible redefinition of macro "SEGGER_RTT_UNLOCK"  (declared at line 198)
      #define SEGGER_RTT_UNLOCK()   BASEPRI = LockState;                                              \
SEGGER\SEGGER_RTT_printf.c: 2 warnings, 0 errors
compiling timers.c...
.\SEGGER\SEGGER_RTT_Conf.h(263): warning:  #47-D: incompatible redefinition of macro "SEGGER_RTT_LOCK"  (declared at line 197)
      #define SEGGER_RTT_LOCK()   {                                                                   \
.\SEGGER\SEGGER_RTT_Conf.h(270): warning:  #47-D: incompatible redefinition of macro "SEGGER_RTT_UNLOCK"  (declared at line 198)
      #define SEGGER_RTT_UNLOCK()   BASEPRI = LockState;                                              \
freeRTOS\timers.c: 2 warnings, 0 errors
compiling tasks.c...
.\SEGGER\SEGGER_RTT_Conf.h(263): warning:  #47-D: incompatible redefinition of macro "SEGGER_RTT_LOCK"  (declared at line 197)
      #define SEGGER_RTT_LOCK()   {                                                                   \
.\SEGGER\SEGGER_RTT_Conf.h(270): warning:  #47-D: incompatible redefinition of macro "SEGGER_RTT_UNLOCK"  (declared at line 198)
      #define SEGGER_RTT_UNLOCK()   BASEPRI = LockState;                                              \
freeRTOS\tasks.c: 2 warnings, 0 errors
compiling heap_4.c...
.\SEGGER\SEGGER_RTT_Conf.h(263): warning:  #47-D: incompatible redefinition of macro "SEGGER_RTT_LOCK"  (declared at line 197)
      #define SEGGER_RTT_LOCK()   {                                                                   \
.\SEGGER\SEGGER_RTT_Conf.h(270): warning:  #47-D: incompatible redefinition of macro "SEGGER_RTT_UNLOCK"  (declared at line 198)
      #define SEGGER_RTT_UNLOCK()   BASEPRI = LockState;                                              \
freeRTOS\portable\MemMang\heap_4.c: 2 warnings, 0 errors
compiling port.c...
.\SEGGER\SEGGER_RTT_Conf.h(263): warning:  #47-D: incompatible redefinition of macro "SEGGER_RTT_LOCK"  (declared at line 197)
      #define SEGGER_RTT_LOCK()   {                                                                   \
.\SEGGER\SEGGER_RTT_Conf.h(270): warning:  #47-D: incompatible redefinition of macro "SEGGER_RTT_UNLOCK"  (declared at line 198)
      #define SEGGER_RTT_UNLOCK()   BASEPRI = LockState;                                              \
freeRTOS\portable\RVDS\ARM_CM3\port.c: 2 warnings, 0 errors
linking...
Program Size: Code=13276 RO-data=336 RW-data=160 ZI-data=11448  
FromELF: creating hex file...
".\Objects\input.axf" - 0 Error(s), 24 Warning(s).
Build Time Elapsed:  00:00:04
  • 解决方案
将C/C++页面中的GUN选项取消

  • 再次编译后,解决警告

 

 

 

 

关注
打赏
1658017818
查看更多评论
立即登录/注册

微信扫码登录

0.8123s