启动文件
STM32F103ZET6是属于大容量的器件,启动文件应该选择startup_stm32f10x_hd.s
stm32启动文件的选择.
添加之后编译,会报错:
Rebuild target 'Target 1'
compiling main.c...
main.c(11): warning: #1-D: last line of file ends without a newline
//}
main.c: 1 warning, 0 errors
assembling startup_stm32f10x_hd.s...
linking...
.\Objects\Project.axf: Error: L6218E: Undefined symbol SystemInit (referred from startup_stm32f10x_hd.o).
Not enough information to list image symbols.
Finished: 1 information, 0 warning and 1 error messages.
".\Objects\Project.axf" - 1 Error(s), 1 Warning(s).
Target not created.
Build Time Elapsed: 00:00:00
其中
main.c(11): warning: #1-D: last line of file ends without a newline
需要在最后一行来个回车,添加一个空行(奇了怪了,为什么会这样报错)
assembling startup_stm32f10x_hd.s...
linking...
.\Objects\Project.axf: Error: L6218E: Undefined symbol SystemInit (referred from startup_stm32f10x_hd.o).
Not enough information to list image symbols.
这个是因为在之前添加的启动文件中有这个
; Reset handler
Reset_Handler PROC
EXPORT Reset_Handler [WEAK

本文介绍了STM32F103ZET6入门教程的第三部分,焦点在于如何点亮LED0。首先,文章讨论了启动文件的选择,指出大容量器件应选用startup_stm32f10x_hd.s,并解决了由此引发的编译错误。接着,详细阐述了点亮LED0的步骤,包括定位LED0在原理图中的位置,开启GPIOB时钟,配置IO口模式,以及设置PB5为低电平。最后提到了使用正点原子精英版进行烧录时的注意事项,以及通过FlyMcu进行参数设置后观察到LED0成功点亮的现象。
最低0.47元/天 解锁文章
2895

被折叠的 条评论
为什么被折叠?



