原创 【STM32学习心得】和你的认知发生冲突,是一种怎样的体验!

2019-6-17 06:52 3736 14 4 分类: 管理

STM32学习心得】和你的认知发生冲突,是一种怎样的体验!

 

在面包板版主 @江畔美少年的帮助下,解决了找不到芯片的问题,我按照步骤,一步一步的建立文件。

 

 

*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'D:\Program\Keil_v5\ARM\ARMCC\Bin'

Rebuild target 'Template'

compiling core_cm3.c...

compiling system_stm32f10x.c...

LED\Libraries\CMSIS\stm32f10x.h(8297): error:  #5: cannot open source input file "stm32f10x_conf.h": No such file or directory

    #include "stm32f10x_conf.h"

LED\Libraries\CMSIS\system_stm32f10x.c: 0 warnings, 1 error

compiling stm32f10x_adc.c...

.\LED\Libraries\CMSIS\stm32f10x.h(8297): error:  #5: cannot open source input file "stm32f10x_conf.h": No such file or directory

    #include "stm32f10x_conf.h"

LED\Libraries\FWlib\src\stm32f10x_adc.c: 0 warnings, 1 error

compiling misc.c...

.\LED\Libraries\CMSIS\stm32f10x.h(8297): error:  #5: cannot open source input file "stm32f10x_conf.h": No such file or directory

    #include "stm32f10x_conf.h"

LED\Libraries\FWlib\src\misc.c: 0 warnings, 1 error

compiling stm32f10x_cec.c...

.\LED\Libraries\CMSIS\stm32f10x.h(8297): error:  #5: cannot open source input file "stm32f10x_conf.h": No such file or directory

    #include "stm32f10x_conf.h"

LED\Libraries\FWlib\src\stm32f10x_cec.c: 0 warnings, 1 error

compiling stm32f10x_can.c...

.\LED\Libraries\CMSIS\stm32f10x.h(8297): error:  #5: cannot open source input file "stm32f10x_conf.h": No such file or directory

    #include "stm32f10x_conf.h"

LED\Libraries\FWlib\src\stm32f10x_can.c: 0 warnings, 1 error

compiling stm32f10x_bkp.c...

.\LED\Libraries\CMSIS\stm32f10x.h(8297): error:  #5: cannot open source input file "stm32f10x_conf.h": No such file or directory

    #include "stm32f10x_conf.h"

LED\Libraries\FWlib\src\stm32f10x_bkp.c: 0 warnings, 1 error

compiling stm32f10x_crc.c...

.\LED\Libraries\CMSIS\stm32f10x.h(8297): error:  #5: cannot open source input file "stm32f10x_conf.h": No such file or directory

    #include "stm32f10x_conf.h"

LED\Libraries\FWlib\src\stm32f10x_crc.c: 0 warnings, 1 error

compiling stm32f10x_dac.c...

.\LED\Libraries\CMSIS\stm32f10x.h(8297): error:  #5: cannot open source input file "stm32f10x_conf.h": No such file or directory

    #include "stm32f10x_conf.h"

LED\Libraries\FWlib\src\stm32f10x_dac.c: 0 warnings, 1 error

compiling stm32f10x_dbgmcu.c...

.\LED\Libraries\CMSIS\stm32f10x.h(8297): error:  #5: cannot open source input file "stm32f10x_conf.h": No such file or directory

    #include "stm32f10x_conf.h"

LED\Libraries\FWlib\src\stm32f10x_dbgmcu.c: 0 warnings, 1 error

compiling stm32f10x_dma.c...

.\LED\Libraries\CMSIS\stm32f10x.h(8297): error:  #5: cannot open source input file "stm32f10x_conf.h": No such file or directory

    #include "stm32f10x_conf.h"

LED\Libraries\FWlib\src\stm32f10x_dma.c: 0 warnings, 1 error

compiling stm32f10x_exti.c...

.\LED\Libraries\CMSIS\stm32f10x.h(8297): error:  #5: cannot open source input file "stm32f10x_conf.h": No such file or directory

    #include "stm32f10x_conf.h"

