专家
公告
财富商城
电子网
旗下网站
首页
问题库
专栏
标签库
话题
专家
NEW
门户
发布
提问题
发文章
STM32
关于keil编译的问题
2019-07-20 05:34
发布
×
打开微信“扫一扫”,打开网页后点击屏幕右上角分享按钮
站内问答
/
STM32/STM8
15259
8
1707
我按照原子的教程,自己新建了一个F4的工程文件,但编译的时候出现两个stm32f4xx.h,导致编译不通过,很多定义重复了
但我USER文件下只有一个stm32f4xx.h,我也试过原子自带教程的工程文件,编译没有问题,能够通过。
肯定是我哪里没设置对出现的问题,我试着打开过这两个头文件,应该是同一个.h,请教一下谁遇到过这个问题
友情提示:
此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
8条回答
巫妖
2019-07-20 16:56
本帖最后由 巫妖 于 2018-9-5 17:01 编辑
qiuzhicheng 发表于 2018-9-5 16:56
错误提示是什么
我查过这些错误,都是在stm32f4xx.h头文件里定义命名的
..FWLIBsrcstm32f4xx_fmc.c(144): error: #20: identifier "FMC_Bank1" is undefined
FMC_Bank1->BTCR[FMC_Bank] = 0x000030DB;
..FWLIBsrcstm32f4xx_fmc.c(149): error: #20: identifier "FMC_Bank1" is undefined
FMC_Bank1->BTCR[FMC_Bank] = 0x000030D2;
..FWLIBsrcstm32f4xx_fmc.c(151): error: #20: identifier "FMC_Bank1" is undefined
FMC_Bank1->BTCR[FMC_Bank + 1] = 0x0FFFFFFF;
..FWLIBsrcstm32f4xx_fmc.c(152): error: #20: identifier "FMC_Bank1E" is undefined
FMC_Bank1E->BWTR[FMC_Bank] = 0x0FFFFFFF;
..FWLIBsrcstm32f4xx_fmc.c(191): error: #20: identifier "FMC_Bank1" is undefined
FMC_Bank1->BTCR[FMC_NORSRAMInitStruct->FMC_Bank] =
..FWLIBsrcstm32f4xx_fmc.c(242): error: #20: identifier "FMC_Bank1E" is undefined
FMC_Bank1E->BWTR[FMC_NORSRAMInitStruct->FMC_Bank] =
..FWLIBsrcstm32f4xx_fmc.c(252): error: #20: identifier "FMC_Bank1E" is undefined
FMC_Bank1E->BWTR[FMC_NORSRAMInitStruct->FMC_Bank] = 0x0FFFFFFF;
..FWLIBsrcstm32f4xx_fmc.c(304): error: #20: identifier "FMC_Bank1" is undefined
FMC_Bank1->BTCR[FMC_Bank] |= BCR_MBKEN_SET;
..FWLIBsrcstm32f4xx_fmc.c(309): error: #20: identifier "FMC_Bank1" is undefined
FMC_Bank1->BTCR[FMC_Bank] &= BCR_MBKEN_RESET;
..FWLIBsrcstm32f4xx_fmc.c(377): error: #20: identifier "FMC_Bank2" is undefined
FMC_Bank2->PCR2 = 0x00000018;
..FWLIBsrcstm32f4xx_fmc.c(386): error: #20: identifier "FMC_Bank3" is undefined
FMC_Bank3->PCR3 = 0x00000018;
..FWLIBsrcstm32f4xx_fmc.c(445): error: #20: identifier "FMC_Bank2" is undefined
FMC_Bank2->PCR2 = tmppcr;
..FWLIBsrcstm32f4xx_fmc.c(452): error: #20: identifier "FMC_Bank3" is undefined
FMC_Bank3->PCR3 = tmppcr;
..FWLIBsrcstm32f4xx_fmc.c(504): error: #20: identifier "FMC_Bank2" is undefined
FMC_Bank2->PCR2 |= PCR_PBKEN_SET;
..FWLIBsrcstm32f4xx_fmc.c(508): error: #20: identifier "FMC_Bank3" is undefined
FMC_Bank3->PCR3 |= PCR_PBKEN_SET;
..FWLIBsrcstm32f4xx_fmc.c(516): error: #20: identifier "FMC_Bank2" is undefined
FMC_Bank2->PCR2 &= PCR_PBKEN_RESET;
..FWLIBsrcstm32f4xx_fmc.c(520): error: #20: identifier "FMC_Bank3" is undefined
FMC_Bank3->PCR3 &= PCR_PBKEN_RESET;
..FWLIBsrcstm32f4xx_fmc.c(544): error: #20: identifier "FMC_Bank2" is undefined
FMC_Bank2->PCR2 |= PCR_ECCEN_SET;
..FWLIBsrcstm32f4xx_fmc.c(548): error: #20: identifier "FMC_Bank3" is undefined
FMC_Bank3->PCR3 |= PCR_ECCEN_SET;
..FWLIBsrcstm32f4xx_fmc.c(556): error: #20: identifier "FMC_Bank2" is undefined
FMC_Bank2->PCR2 &= PCR_ECCEN_RESET;
..FWLIBsrcstm32f4xx_fmc.c(560): error: #20: identifier "FMC_Bank3" is undefined
FMC_Bank3->PCR3 &= PCR_ECCEN_RESET;
..FWLIBsrcstm32f4xx_fmc.c(580): error: #20: identifier "FMC_Bank2" is undefined
eccval = FMC_Bank2->ECCR2;
..FWLIBsrcstm32f4xx_fmc.c(585): error: #20: identifier "FMC_Bank3" is undefined
eccval = FMC_Bank3->ECCR3;
..FWLIBsrcstm32f4xx_fmc.c(640): error: #20: identifier "FMC_Bank4" is undefined
FMC_Bank4->PCR4 = 0x00000018;
..FWLIBsrcstm32f4xx_fmc.c(676): error: #20: identifier "FMC_Bank4" is undefined
FMC_Bank4->PCR4 = (uint32_t)FMC_PCCARDInitStruct->FMC_Waitfeature |
..FWLIBsrcstm32f4xx_fmc.c(739): error: #20: identifier "FMC_Bank4" is undefined
FMC_Bank4->PCR4 |= PCR_PBKEN_SET;
..FWLIBsrcstm32f4xx_fmc.c(744): error: #20: identifier "FMC_Bank4" is undefined
FMC_Bank4->PCR4 &= PCR_PBKEN_RESET;
..FWLIBsrcstm32f4xx_fmc.c(809): error: #20: identifier "FMC_Bank5_6" is undefined
FMC_Bank5_6->SDCR[FMC_Bank] = 0x000002D0;
..FWLIBsrcstm32f4xx_fmc.c(868): error: #20: identifier "FMC_Bank5_6" is undefined
FMC_Bank5_6->SDCR[FMC_SDRAMInitStruct->FMC_Bank] = tmpr1;
..FWLIBsrcstm32f4xx_fmc.c(876): error: #20: identifier "FMC_Bank5_6" is undefined
FMC_Bank5_6->SDCR[FMC_Bank1_SDRAM] = tmpr3;
..FWLIBsrcstm32f4xx_fmc.c: 0 warnings, 30 errors
加载中...
查看其它8个回答
一周热门
更多
>
相关问题
STM32F4上I2C(在PROTEUS中模拟)调试不通的问题
6 个回答
芯片供应紧张,准备换个MCU,MM32L系列替换STM32L系列的怎么样?
7 个回答
STM32同时使用两个串口进行数据收发时数据丢包的问题
5 个回答
STM32F103串口通信死机问题
4 个回答
STM32WLE5CC连接SX1268在LoRa模式下能与 SX1278互通吗?
2 个回答
相关文章
ST公司第一款无线低功耗单片机模块有效提高物联网设计生产效率
0个评论
如何实现对单片机寄存器的访问
0个评论
通过USB用STM32片内自带Bootloader下载程序及注意事项
0个评论
欲练此功必先自宫之STM32汇编启动,放慢是为了更好的前行
0个评论
×
关闭
采纳回答
向帮助了您的知道网友说句感谢的话吧!
非常感谢!
确 认
×
关闭
编辑标签
最多设置5个标签!
STM32
保存
关闭
×
关闭
举报内容
检举类型
检举内容
检举用户
检举原因
广告推广
恶意灌水
回答内容与提问无关
抄袭答案
其他
检举说明(必填)
提交
关闭
×
打开微信“扫一扫”,打开网页后点击屏幕右上角分享按钮
×
付费偷看金额在0.1-10元之间
确定
×
关闭
您已邀请
0
人回答
查看邀请
擅长该话题的人
回答过该话题的人
我关注的人
我查过这些错误,都是在stm32f4xx.h头文件里定义命名的
..FWLIBsrcstm32f4xx_fmc.c(144): error: #20: identifier "FMC_Bank1" is undefined
FMC_Bank1->BTCR[FMC_Bank] = 0x000030DB;
..FWLIBsrcstm32f4xx_fmc.c(149): error: #20: identifier "FMC_Bank1" is undefined
FMC_Bank1->BTCR[FMC_Bank] = 0x000030D2;
..FWLIBsrcstm32f4xx_fmc.c(151): error: #20: identifier "FMC_Bank1" is undefined
FMC_Bank1->BTCR[FMC_Bank + 1] = 0x0FFFFFFF;
..FWLIBsrcstm32f4xx_fmc.c(152): error: #20: identifier "FMC_Bank1E" is undefined
FMC_Bank1E->BWTR[FMC_Bank] = 0x0FFFFFFF;
..FWLIBsrcstm32f4xx_fmc.c(191): error: #20: identifier "FMC_Bank1" is undefined
FMC_Bank1->BTCR[FMC_NORSRAMInitStruct->FMC_Bank] =
..FWLIBsrcstm32f4xx_fmc.c(242): error: #20: identifier "FMC_Bank1E" is undefined
FMC_Bank1E->BWTR[FMC_NORSRAMInitStruct->FMC_Bank] =
..FWLIBsrcstm32f4xx_fmc.c(252): error: #20: identifier "FMC_Bank1E" is undefined
FMC_Bank1E->BWTR[FMC_NORSRAMInitStruct->FMC_Bank] = 0x0FFFFFFF;
..FWLIBsrcstm32f4xx_fmc.c(304): error: #20: identifier "FMC_Bank1" is undefined
FMC_Bank1->BTCR[FMC_Bank] |= BCR_MBKEN_SET;
..FWLIBsrcstm32f4xx_fmc.c(309): error: #20: identifier "FMC_Bank1" is undefined
FMC_Bank1->BTCR[FMC_Bank] &= BCR_MBKEN_RESET;
..FWLIBsrcstm32f4xx_fmc.c(377): error: #20: identifier "FMC_Bank2" is undefined
FMC_Bank2->PCR2 = 0x00000018;
..FWLIBsrcstm32f4xx_fmc.c(386): error: #20: identifier "FMC_Bank3" is undefined
FMC_Bank3->PCR3 = 0x00000018;
..FWLIBsrcstm32f4xx_fmc.c(445): error: #20: identifier "FMC_Bank2" is undefined
FMC_Bank2->PCR2 = tmppcr;
..FWLIBsrcstm32f4xx_fmc.c(452): error: #20: identifier "FMC_Bank3" is undefined
FMC_Bank3->PCR3 = tmppcr;
..FWLIBsrcstm32f4xx_fmc.c(504): error: #20: identifier "FMC_Bank2" is undefined
FMC_Bank2->PCR2 |= PCR_PBKEN_SET;
..FWLIBsrcstm32f4xx_fmc.c(508): error: #20: identifier "FMC_Bank3" is undefined
FMC_Bank3->PCR3 |= PCR_PBKEN_SET;
..FWLIBsrcstm32f4xx_fmc.c(516): error: #20: identifier "FMC_Bank2" is undefined
FMC_Bank2->PCR2 &= PCR_PBKEN_RESET;
..FWLIBsrcstm32f4xx_fmc.c(520): error: #20: identifier "FMC_Bank3" is undefined
FMC_Bank3->PCR3 &= PCR_PBKEN_RESET;
..FWLIBsrcstm32f4xx_fmc.c(544): error: #20: identifier "FMC_Bank2" is undefined
FMC_Bank2->PCR2 |= PCR_ECCEN_SET;
..FWLIBsrcstm32f4xx_fmc.c(548): error: #20: identifier "FMC_Bank3" is undefined
FMC_Bank3->PCR3 |= PCR_ECCEN_SET;
..FWLIBsrcstm32f4xx_fmc.c(556): error: #20: identifier "FMC_Bank2" is undefined
FMC_Bank2->PCR2 &= PCR_ECCEN_RESET;
..FWLIBsrcstm32f4xx_fmc.c(560): error: #20: identifier "FMC_Bank3" is undefined
FMC_Bank3->PCR3 &= PCR_ECCEN_RESET;
..FWLIBsrcstm32f4xx_fmc.c(580): error: #20: identifier "FMC_Bank2" is undefined
eccval = FMC_Bank2->ECCR2;
..FWLIBsrcstm32f4xx_fmc.c(585): error: #20: identifier "FMC_Bank3" is undefined
eccval = FMC_Bank3->ECCR3;
..FWLIBsrcstm32f4xx_fmc.c(640): error: #20: identifier "FMC_Bank4" is undefined
FMC_Bank4->PCR4 = 0x00000018;
..FWLIBsrcstm32f4xx_fmc.c(676): error: #20: identifier "FMC_Bank4" is undefined
FMC_Bank4->PCR4 = (uint32_t)FMC_PCCARDInitStruct->FMC_Waitfeature |
..FWLIBsrcstm32f4xx_fmc.c(739): error: #20: identifier "FMC_Bank4" is undefined
FMC_Bank4->PCR4 |= PCR_PBKEN_SET;
..FWLIBsrcstm32f4xx_fmc.c(744): error: #20: identifier "FMC_Bank4" is undefined
FMC_Bank4->PCR4 &= PCR_PBKEN_RESET;
..FWLIBsrcstm32f4xx_fmc.c(809): error: #20: identifier "FMC_Bank5_6" is undefined
FMC_Bank5_6->SDCR[FMC_Bank] = 0x000002D0;
..FWLIBsrcstm32f4xx_fmc.c(868): error: #20: identifier "FMC_Bank5_6" is undefined
FMC_Bank5_6->SDCR[FMC_SDRAMInitStruct->FMC_Bank] = tmpr1;
..FWLIBsrcstm32f4xx_fmc.c(876): error: #20: identifier "FMC_Bank5_6" is undefined
FMC_Bank5_6->SDCR[FMC_Bank1_SDRAM] = tmpr3;
..FWLIBsrcstm32f4xx_fmc.c: 0 warnings, 30 errors
一周热门 更多>