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

2019-6-17 06:52 915 2 3 分类: 管理

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://www.mianbaoban.cn/blog/uid-me-3876349.html

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

广告

文章评论 2条评论)

登录后参与讨论

dkjggger 2019-6-17 16:15

学习了

eeNick 2019-6-17 09:05

感谢分享
相关推荐阅读
curton 2019-10-18 21:23
【MATLAB】simulink Tustin Pilot Model
这次介绍下simulink Tustin Pilot Model。Tustin Pilot Model是Tustin 试验模型函数。双击后可以看到函数的参数。...
curton 2019-10-18 21:23
【MATLAB】simulink Precision Pilot Model
这次介绍下simulink Precision Pilot Model。Precision Pilot Model是试验模型精度函数。双击后可以看到函数的参数。...
curton 2019-10-18 21:22
【MATLAB】simulink Crossover Pilot Model
这次介绍下simulink Crossover Pilot Model。Crossover Pilot Model是交叉试验模型函数。双击后可以看到函数的参数。...
curton 2019-10-18 21:21
【MATLAB】simulink Symmetric Inertia Tensor
这次介绍下simulink Symmetric Inertia Tensor。Symmetric Inertia Tensor是对称惯性张量函数。双击后可以看到函数的参数。...
curton 2019-10-18 21:20
【MATLAB】simulink Moments about CG due to Forces
这次介绍下simulink Moments about CG  due to Forces。Moments about CG  due to Forces是力产生瞬间函数...
curton 2019-10-18 21:19
【MATLAB】simulink Estimate Inertia Tensor
这次介绍下simulink Estimate Inertia Tensor。Estimate Inertia Tensor是估计惯性张量函数。双击后可以看到函数的参数。...
我要评论
2
2
广告
关闭 热点推荐上一条 /1 下一条