Keil IAR - Cortex M3 调试问题及解决方法(3)

24 篇文章 0 订阅
4 篇文章 0 订阅

上次谈到由于stm32官方库和iar ew arm 的不断升级, 多出配置都发生了 变化,


1在使用 ewarm 6.30 升级stm32 stdlib 3.5 出现了这个错误

Error(Pe47)   declaration is incompatible with "__interwork__softfp unsigned long __get_PSP(void)", 

”declaration “ 说明有文件中定义冲突。

查了一下,IAR自己带了CMSIS的库文件,而我们本地工程下也有CMSIS,

因此我们选择IAR自带的就没有问题了。

步骤如下:



Please follow the following steps:
under project options:
1- on the "General Options" option in the "Library Configuration" tab 
   check the checkbox “Use CMSIS”
2- on the "C/C++ Compiler" option in the "Preprocessor" tab 
   remove the include directory of CM3 "$PROJ_DIR$\..\..\Libraries\CMSIS\CM3\CoreSupport"


具体操作可以参考这份文档,

http://pan.baidu.com/share/link?shareid=1418960730&uk=120859721


2 stm32 库里的 printf 报错

错误 : FILE is undefined

FILE 是stdio.h 里的,所以查看这个文件

#if _DLIB_FILE_DESCRIPTOR
  typedef _Filet FILE;
#endif /* _DLIB_FILE_DESCRIPTOR */

要用FILE先要开 _DLIB_FILE_DESCRIPTOR

查了一下

stdio.h中

/* Module consistency. */
#pragma rtmodel="__dlib_file_descriptor",_STRINGIFY(_DLIB_FILE_DESCRIPTOR)

再查到DLib_Defaults.h


#ifndef _DLIB_FILE_DESCRIPTOR
#define _DLIB_FILE_DESCRIPTOR 0
#endif

把0  改为1 就可以了,先去除只读属性。



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值