STM32移植systick定时器时出现错物error:#20:identifier"IRQn_Type"isundefined
2017-08-04 14:47
1031 查看
这个错误本人在网上搜寻找到答案:由于stm32迷你开发板自带的移植例程跟自己移植的有所不同,因此在移植过程中有些费劲。在定义自己的Systick.c进行初始化时,需要调用到core_cm3.h这个函数,而在core_cm3.h这个函数中有用到IRQn_Type类型名的地方,此类型名的定义是在”stm32f10x.h”中定义的,因此在delay.c中调用头文件时一定要先调用stm32f10x.h再调用core_cm3.h这个函数,至此函数编译成功。
例如这样添加头文件:
#include “stm32f10x.h”
#include “core_cm3.h”
编译成功;
#include “core_cm3.h”
#include “stm32f10x.h”
编译失败出现上述所说问题。
切记以后不能再犯这样低级的错误!!!
例如这样添加头文件:
#include “stm32f10x.h”
#include “core_cm3.h”
编译成功;
#include “core_cm3.h”
#include “stm32f10x.h”
编译失败出现上述所说问题。
切记以后不能再犯这样低级的错误!!!
相关文章推荐
- 关于STM32工程的错误,狗血错误。。。..\CMSIS\core_cm3.h(1087): error: #20: identifier "IRQn_Type" is undefined
- STM32用IAR调试出现Error[Pe020]: identifier "FILE" is undefined 解决方法
- STM32用IAR调试出现Error[Pe020]: identifier "FILE" is undefined 解决方法
- 解决Stm32出现..\HARDWARE\ADC\adc.c(22): error: #20: identifier "ADC_InitTypeDef" is undefined异常
- STM32用IAR调试出现Error[Pe020]: identifier "FILE" is undefined 解决方法
- STM32用IAR调试出现Error[Pe020]: identifier "FILE" is undefined 解决方法
- STM32编译出现 Error[Li005]: no definition for "assert_param"
- STM32 HAL库 error: #20: identifier "HAL_StatusTypeDef" is undefined问题
- cocos2dx通过用cygwin移植时出现 error: undefined reference to "XXX类:XX()"
- Xcode7.3编译unity导出工程出现 Error "unknown type name __declspec" after Xcode 7.3 upgrade
- Keil 工程出现 error: #757: variable "uint32_t" is not a type name的一次纠错历程(最后没解决)
- error: #20: identifier "stm32f10x_xxxx.h" is undefined
- Stm32_调试出现 Error:Flash Download Failed-"Cortex-M3" 解决方案。
- keil(MDK)中出现error: #513: a value of type "int" cannot be assigned to an entity of type "char *",即函数返回值无法赋值给对应变量的错误
- JS调用Android中的方法时出现 "Uncaught TypeError: Object [object Object] has no method
- cocos2dx通过用cygwin移植时出现 error: undefined reference to "XXX类:XX()"
- 调试stm32时经常出现Error:Flash Download Failed-"Cortex-M3"
- keil(MDK)中出现error: #513: a value of type "int" cannot be assigned to an entity of type "char *",即函数返
- Stm32_调试出现 Error:Flash Download Failed-"Cortex-M3" 解决方案。
- 编译代码时出现/usr/include/boost/type_traits/detail/has_binary_operator.hp:50: Parse error at "BOOST_JOIN"错