我们可以双击错误,然后会自动定位到文件 stm32f10x.h 中出错的地方,可以看到代码:

#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

这是因为 3.5 版本的库函数在配置和选择外设的时候通过宏定义来选择的,所以我们需要配
置 一 个 全 局 的 宏 定 义 变 量 。 按 照 步 骤 16 , 定 位 到 c/c++ 界 面 , 然 后 copy
“STM32F10X_MD,USE_STDPERIPH_DRIVER”到 Define 里面。
这里解释一下,如果你用的是大容量那么 STM32F10X_MD 修改为 STM32F10X_HD,小容
量修改为 STM32F10X_LD. 然后点击 OK。

keil编译STM32工程时 #error directive: "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"的更多相关文章

  1. stm32的hall库新建模板编译错误: #error "Please select first the target STM32F1xx device used in your application (in stm32f1xx.h file)"的处理

    在stm32f1xx.h file文件中找到如下代码: /* Uncomment the line below according to the target STM32L device used i ...

  2. msbuild 编译指定工程时构建脚本的配置

    有时候 ,我们编译windows的exe时,我们不需要编译所以的工程,我们只需要指定某个工程就好了,此时我们使用/t:工程名:Rebuild(如果要编译全部工程就把工程名去掉,即/t:Rebuild) ...

  3. AS导入一个工程出现Error:please select Android SDK的错误

    导入一个新的工程出现:Error:please select Android SDK 的错误 现象描述:点击运行程序按钮,弹出一个“Edit Configure”的对话框,最下面报:Error:ple ...

  4. VS2010编译VS2008工程时,LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

    1.问题 电脑上同时安装了VS2008,VS2010,使用VS2010编译VS2008建立的工程,或者,VS2010创建新的工程.编译时,出现以下链接错误: LINK : fatal error LN ...

  5. VS2010编译以前版本工程时 ERROR CVT1100:duplicate resource,type:MANIFEST解决办法

    1.将 Resource Files 里面的 *.exe.manifest 文件删除 2.右键选择 *.rc 文件,选择 view code,查找并删除所有引用 *.exe.manifest 文件的代 ...

  6. 用xcode6.3编译早期工程时出现Undefined symbols for architecture x86_64错误的解决办法(转)

    Xcode升级到5.1 新特性之一就是默认让所有App都通过64位编译器编译.原来在Xcode5.0.x的时候默认的Standard architectures只有(arm7,armv7s),到5.1 ...

  7. core_cm4.h(129): error: #35: #error directive: "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"

    今天使用 systick 的时候,只使用了头文件 core_cm4.h,结果就报错了,原因是 __FPU_PRESENT 没有定义,这个定义其实在 stm32f4xx.h 里面.所以如果要解决这个错误 ...

  8. STM32+IAR 解决Error[Pe147]: declaration is incompatible with "__nounwind __interwork __softfp unsigned

    在IAR中编译STM32工程,遇到 Error[Pe147]: declaration is incompatible with "__nounwind __interwork __soft ...

  9. 使用keil建立标准STM32工程模版(图文详细版!)

    1.   模板工程的创建(超级详细版,使用的是keil 4.5版本) 1.1创建工程目录 良好的工程结构能让文件的管理更科学,让开发更容易更方便,希望大家养成良好的习惯,使用具有合理结构的工程目录,当 ...

随机推荐

  1. Why does yum return error: [Errno 256] No more mirrors to try ?

    https://access.redhat.com/solutions/203603 ISSUE yum update fails with the error : [Errno 256] No mo ...

  2. web页面浮动回到顶部功能和浮动广告

    实现测试浮动回到顶部 法一:用js实现<%@ Page Language="C#" AutoEventWireup="true" CodeBehind=& ...

  3. red5研究(一):下载,工程建立、oflaDemo安装、demo测试

    一.red5下载.添加工程到myeclipse 1,从官网上下载red51.01版本(我下载的是red51.0的版本),下载链接http://www.red5.org/downloads/red5/1 ...

  4. 封装SqlHelper

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.C ...

  5. HeadFirst设计模式之状态模式

    一. 1. 2.The State Pattern allows an object to alter its behavior when its internal state changes. Th ...

  6. 最受欢迎的5个Android ORM框架

    在开发Android应用时,保存数据有这么几个方式, 一个是本地保存,一个是放在后台(提供API接口),还有一个是放在开放云服务上(如 SyncAdapter 会是一个不错的选择). 对于第一种方式, ...

  7. python学习链接

    http://www.cnblogs.com/dkblog/archive/2011/06/24/2089026.html 异常处理 http://xiagu1.iteye.com/blog/6195 ...

  8. JavaScript Function.apply() 函数详解

    apply()函数用于调用当前函数functionObject,并可同时使用指定对象thisObj作为本次函数执行时函数内部的this指针引用. 该函数属于Function对象,所有主流浏览器均支持该 ...

  9. vmware-tools安装指南

    为什么要安装VMware Tools? 因为它可以改善Virtual Machine 的运行性能,可以让鼠标能在本地主机和虚拟机中随意出入,而且Host OS 和Guest OS可以 互通有无,实现文 ...

  10. HashMap Hashtable ArrayList HashSet

    一.散列 1. HashMap 1)  hashmap的数据结构 Hashmap是一个数组和链表的结合体(在数据结构称“链表散列“),如下图示: 当我们往hashmap中put元素的时候,先根据key ...