涂鸦训练营的wbr3开发板收到了,示例代码编译报错-Arduino中文社区 - Powered by Discuz!
查看: 178|回复: 0

涂鸦训练营的wbr3开发板收到了,示例代码编译报错

[复制链接]

签到天数: 36 天

[LV.5]常住居民I

发表于 2021-8-4 12:57 | 显示全部楼层 |阅读模式
涂鸦训练营的wbr3开发板收到了,按照操作指南,装软件,装驱动,设置环境变量,然后就卡在了这里。打开官方提供的示例,编译报错。
有没有老哥能帮忙看看我这问题出在哪里?

QQ图片20210804124707.png



Arduino:1.8.15 (Windows 10), 开发板:"Nucleo-64, Nucleo G071RB, STM32CubeProgrammer (SWD), Enabled (generic 'Serial'), None, Low/Full Speed, Smallest (-Os default), Newlib Nano (default)"





















In file included from d:\Documents\Arduino\libraries\Tuya_WiFi_MCU_SDK\src\TuyaDataPoint.cpp:13:

d:\Documents\Arduino\libraries\Tuya_WiFi_MCU_SDK\src\TuyaDefs.h:49:17: error: expected identifier before numeric constant

   49 | #define DISABLE 0

      |                 ^

C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/CMSIS/Device/ST/STM32G0xx/Include/stm32g0xx.h:132:3: note: in expansion of macro 'DISABLE'

  132 |   DISABLE = 0,

      |   ^~~~~~~

d:\Documents\Arduino\libraries\Tuya_WiFi_MCU_SDK\src\TuyaDefs.h:49:17: error: expected '}' before numeric constant

   49 | #define DISABLE 0

      |                 ^

C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/CMSIS/Device/ST/STM32G0xx/Include/stm32g0xx.h:132:3: note: in expansion of macro 'DISABLE'

  132 |   DISABLE = 0,

      |   ^~~~~~~

In file included from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/stm32/stm32_def.h:38,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/stm32/clock.h:43,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/wiring_time.h:23,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/wiring.h:38,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/Arduino.h:36,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\libraries\SoftwareSerial\src/SoftwareSerial.h:36,

                 from d:\Documents\Arduino\libraries\Tuya_WiFi_MCU_SDK\src\TuyaUart.h:17,

                 from d:\Documents\Arduino\libraries\Tuya_WiFi_MCU_SDK\src\TuyaDataPoint.cpp:15:

C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/CMSIS/Device/ST/STM32G0xx/Include/stm32g0xx.h:131:1: note: to match this '{'

  131 | {

      | ^

In file included from d:\Documents\Arduino\libraries\Tuya_WiFi_MCU_SDK\src\TuyaDataPoint.cpp:13:

d:\Documents\Arduino\libraries\Tuya_WiFi_MCU_SDK\src\TuyaDefs.h:49:17: error: expected unqualified-id before numeric constant

   49 | #define DISABLE 0

      |                 ^

C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/CMSIS/Device/ST/STM32G0xx/Include/stm32g0xx.h:132:3: note: in expansion of macro 'DISABLE'

  132 |   DISABLE = 0,

      |   ^~~~~~~

In file included from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/stm32/stm32_def.h:38,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/stm32/clock.h:43,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/wiring_time.h:23,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/wiring.h:38,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/Arduino.h:36,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\libraries\SoftwareSerial\src/SoftwareSerial.h:36,

                 from d:\Documents\Arduino\libraries\Tuya_WiFi_MCU_SDK\src\TuyaUart.h:17,

                 from d:\Documents\Arduino\libraries\Tuya_WiFi_MCU_SDK\src\TuyaDataPoint.cpp:15:

C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/CMSIS/Device/ST/STM32G0xx/Include/stm32g0xx.h:134:3: error: 'FunctionalState' does not name a type

  134 | } FunctionalState;

      |   ^~~~~~~~~~~~~~~

In file included from d:\Documents\Arduino\libraries\Tuya_WiFi_MCU_SDK\src\TuyaDataPoint.cpp:13:

d:\Documents\Arduino\libraries\Tuya_WiFi_MCU_SDK\src\TuyaDefs.h:33:17: error: expected identifier before numeric constant

   33 | #define SUCCESS 1

      |                 ^

C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/CMSIS/Device/ST/STM32G0xx/Include/stm32g0xx.h:139:3: note: in expansion of macro 'SUCCESS'

  139 |   SUCCESS = 0,

      |   ^~~~~~~

d:\Documents\Arduino\libraries\Tuya_WiFi_MCU_SDK\src\TuyaDefs.h:33:17: error: expected '}' before numeric constant

   33 | #define SUCCESS 1

      |                 ^

