Keil IAR - Cortex M3 调试问题及解决方法(3)
上次谈到由于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 “ 说明有文件中定义冲突。
查了一下,3.5 中cmsis 分开成了两个文件夹,一个是core 一个device, 这个正是答案。
具体操作可以参考这份文档,
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 就可以了,先去除只读属性。