单片机/MCUwilliam hill官网
直播中

pdshyh

7年用户 30经验值
擅长:无线电爱好
私信 关注

Keil uVision5点亮LED灯错误

本帖最后由 pdshyh 于 2021-2-4 21:08 编辑

Keil uVision5点亮LED灯错误
距离点亮LED灯编程只有一步之遥了 还得请教各位老师问题在哪, 对着《STM32库开发实战指南》示例已经修改了几次错误,还是存在错误
错误提示..STM_led.axf: Error: L6218E: Undefined symbol GPIO_RestBits (referred from main.o).直译:STM_led.axf:错误:L6218E:未定义符号GPIO_RestBits(从main.o引用)。

谢谢,回复,是GPIO_ResetBits(GPIOC,GPIO_Pin_3 )写错了GPIO_RestBits(GPIOC,GPIO_Pin_3 )少了个e,更改后问题又出来了:..STM_led.axf: Error: L6200E: Symbol GPIO_ResetBits multiply defined (by stm32f10x_gpio_1.o and stm32f10x_gpio.o).
  • 微信图片_20210203193630.png

回帖(7)

阿信509

2021-2-3 20:18:39

最佳答案

LED1没有定义啊,不能直接用
举报

jf_51432997

2021-2-4 11:24:22
有void LED1(参数);//声明
和void LED1(参数)//定义
{
……;
}
这两个吗?有的话再看看有没有
extern void LED1(参数);//引用其他.c文件中的函数
举报

人中狼

2021-2-4 13:20:11
GPIO_RestBits没定义
举报

pdshyh

2021-2-4 21:04:15
谢谢,回复,是GPIO_ResetBits(GPIOC,GPIO_Pin_3 )写错了GPIO_RestBits(GPIOC,GPIO_Pin_3 )少了个e,更改后问题又出来了:..STM_led.axf: Error: L6200E: Symbol GPIO_ResetBits multiply defined (by stm32f10x_gpio_1.o and stm32f10x_gpio.o).
举报

pdshyh

2021-2-4 21:05:32
*** Using Compiler 'V5.06 update 1 (build 61)', folder: 'C:Program Files (x86)keilKeil_v5ARMARMCCBin'
Rebuild target 'Target 1'
assembling startup_stm32f10x_md.s...
compiling main.c...
led.h(34): warning:  #1-D: last line of file ends without a newline
                           
main.c: 1 warning, 0 errors
compiling stm32f10x_it.c...
compiling led.c...
led.h(34): warning:  #1-D: last line of file ends without a newline
                           
led.c: 1 warning, 0 errors
compiling stm32f10x_gpio.c...
compiling misc.c...
compiling stm32f10x_adc.c...
compiling stm32f10x_bkp.c...
compiling stm32f10x_can.c...
compiling stm32f10x_cec.c...
compiling stm32f10x_crc.c...
compiling stm32f10x_dac.c...
compiling stm32f10x_dbgmcu.c...
compiling stm32f10x_dma.c...
compiling stm32f10x_exti.c...
compiling stm32f10x_flash.c...
compiling stm32f10x_fsmc.c...
compiling stm32f10x_gpio.c...
compiling stm32f10x_i2c.c...
compiling stm32f10x_iwdg.c...
compiling stm32f10x_pwr.c...
compiling stm32f10x_rcc.c...
compiling stm32f10x_rtc.c...
compiling stm32f10x_sdio.c...
compiling stm32f10x_spi.c...
compiling stm32f10x_tim.c...
compiling stm32f10x_usart.c...
compiling stm32f10x_wwdg.c...
compiling core_cm3.c...
compiling system_stm32f10x.c...
linking...
..STM_led.axf: Error: L6200E: Symbol GPIO_ResetBits multiply defined (by stm32f10x_gpio_1.o and stm32f10x_gpio.o).
..STM_led.axf: Error: L6200E: Symbol GPIO_SetBits multiply defined (by stm32f10x_gpio_1.o and stm32f10x_gpio.o).
..STM_led.axf: Error: L6200E: Symbol GPIO_Init multiply defined (by stm32f10x_gpio_1.o and stm32f10x_gpio.o).
..STM_led.axf: Error: L6200E: Symbol GPIO_DeInit multiply defined (by stm32f10x_gpio_1.o and stm32f10x_gpio.o).
..STM_led.axf: Error: L6200E: Symbol GPIO_AFIODeInit multiply defined (by stm32f10x_gpio_1.o and stm32f10x_gpio.o).
..STM_led.axf: Error: L6200E: Symbol GPIO_StructInit multiply defined (by stm32f10x_gpio_1.o and stm32f10x_gpio.o).
..STM_led.axf: Error: L6200E: Symbol GPIO_ReadInputDataBit multiply defined (by stm32f10x_gpio_1.o and stm32f10x_gpio.o).
..STM_led.axf: Error: L6200E: Symbol GPIO_ReadInputData multiply defined (by stm32f10x_gpio_1.o and stm32f10x_gpio.o).
..STM_led.axf: Error: L6200E: Symbol GPIO_ReadOutputDataBit multiply defined (by stm32f10x_gpio_1.o and stm32f10x_gpio.o).
..STM_led.axf: Error: L6200E: Symbol GPIO_ReadOutputData multiply defined (by stm32f10x_gpio_1.o and stm32f10x_gpio.o).
..STM_led.axf: Error: L6200E: Symbol GPIO_WriteBit multiply defined (by stm32f10x_gpio_1.o and stm32f10x_gpio.o).
..STM_led.axf: Error: L6200E: Symbol GPIO_Write multiply defined (by stm32f10x_gpio_1.o and stm32f10x_gpio.o).
..STM_led.axf: Error: L6200E: Symbol GPIO_PinLockConfig multiply defined (by stm32f10x_gpio_1.o and stm32f10x_gpio.o).
..STM_led.axf: Error: L6200E: Symbol GPIO_EventOutputConfig multiply defined (by stm32f10x_gpio_1.o and stm32f10x_gpio.o).
..STM_led.axf: Error: L6200E: Symbol GPIO_EventOutputCmd multiply defined (by stm32f10x_gpio_1.o and stm32f10x_gpio.o).
..STM_led.axf: Error: L6200E: Symbol GPIO_PinRemapConfig multiply defined (by stm32f10x_gpio_1.o and stm32f10x_gpio.o).
..STM_led.axf: Error: L6200E: Symbol GPIO_EXTILineConfig multiply defined (by stm32f10x_gpio_1.o and stm32f10x_gpio.o).
..STM_led.axf: Error: L6200E: Symbol GPIO_ETH_MediaInterfaceConfig multiply defined (by stm32f10x_gpio_1.o and stm32f10x_gpio.o).
Not enough information to list image symbols.
Not enough information to list the image map.
Finished: 2 information, 0 warning and 18 error messages.
"..STM_led.axf" - 18 Error(s), 2 Warning(s).
Target not created.
Build Time Elapsed:  00:00:06
举报

pdshyh

2021-2-4 21:06:18
10多个错误,新手第一次弄smt32流水灯。
2 举报
  • 闫成星: 你好!请问你这10多个错误怎么解决的呀?刚接触stm32也遇到了这样的问题
  • 闫成星: 你好!刚接触stm32也遇到了类似的问题,请问你是怎么解决的啊?

金刚岛椎站桩功

2021-2-21 09:22:42
我没有学习STM32,正准备入手一块!
举报

更多回帖

发帖
×
20
完善资料,
赚取积分