OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 20254|回复: 8

原子哥:stm32l编译出错,Undefined symbol TimingDelay_Decrement (referred from stm32l1xx_it.o).求助!!!

[复制链接]

5

主题

9

帖子

0

精华

新手上路

积分
49
金钱
49
注册时间
2014-5-13
在线时间
0 小时
发表于 2014-5-14 10:09:07 | 显示全部楼层 |阅读模式
5金钱
Rebuild target 'Template'
assembling startup_stm32l1xx_mdp.s...
compiling main.c...
compiling stm32l1xx_it.c...
compiling system_stm32l1xx.c...
compiling misc.c...
compiling stm32l1xx_adc.c...
compiling stm32l1xx_aes.c...
compiling stm32l1xx_aes_util.c...
compiling stm32l1xx_comp.c...
compiling stm32l1xx_crc.c...
compiling stm32l1xx_dac.c...
compiling stm32l1xx_dbgmcu.c...
compiling stm32l1xx_dma.c...
compiling stm32l1xx_exti.c...
compiling stm32l1xx_flash.c...
compiling stm32l1xx_flash_ramfunc.c...
compiling stm32l1xx_fsmc.c...
compiling stm32l1xx_gpio.c...
compiling stm32l1xx_i2c.c...
compiling stm32l1xx_iwdg.c...
compiling stm32l1xx_lcd.c...
compiling stm32l1xx_opamp.c...
compiling stm32l1xx_pwr.c...
compiling stm32l1xx_rcc.c...
compiling stm32l1xx_rtc.c...
compiling stm32l1xx_sdio.c...
compiling stm32l1xx_spi.c...
compiling stm32l1xx_syscfg.c...
compiling stm32l1xx_tim.c...
compiling stm32l1xx_usart.c...
compiling stm32l1xx_wwdg.c...
linking...
..\OBJ\Test.axf: Error: L6218E: Undefined symbol TimingDelay_Decrement (referred from stm32l1xx_it.o).
Not enough information to list image symbols.
Finished: 1 information, 0 warning and 1 error messages.
"..\OBJ\Test.axf" - 1 Error(s), 0 Warning(s).
Target not created

最佳答案

查看完整内容[请看2#楼]

stm32l1xx_it.c中未定义TimingDelay_Decrement
正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

15

主题

180

帖子

0

精华

中级会员

Rank: 3Rank: 3

积分
348
金钱
348
注册时间
2013-4-23
在线时间
25 小时
发表于 2014-5-14 10:09:08 | 显示全部楼层
stm32l1xx_it.c中未定义TimingDelay_Decrement
回复

使用道具 举报

120

主题

7878

帖子

13

精华

资深版主

Rank: 8Rank: 8

积分
12012
金钱
12012
注册时间
2013-9-10
在线时间
427 小时
发表于 2014-5-14 10:09:08 | 显示全部楼层
TimingDelay_Decrement所在的头文件没加到stm32l1xx_it.c中或者stm32l1xx_it.h中
现在,程序把烂铜烂铁变得智能化了,人呢,一旦离开了这烂铜烂铁就不知道干啥了
回复

使用道具 举报

5

主题

9

帖子

0

精华

新手上路

积分
49
金钱
49
注册时间
2014-5-13
在线时间
0 小时
 楼主| 发表于 2014-5-14 10:10:33 | 显示全部楼层
代码是:

#include "STM32L1xx.h"                  // Device header
#include "main.h"

 void delay5ms(void)   //delay 500 us  

 unsigned char a,b;     
 for(b=71;b>0;b--)         
  for(a=2;a>0;a--); 
}

 int main(void)
 {
 GPIO_InitTypeDef  GPIO_InitStructure;
 /* GPIOD eriph clock enable */
   RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOD, ENABLE);
 
 /* Configure D0 and D1 or D3 and D7 in output pushpull mode */
   GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5;
   GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
   GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
   GPIO_InitStructure.GPIO_Speed = GPIO_Speed_40MHz;
   GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
   GPIO_Init(GPIOD, &GPIO_InitStructure);
 GPIO_SetBits(GPIOB,GPIO_Pin_5);

  while(1)
{
  GPIO_ResetBits(GPIOB,GPIO_Pin_5);
//Delay(3000000);
delay5ms();
GPIO_SetBits(GPIOB,GPIO_Pin_5);
delay5ms();
//Delay(3000000);
}
 }
回复

使用道具 举报

2

主题

4

帖子

0

精华

新手入门

积分
32
金钱
32
注册时间
2014-10-5
在线时间
0 小时
发表于 2014-10-6 10:11:35 | 显示全部楼层
回复【4楼】Badu_Space:
---------------------------------
怎么破啊?
回复

使用道具 举报

17

主题

293

帖子

0

精华

中级会员

Rank: 3Rank: 3

积分
388
金钱
388
注册时间
2012-12-26
在线时间
1 小时
发表于 2014-10-6 10:28:44 | 显示全部楼层
回复【5楼】乖乖文盲:
---------------------------------添加包含文件并添加头文件路径
回复

使用道具 举报

2

主题

4

帖子

0

精华

新手入门

积分
32
金钱
32
注册时间
2014-10-5
在线时间
0 小时
发表于 2014-10-6 10:30:14 | 显示全部楼层
回复【6楼】kassandra:
---------------------------------
添加进去了,就是camera_api.c中的,但是还是有问题
回复

使用道具 举报

10

主题

57

帖子

0

精华

中级会员

Rank: 3Rank: 3

积分
291
金钱
291
注册时间
2016-8-25
在线时间
62 小时
发表于 2016-8-31 15:08:35 | 显示全部楼层
LZ,我现在也遇到这个问题,明明在一个.h里面定义了,而且都添加进去了,结果就是不行啊,就是说undefined  symbol。。。。。
回复

使用道具 举报

0

主题

5

帖子

0

精华

新手入门

积分
18
金钱
18
注册时间
2019-7-26
在线时间
5 小时
发表于 2019-9-5 21:38:24 | 显示全部楼层
你应该是忘记将这个.c文件在左侧projet栏中进行manage project了。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2025-7-12 18:26

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表