C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/CMSIS/Device/ST/STM32G0xx/Include/stm32g0xx.h:139:3: note: in expansion of macro 'SUCCESS'

  139 |   SUCCESS = 0,

      |   ^~~~~~~

In file included from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/stm32/stm32_def.h:38,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/stm32/clock.h:43,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/wiring_time.h:23,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/wiring.h:38,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/Arduino.h:36,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\libraries\SoftwareSerial\src/SoftwareSerial.h:36,

                 from d:\Documents\Arduino\libraries\Tuya_WiFi_MCU_SDK\src\TuyaUart.h:17,

                 from d:\Documents\Arduino\libraries\Tuya_WiFi_MCU_SDK\src\TuyaDataPoint.cpp:15:

C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/CMSIS/Device/ST/STM32G0xx/Include/stm32g0xx.h:138:1: note: to match this '{'

  138 | {

      | ^

In file included from d:\Documents\Arduino\libraries\Tuya_WiFi_MCU_SDK\src\TuyaDataPoint.cpp:13:

d:\Documents\Arduino\libraries\Tuya_WiFi_MCU_SDK\src\TuyaDefs.h:33:17: error: expected unqualified-id before numeric constant

   33 | #define SUCCESS 1

      |                 ^

C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/CMSIS/Device/ST/STM32G0xx/Include/stm32g0xx.h:139:3: note: in expansion of macro 'SUCCESS'

  139 |   SUCCESS = 0,

      |   ^~~~~~~

In file included from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/stm32/stm32_def.h:38,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/stm32/clock.h:43,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/wiring_time.h:23,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/wiring.h:38,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/Arduino.h:36,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\libraries\SoftwareSerial\src/SoftwareSerial.h:36,

                 from d:\Documents\Arduino\libraries\Tuya_WiFi_MCU_SDK\src\TuyaUart.h:17,

                 from d:\Documents\Arduino\libraries\Tuya_WiFi_MCU_SDK\src\TuyaDataPoint.cpp:15:

C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/CMSIS/Device/ST/STM32G0xx/Include/stm32g0xx.h:141:1: error: expected declaration before '}' token

  141 | } ErrorStatus;

      | ^

C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/CMSIS/Device/ST/STM32G0xx/Include/stm32g0xx.h:141:3: error: 'ErrorStatus' does not name a type

  141 | } ErrorStatus;

      |   ^~~~~~~~~~~

In file included from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_dma.h:604,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/STM32G0xx/stm32g0xx_hal_conf_default.h:203,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/STM32G0xx/stm32g0xx_hal_conf.h:13,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal.h:30,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/CMSIS/Device/ST/STM32G0xx/Include/stm32g0xx.h:171,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/stm32/stm32_def.h:38,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/stm32/clock.h:43,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/wiring_time.h:23,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/wiring.h:38,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/Arduino.h:36,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\libraries\SoftwareSerial\src/SoftwareSerial.h:36,

                 from d:\Documents\Arduino\libraries\Tuya_WiFi_MCU_SDK\src\TuyaUart.h:17,

                 from d:\Documents\Arduino\libraries\Tuya_WiFi_MCU_SDK\src\TuyaDataPoint.cpp:15:

