We can double-click the error and then automatically navigate to the error in the file stm32f10x.h where you can see the code:
#if!defined (stm32f10x_ld) &&!defined (STM32F10X_LD_VL) &&!defined
(STM32F10X_MD) &&!defined (STM32F10X_MD_VL) &&!defined (STM32F10X_HD)
&&!defined (STM32F10X_HD_VL) &&!defined (STM32F10X_XL) &&!defined
(STM32F10X_CL)
#error "Please select first the target stm32f10x device used in your application (in Stm32f10x.h
File) "
#endif
This is because the 3.5 version of the library function is selected by macro definition when configuring and selecting peripherals, so we need to match
Set a global macro definition variable. Follow step 16, navigate to the C + + interface, and then copy
"Stm32f10x_md,use_stdperiph_driver" to Define inside.
Here's an explanation, if you're using large capacity then STM32F10X_MD modified to STM32F10X_HD, Yung
The volume is modified to STM32F10X_LD. then click OK.
Keil compiling the STM32 Project #error directive: "Please select first the target stm32f10x device used in your application File) "