LED\Libraries\FWlib\src\stm32f10x_exti.c: 0 warnings, 1 error

compiling stm32f10x_fsmc.c...

.\LED\Libraries\CMSIS\stm32f10x.h(8297): error:  #5: cannot open source input file "stm32f10x_conf.h": No such file or directory

    #include "stm32f10x_conf.h"

LED\Libraries\FWlib\src\stm32f10x_fsmc.c: 0 warnings, 1 error

compiling stm32f10x_flash.c...

.\LED\Libraries\CMSIS\stm32f10x.h(8297): error:  #5: cannot open source input file "stm32f10x_conf.h": No such file or directory

    #include "stm32f10x_conf.h"

LED\Libraries\FWlib\src\stm32f10x_flash.c: 0 warnings, 1 error

compiling stm32f10x_gpio.c...

.\LED\Libraries\CMSIS\stm32f10x.h(8297): error:  #5: cannot open source input file "stm32f10x_conf.h": No such file or directory

    #include "stm32f10x_conf.h"

LED\Libraries\FWlib\src\stm32f10x_gpio.c: 0 warnings, 1 error

compiling stm32f10x_i2c.c...

.\LED\Libraries\CMSIS\stm32f10x.h(8297): error:  #5: cannot open source input file "stm32f10x_conf.h": No such file or directory

    #include "stm32f10x_conf.h"

LED\Libraries\FWlib\src\stm32f10x_i2c.c: 0 warnings, 1 error

compiling stm32f10x_iwdg.c...

.\LED\Libraries\CMSIS\stm32f10x.h(8297): error:  #5: cannot open source input file "stm32f10x_conf.h": No such file or directory

    #include "stm32f10x_conf.h"

LED\Libraries\FWlib\src\stm32f10x_iwdg.c: 0 warnings, 1 error

compiling stm32f10x_pwr.c...

.\LED\Libraries\CMSIS\stm32f10x.h(8297): error:  #5: cannot open source input file "stm32f10x_conf.h": No such file or directory

    #include "stm32f10x_conf.h"

LED\Libraries\FWlib\src\stm32f10x_pwr.c: 0 warnings, 1 error

compiling stm32f10x_rcc.c...

.\LED\Libraries\CMSIS\stm32f10x.h(8297): error:  #5: cannot open source input file "stm32f10x_conf.h": No such file or directory

    #include "stm32f10x_conf.h"

LED\Libraries\FWlib\src\stm32f10x_rcc.c: 0 warnings, 1 error

compiling stm32f10x_rtc.c...

.\LED\Libraries\CMSIS\stm32f10x.h(8297): error:  #5: cannot open source input file "stm32f10x_conf.h": No such file or directory

    #include "stm32f10x_conf.h"

LED\Libraries\FWlib\src\stm32f10x_rtc.c: 0 warnings, 1 error

compiling stm32f10x_sdio.c...

.\LED\Libraries\CMSIS\stm32f10x.h(8297): error:  #5: cannot open source input file "stm32f10x_conf.h": No such file or directory

    #include "stm32f10x_conf.h"

LED\Libraries\FWlib\src\stm32f10x_sdio.c: 0 warnings, 1 error

compiling stm32f10x_spi.c...

.\LED\Libraries\CMSIS\stm32f10x.h(8297): error:  #5: cannot open source input file "stm32f10x_conf.h": No such file or directory

    #include "stm32f10x_conf.h"

LED\Libraries\FWlib\src\stm32f10x_spi.c: 0 warnings, 1 error

compiling stm32f10x_tim.c...

.\LED\Libraries\CMSIS\stm32f10x.h(8297): error:  #5: cannot open source input file "stm32f10x_conf.h": No such file or directory

    #include "stm32f10x_conf.h"

LED\Libraries\FWlib\src\stm32f10x_tim.c: 0 warnings, 1 error

compiling stm32f10x_usart.c...

