The error information is as follows:
../../../../GD32F10x_ Firmware_ Library/CMSIS/GD/GD32F10x/Include\gd32f10x.h(168): error: redefinition of enumerator ‘USBD_ HP_ CAN0_ TX_ IRQn’
../../../../GD32F10x_ Firmware_ Library/CMSIS/GD/GD32F10x/Include\gd32f10x.h(169): error: redefinition of enumerator ‘USBD_ LP_ CAN0_ RX0_ IRQn’
Cause of problem:
Preprocessor symbols should be set to gd32f10x_ MD, but it is set to gd32f10x_ HD
Analysis description:
Preprocessor symbols
Preprocessor symbols means preprocessing symbols, which is equivalent to macro definitions. When we use the gd32 firmware library, because the firmware library contains the definitions of the whole series of GD microcontrollers. At this time, the define box can be used as a global macro definition, that is, select which part of the definitions and resources in the firmware library I want to adopt.
USE_STDPERIPH_DRIVER
It literally means “use standard peripheral driver”. Adding “use_stdperiph_driver” to the C/C + + predefined allows “use standard peripheral driver”. As for the added “gd32f10x_hd”, it can also be explained in the file “gd32f10x. H” through function search as described above. In fact, it also switches some definitions of corresponding hardware.
GD32F10X_HD&GD32F10X_MD
In fact, it defines the capacity of the chip
/* define GD32F10x */
#if !defined (GD32F10X_MD) && !defined (GD32F10X_HD) && !defined (GD32F10X_XD) && !defined (GD32F10X_CL)
/* #define GD32F10X_MD */ /*!< GD32F10X_MD: GD32 Medium density devices */
/* #define GD32F10X_HD */ /*!< GD32F10X_HD: GD32 High density Value Line devices */
/* #define GD32F10X_XD */ /*!< GD32F10X_XD: GD32 Extra density devices */
/* #define GD32F10X_CL */ /*!< GD32F10X_CL: GD32 Connectivity line devices */
#endif /* define GD32F10x */
Read More:
- [Solved] configure: error: C++ preprocessor “/lib/cpp” fails sanity check
- Function declare Error: Error C231: ‘delay300us’: redefinition
- result = e.symbols[symb] KeyError: b‘system‘ [How to Solve]
- [Solved] C++ Error: Undefined symbols for architecture x86_64:
- [Solved] QT error: //usr/local/lib/libvtkCommonCore-9.1.so.1: error adding symbols: DSO missing from command
- error LNK2019: Unresolvable external symbols “__declspec(dllimport) public: int __thiscall QString::toWCharArray(wchar_t
- [Solved] error adding symbols: File in wrong format collect2: error: ld returned 1 exit status
- This limit can be set by changing the [search.max_open_scroll_context] setting
- Cmake Setting Support C++11 This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options
- Win10 Right-Click desktop to Display Setting Error [How to Solve]
- [Solved] An error occurred while processing your request…enable the Development environment by setting …
- Setting label malloc in MAC development_ error_ Break breakpoint (Xcode)
- target is multiclass but average=’binary’. please choose another average setting.
- [Solved] Git Clone Error: error setting certificate verify locations
- TypeException: Error setting non null for parameter #1 with JdbcType null
- AOP Error Cannot resolve reference to bean ‘txPointCut‘ while setting bean property ‘po
- Mybatis Integrate SQLSERER Null Value Error: Error setting null for parameter # with JdbcType OTHER
- [Solved] STM8L151 IAR Project Compile Error: Fatal Error[Pe035]: #error directive: “Please select first the target STM8L…
- Visual Studio 2012 error C4996: ‘scanf’: This function or variable may be unsafe.
- Error 2 error c2491: XX: definition of dllimport static data member is not allowed