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

2019-6-17 06:52 3780 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 2025-02-05 19:42
松下电器停产,记录下这个事件吧。
2025年2月5日最新消息,松下电器宣布其电视机业务将停止,这一消息对消费者、市场以及整个家电行业都产生了深远的影响。对于消费者而言,松下电视机的停产意味着他们失去了一个高品质的选择。松下作为家电行业...
curton 2025-01-02 23:08
【工程师故事】+半年的经历依然忧伤,带着焦虑和绝望
【工程师故事】+半年的经历依然忧伤,带着焦虑和绝望  对于一个企业来说,赚钱才是第一位的,对于一个人来说,赚钱也是第一位的。因为企业要活下去,因为个人也要活下去。企业打不了倒闭。个...
curton 2024-12-28 21:49
开除学术造假学生之感想
从教师的角度来看,麻省理工学院开除因学术造假的学生,这一决定是合理且必要的。首先,学术诚信是学术研究的基石。在学术界,真实性和原创性是至关重要的。学术造假不仅破坏了学术研究的公正性和准确性,还损害了学...
curton 2024-11-18 08:22
一天的工作有感(1117周日加班)
一天的工作内容很多,需要自己去做的事情也很多,但是自己大部分时间又都利用不起来。比如我想周日来单位,人少,也没有人来打扰,就趁着这个时间做一下之前拉下的工作。可惜了,我是来了,也来工作了,但是自己的时...
curton 2024-11-18 08:14
面包板版友容鉴
面包板版友容鉴:  此时执笔,颇为忐忑,竟不知何言。你我相识已有数载之余,时至今日,未尝与汝谋面。发帖直言,网络之谈,幸勿见笑,还望版友海涵。  曾记,初次登录,便如沐春风,偶遇佳良,当是时,素面玉琢...
curton 2024-09-23 16:05
《易学易懂 电子回路入门》+第三部分读书有感
日本山下明的《易学易懂电子回路入门》的第三部分“器件的使用方法”,是一本对于电子学初学者而言极具实践指导意义的佳作。作为教师,我满怀热情地向学生们推荐这本书,因为它不仅深化了理论知识,更将学习带入了动...
我要评论
2
14
关闭 站长推荐上一条 /3 下一条