keil编译STM32工程时 #error directive: "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
我们可以双击错误,然后会自动定位到文件 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)"的更多相关文章
- 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 ...
- msbuild 编译指定工程时构建脚本的配置
有时候 ,我们编译windows的exe时,我们不需要编译所以的工程,我们只需要指定某个工程就好了,此时我们使用/t:工程名:Rebuild(如果要编译全部工程就把工程名去掉,即/t:Rebuild) ...
- AS导入一个工程出现Error:please select Android SDK的错误
导入一个新的工程出现:Error:please select Android SDK 的错误 现象描述:点击运行程序按钮,弹出一个“Edit Configure”的对话框,最下面报:Error:ple ...
- 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 ...
- VS2010编译以前版本工程时 ERROR CVT1100:duplicate resource,type:MANIFEST解决办法
1.将 Resource Files 里面的 *.exe.manifest 文件删除 2.右键选择 *.rc 文件,选择 view code,查找并删除所有引用 *.exe.manifest 文件的代 ...
- 用xcode6.3编译早期工程时出现Undefined symbols for architecture x86_64错误的解决办法(转)
Xcode升级到5.1 新特性之一就是默认让所有App都通过64位编译器编译.原来在Xcode5.0.x的时候默认的Standard architectures只有(arm7,armv7s),到5.1 ...
- 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 里面.所以如果要解决这个错误 ...
- STM32+IAR 解决Error[Pe147]: declaration is incompatible with "__nounwind __interwork __softfp unsigned
在IAR中编译STM32工程,遇到 Error[Pe147]: declaration is incompatible with "__nounwind __interwork __soft ...
- 使用keil建立标准STM32工程模版(图文详细版!)
1. 模板工程的创建(超级详细版,使用的是keil 4.5版本) 1.1创建工程目录 良好的工程结构能让文件的管理更科学,让开发更容易更方便,希望大家养成良好的习惯,使用具有合理结构的工程目录,当 ...
随机推荐
- linux为命令取别名
在linux的命令中,有些命令很长并且经常使用到,我们可以为命令添加一个别名,格式如下: $ alias 别名='命令' 例如: # 列出home文件夹的文件 $ alias lsh='ls -l / ...
- 思科模拟器软件教程---教你如何划分Vlan
方法/步骤 1.打开Cisco Packet Tracer,点击[交换机],选择第三个图标2960交换机,按住鼠标左键拖动到工作区.这里有很多类型的交换机,但是我们比较常用的是这个. 2.我们选择[终 ...
- HeadFirst设计模式之RMI介绍
一.使用步骤 1.generate stubs and skeletons:Run rmic on the remote implementation class 如:D:\Workspaces\My ...
- 187. Repeated DNA Sequences
题目: All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: " ...
- ArcGIS Engine 几何对象和WKB的转换
using System; using System.Collections.Generic; using System.Text; using GisSharpBlog.NetTopologySui ...
- 一个解决方案下的多个项目共享一个AssemblyInfo
http://stackoverflow.com/questions/18963750/add-file-as-a-link-on-visual-studio-debug-vs-publish htt ...
- git stash
https://git-scm.com/docs/git-stash NAME git-stash - Stash the changes in a dirty working directo ...
- Hibernate中的query.setFirstResult(),query.setMaxResults();
一.query.scroll()和query.setFirstResult(),query.setMaxResults();这两种方法都可以取到一定范围内的数据,用来数据分页显示.那么两者区别,以及两 ...
- LinkedBlockingQueue
LinkedBlockingQueue是一个基于已链接节点的.范围任意的blocking queue的实现. 此队列按 FIFO(先进先出)排序元素.队列的头部 是在队列中时间最长的元素.队列的 ...
- 大四实习准备2_java异常处理_android控件练习
2015-4-24 Java 异常处理 可以有多个catch;ArrayIndexOutOfBoundsException类是Exception类的子类RuntimeException类的一个间接子类 ...