.\LED\Libraries\CMSIS\stm32f10x.h(8297): error:  #5: cannot open source input file "stm32f10x_conf.h": No such file or directory

    #include "stm32f10x_conf.h"

LED\Libraries\FWlib\src\stm32f10x_usart.c: 0 warnings, 1 error

compiling stm32f10x_wwdg.c...

.\LED\Libraries\CMSIS\stm32f10x.h(8297): error:  #5: cannot open source input file "stm32f10x_conf.h": No such file or directory

    #include "stm32f10x_conf.h"

LED\Libraries\FWlib\src\stm32f10x_wwdg.c: 0 warnings, 1 error

compiling stm32f10x_it.c...

.\LED\Libraries\CMSIS\stm32f10x.h(8297): error:  #5: cannot open source input file "stm32f10x_conf.h": No such file or directory

    #include "stm32f10x_conf.h"

LED\User\stm32f10x_it.c: 0 warnings, 1 error

compiling main.c...

.\LED\Libraries\CMSIS\stm32f10x.h(8297): error:  #5: cannot open source input file "stm32f10x_conf.h": No such file or directory

    #include "stm32f10x_conf.h"

LED\User\main.c: 0 warnings, 1 error

compiling bsp_led.c...

.\LED\Libraries\CMSIS\stm32f10x.h(8297): error:  #5: cannot open source input file "stm32f10x_conf.h": No such file or directory

    #include "stm32f10x_conf.h"

LED\User\led\bsp_led.c: 0 warnings, 1 error

".\LED\Output\LED.axf" - 27 Error(s), 0 Warning(s).

Target not created.

Build Time Elapsed:  00:00:02

 

运行之后发现了一个非常大的问题,就是好多的文件打不开,我的第一反应就是:文件的目录没有包含进来,我就按照这个思路来找问题。发现每一行的错误信息都包含LED\Libraries\CMSIS\,那我就加载这个文件。

 

*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'D:\Program\Keil_v5\ARM\ARMCC\Bin'

Rebuild target 'Template'

compiling system_stm32f10x.c...

compiling misc.c...

compiling core_cm3.c...

compiling stm32f10x_cec.c...

compiling stm32f10x_can.c...

compiling stm32f10x_adc.c...

compiling stm32f10x_bkp.c...

compiling stm32f10x_dbgmcu.c...

compiling stm32f10x_crc.c...

compiling stm32f10x_dma.c...

compiling stm32f10x_dac.c...

compiling stm32f10x_exti.c...

compiling stm32f10x_fsmc.c...

compiling stm32f10x_flash.c...

compiling stm32f10x_gpio.c...

compiling stm32f10x_iwdg.c...

compiling stm32f10x_pwr.c...

compiling stm32f10x_i2c.c...

compiling stm32f10x_rtc.c...

compiling stm32f10x_rcc.c...

compiling stm32f10x_sdio.c...

compiling stm32f10x_spi.c...

compiling stm32f10x_wwdg.c...

compiling stm32f10x_it.c...

compiling stm32f10x_usart.c...

compiling bsp_led.c...

compiling main.c...

LED\User\main.c(37): warning:  #223-D: function "Delay" declared implicitly

      Delay(0x0FFFFF);

LED\User\main.c: 1 warning, 0 errors

compiling stm32f10x_tim.c...

compiling core_cm3.c...

compiling system_stm32f10x.c...

linking...

.\LED\Output\LED.axf: Error: L6200E: Symbol __get_PSP multiply defined (by core_cm3_1.o and core_cm3.o).

.\LED\Output\LED.axf: Error: L6200E: Symbol __set_PSP multiply defined (by core_cm3_1.o and core_cm3.o).

.\LED\Output\LED.axf: Error: L6200E: Symbol __get_MSP multiply defined (by core_cm3_1.o and core_cm3.o).

.\LED\Output\LED.axf: Error: L6200E: Symbol __set_MSP multiply defined (by core_cm3_1.o and core_cm3.o).

.\LED\Output\LED.axf: Error: L6200E: Symbol __REV16 multiply defined (by core_cm3_1.o and core_cm3.o).