C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_dma_ex.h:60:3: error: 'FunctionalState' does not name a type

   60 |   FunctionalState SyncEnable;  /*!< Specifies if the synchronization shall be enabled or disabled

      |   ^~~~~~~~~~~~~~~

C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_dma_ex.h:63:3: error: 'FunctionalState' does not name a type

   63 |   FunctionalState EventEnable;    /*!< Specifies if an event shall be generated once the RequestNumber is reached.

      |   ^~~~~~~~~~~~~~~

In file included from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/STM32G0xx/stm32g0xx_hal_conf_default.h:211,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/STM32G0xx/stm32g0xx_hal_conf.h:13,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal.h:30,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/CMSIS/Device/ST/STM32G0xx/Include/stm32g0xx.h:171,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/stm32/stm32_def.h:38,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/stm32/clock.h:43,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/wiring_time.h:23,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/wiring.h:38,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/Arduino.h:36,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\libraries\SoftwareSerial\src/SoftwareSerial.h:36,

                 from d:\Documents\Arduino\libraries\Tuya_WiFi_MCU_SDK\src\TuyaUart.h:17,

                 from d:\Documents\Arduino\libraries\Tuya_WiFi_MCU_SDK\src\TuyaDataPoint.cpp:15:

C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_adc.h:122:3: error: 'FunctionalState' does not name a type

  122 |   FunctionalState LowPowerAutoWait; /*!< Select the dynamic low power Auto Delay: new conversion start only when the previous

      |   ^~~~~~~~~~~~~~~

C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_adc.h:133:3: error: 'FunctionalState' does not name a type

  133 |   FunctionalState LowPowerAutoPowerOff; /*!< Select the auto-off mode: the ADC automatically powers-off after a conversion and automatically wakes-up when a new conversion is triggered (with startup time between trigger and start of sampling).

      |   ^~~~~~~~~~~~~~~

C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_adc.h:138:3: error: 'FunctionalState' does not name a type

  138 |   FunctionalState ContinuousConvMode; /*!< Specify whether the conversion is performed in single mode (one conversion) or continuous mode for ADC group regular,

      |   ^~~~~~~~~~~~~~~

C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_adc.h:154:3: error: 'FunctionalState' does not name a type

  154 |   FunctionalState DiscontinuousConvMode; /*!< Specify whether the conversions sequence of ADC group regular is performed in Complete-sequence/Discontinuous-sequence

      |   ^~~~~~~~~~~~~~~

C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_adc.h:170:3: error: 'FunctionalState' does not name a type

  170 |   FunctionalState DMAContinuousRequests; /*!< Specify whether the DMA requests are performed in one shot mode (DMA transfer stops when number of conversions is reached)

      |   ^~~~~~~~~~~~~~~

In file included from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/STM32G0xx/stm32g0xx_hal_conf_default.h:211,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/STM32G0xx/stm32g0xx_hal_conf.h:13,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal.h:30,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/CMSIS/Device/ST/STM32G0xx/Include/stm32g0xx.h:171,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/stm32/stm32_def.h:38,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/stm32/clock.h:43,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/wiring_time.h:23,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/wiring.h:38,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/Arduino.h:36,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\libraries\SoftwareSerial\src/SoftwareSerial.h:36,

                 from d:\Documents\Arduino\libraries\Tuya_WiFi_MCU_SDK\src\TuyaUart.h:17,

                 from d:\Documents\Arduino\libraries\Tuya_WiFi_MCU_SDK\src\TuyaDataPoint.cpp:15:

C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_adc.h:203:3: error: 'FunctionalState' does not name a type

  203 |   FunctionalState OversamplingMode;       /*!< Specify whether the oversampling feature is enabled or disabled.

      |   ^~~~~~~~~~~~~~~

C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/STM32G0xx_HAL_Driver/Inc/stm32g0xx_hal_adc.h:286:3: error: 'FunctionalState' does not name a type

  286 |   FunctionalState ITMode;     /*!< Specify whether the analog watchdog is configured in interrupt or polling mode.

      |   ^~~~~~~~~~~~~~~

In file included from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/stm32/stm32_def.h:38,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/stm32/clock.h:43,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/wiring_time.h:23,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/wiring.h:38,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\cores\arduino/Arduino.h:36,

                 from C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\libraries\SoftwareSerial\src/SoftwareSerial.h:36,

                 from d:\Documents\Arduino\libraries\Tuya_WiFi_MCU_SDK\src\TuyaUart.h:17,

                 from d:\Documents\Arduino\libraries\Tuya_WiFi_MCU_SDK\src\TuyaDataPoint.cpp:15:

C:\Users\xincm\AppData\Local\Arduino15\packages\STM32\hardware\stm32\1.9.0\system/Drivers/CMSIS/Device/ST/STM32G0xx/Include/stm32g0xx.h:175:1: error: expected declaration before '}' token

  175 | }

      | ^

exit status 1

为开发板 Nucleo-64 编译时出错。



在文件 -> 首选项开启
“编译过程中显示详细输出”选项
这份报告会包含更多信息。


您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

热门推荐

继电器断开瞬间esp32重启或者网络断开
继电器断开瞬间esp32重启
主要模块: 芯片ESP32-WROOM-32D 供电用的220V转5V模块,700mA 网络LAN8720A模块 继电
【Arduino】168种传感器系列实验(171)---HLK-V20离线语音模块
【Arduino】168种传感器系
37款传感器与模块的提法,在网络上广泛流传,其实Arduino能够兼容的传感器模块肯定是
【Arduino】168种传感器系列实验(181)---1.3寸OLED液晶屏模块
【Arduino】168种传感器系
37款传感器与模块的提法,在网络上广泛流传,其实Arduino能够兼容的传感器模块肯定是
大佬们,帮帮忙
大佬们,帮帮忙
为什么我写的子程序,单独使用运行没问题,两个程序合起来就只会运行一个程序
OLED 128*64自制可达10000000个选项的菜单(已更新)
OLED 128*64自制可达10000
OLED 128*64自制可达10000000个选项的菜单 温馨提示: 建议占个楼再食用本帖子
Copyright   ©2015-2016  Arduino中文社区  Powered by©Discuz!   
快速回复 返回顶部 返回列表