Keil compiling the STM32 Project #error directive: "Please select first the target stm32f10x device used in your application File) "

Source: Internet
Author: User

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) "

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.