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

2019-6-17 06:52 3836 15 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-19 22:48
个人观点:十家比较好的国产协作机器人厂家
我和觉得十家比较好的国产协作机器人厂家,仅仅代表个人观点,不代表真是的排名。大族机器人:作为全球智能协作机器人领先品牌,大族机器人在技术研发方面率先突破众多关键技术,成为国内唯一一家在核心部件完全自主...
curton 2025-02-14 13:37
文心一言免费对于创业来说是一个很大的机遇,加油!
文心一言免费对于创业来说是一个很大的机遇,加油!虽然是一个很大的挑战,但是好处还是很大的。文心一言的免费开放为创业者提供了一个低成本甚至零成本使用先进人工智能技术的机会。在以往,创业者若想在项目中融入...
curton 2025-02-14 10:30
文心一言为什么要免费?我的看法。
文心一言准备免费,说实话,这个是好事情,但是他也会产生非常大的影响,总体来说,对技术的发展还是起到积极的作用。文心新苑为什么要免费呢?无非就是市场的原因,绝对不是文心一言不想利用这个AI赚钱。我分析下...
curton 2025-02-12 08:20
对这句话发表下自己的看法:创新的本质是成本下降与生产力提升
“创新的本质是成本下降与生产力提升”这一观点,深刻揭示了创新活动在经济和社会发展中的核心价值。对于还在上大学的学生而言,理解这一点至关重要,因为它不仅关乎理论知识的学习,更涉及如何将所学转化为推动社会...
curton 2025-02-05 22:43
松下电器停产专心做人工智能
松下电器停产的消息对于电子工程领域的从业者,尤其是准备就业的大学生来说,直接是一个炸弹级别的消息。这一事件不仅反映了家电行业的变革,也对电子工程师的职业发展是不是直接转型人工智能?从松下电器的停产可以...
curton 2025-02-05 19:42
松下电器停产,记录下这个事件吧。
2025年2月5日最新消息,松下电器宣布其电视机业务将停止,这一消息对消费者、市场以及整个家电行业都产生了深远的影响。对于消费者而言,松下电视机的停产意味着他们失去了一个高品质的选择。松下作为家电行业...
我要评论
2
15
关闭 站长推荐上一条 /4 下一条