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创建工程目录 良好的工程结构能让文件的管理更科学,让开发更容易更方便,希望大家养成良好的习惯,使用具有合理结构的工程目录,当 ...
随机推荐
- Android Spannable
ApiDemo 源码至 com.example.android.apis.text.Link 类. 首先,看一下其运行效果: 要给 TextView 加上效果,方式主要有几种: 第一种,自动应用效果, ...
- 【HDOJ】2459 Maximum repetition substring
后缀数组+RMQ. /* 2459 */ #include <iostream> #include <sstream> #include <string> #inc ...
- Complete The Pattern #6 - Odd Ladder
Complete The Pattern #6 - Odd Ladder Task: You have to write a function pattern which creates the fo ...
- Android开发UI之textview实现高亮显示并点击跳转
textview实现高亮显示,带下划线,带背景,主要是通过SpannableString类实现. 具体实现请看代码: TextView showMoreContent=(TextView)findvi ...
- .net 测试工具类
fluentassertions QuickStart (替换Assert ) https://github.com/dennisdoomen/fluentassertions/wiki Moq ...
- 卸载sqlserver数据库参考
这多半是以前安装过MSSQL,没卸载干净导致的. 解决方法如下: 一.先把MSSQL卸载干净 1.在添加删除程序中把SQL Server卸载 :2.把Microsoft SQL Server文件夹整个 ...
- NET下RabbitMQ实践[实战篇]
之前的文章中,介绍了如何将RabbitMQ以WCF方式进行发布.今天就介绍一下我们产品中如何使用RabbitMQ的! 在Discuz!NT企业版中,提供了对HTTP错误日志的记录功能 ...
- 探讨NSString和NSMutableString的内存问题以及copy和MutableCopy两个方法
NSString: //main.m #import <Foundation/Foundation.h> int main(int argc, const char * argv[]) { ...
- Kettle简介
ETL和Kettle简介 ETL即数据抽取(Extract).转换(Transform).装载(Load)的过程.它是构建数据仓库的重要环节.数据仓库是面向主题的.集成的.稳定的且随时间不断变 ...
- ChineseCounter.cs 统计中文文本中常用字占比
http://www.tuicool.com/articles/qmMba2 1 using System; using System.IO; using System.Collections.Gen ...