.\LED\Output\LED.axf: Error: L6200E: Symbol __REVSH multiply defined (by core_cm3_1.o and core_cm3.o).

.\LED\Output\LED.axf: Error: L6200E: Symbol SystemCoreClock multiply defined (by system_stm32f10x_1.o and system_stm32f10x.o).

.\LED\Output\LED.axf: Error: L6200E: Symbol AHBPrescTable multiply defined (by system_stm32f10x_1.o and system_stm32f10x.o).

.\LED\Output\LED.axf: Error: L6200E: Symbol SystemCoreClockUpdate multiply defined (by system_stm32f10x_1.o and system_stm32f10x.o).

.\LED\Output\LED.axf: Error: L6200E: Symbol SystemInit multiply defined (by system_stm32f10x_1.o and system_stm32f10x.o).

Not enough information to list image symbols.

Not enough information to list load addresses in the image map.

Finished: 2 information, 0 warning and 10 error messages.

".\LED\Output\LED.axf" - 10 Error(s), 1 Warning(s).

Target not created.

Build Time Elapsed:  00:00:02

 

加载完之后发现了这个问题,在百度上搜索之后,发现是led.cmain.c文件中重复定义了Delay函数,但是我没有找到led.c中的文件有delay函数。可能这个错误不是这个原因引起的。

参考了UFUN里面的设置的文件,我发现是这样的,我也想问一下,这样设置有什么好处?为什么要这么设置。谢谢!!!


作者: curton, 来源:面包板社区

链接: https://mbb.eet-china.com/blog/uid-me-3876349.html

版权声明:本文为博主原创,未经本人允许,禁止转载!

PARTNER CONTENT

文章评论2条评论)

登录后参与讨论

dkjggger 2019-6-17 16:15

学习了

eeNick 2019-6-17 09:05

感谢分享
相关推荐阅读
curton 2024-11-18 08:22
一天的工作有感(1117周日加班)
一天的工作内容很多,需要自己去做的事情也很多,但是自己大部分时间又都利用不起来。比如我想周日来单位,人少,也没有人来打扰,就趁着这个时间做一下之前拉下的工作。可惜了,我是来了,也来工作了,但是自己的时...
curton 2024-11-18 08:14
面包板版友容鉴
面包板版友容鉴:  此时执笔,颇为忐忑,竟不知何言。你我相识已有数载之余,时至今日,未尝与汝谋面。发帖直言,网络之谈,幸勿见笑,还望版友海涵。  曾记,初次登录,便如沐春风,偶遇佳良,当是时,素面玉琢...
curton 2024-09-23 16:05
《易学易懂 电子回路入门》+第三部分读书有感
日本山下明的《易学易懂电子回路入门》的第三部分“器件的使用方法”,是一本对于电子学初学者而言极具实践指导意义的佳作。作为教师,我满怀热情地向学生们推荐这本书,因为它不仅深化了理论知识,更将学习带入了动...
curton 2024-09-23 15:59
《易学易懂 电子回路入门》+第二部分读书有感
日本山下明的《易学易懂电子回路入门》的第二部分“器件的结构”,无疑是一本非常适合初学者踏入电子世界大门的宝贵教材。作为教师,我强烈推荐此书给对电子学充满好奇与热情的学生们。山下明老师以其深入浅出的讲解...
curton 2024-09-10 08:16
《易学易懂 电子回路入门》+第一部分读书有感
书已经收到,拍照为证。山下明的《易学易懂电子回路入门》无疑是为学生们踏入电子电路世界打开的一扇明亮窗口。作为教师,我强烈推荐这本书作为初学者的首选读物。书中以清晰、生动的语言,结合直观的图示,深入浅出...
curton 2024-08-31 23:59
用Python实现点亮一个灯的代码。
基础知识GPIO.setup(LED_PIN, GPIO.OUT) 这行代码是在树莓派等嵌入式系统中使用Python控制GPIO(General Purpose Input/Output,通...
EE直播间
更多
我要评论
2
14
关闭 站长推荐上一条 /3 下一条