Chinaunix首页 | 论坛 | 博客
  • 博客访问: 910175
  • 博文数量: 84
  • 博客积分: 4334
  • 博客等级: 上校
  • 技术积分: 1610
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-27 07:49
文章分类

全部博文(84)

文章存档

2012年(5)

2011年(21)

2010年(58)

分类: 嵌入式

2011-05-07 18:57:29

1.新建工程的时候编译出现如下错误(MDK4.12  使用v3.4的库

..\CMSIS\stm32f10x.h(80): error:  #35: #error directive: "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"

解决方法:双击错误进入出错的地方,在stm32f10x.h处

  1. #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)
  2.  #error "Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"
  3. #endif

这时需要设置预处理编译符号:由于自己使用的是红牛开发板,所用芯片为STM32F103ZET6,故添加STM32F10X_HD符号,如下图:

设置完成之后重新编译出现新的问题:

..\StdPeriph_Lib\src\misc.c(98): warning:  #223-D: function "assert_param" declared implicitly

......

......

.\Obj\ProLed.axf: Error: L6218E: Undefined symbol assert_param (referred from misc.o).

需要添加一个新的预处理符号:USE_STDPERIPH_DRIVER,与之前的STM32F10X_HD符号用一个空格隔开。

附上一个自己新作的模板:

固件库:v3.4

软件版本:RealView MDK 4.12

 01_ProLed.rar   

阅读(29950) | 评论(0) | 转发(2) |
给主人留下些什么吧!~~