当前位置:网站首页>New project template of punctual atom F103 based on firmware library

New project template of punctual atom F103 based on firmware library

2022-06-21 14:46:00 Metro ghost gyro

The compiler version should be selected correctly ,
1, The original MDK edition 5.15, The use of V5 compiler ; new MDK5.26 It uses V6 compiler ;

2, stay 5.26 Under the version ,ARM Compiler choice V5.06 update 6(build 750) When , Need to put “Run-Time Environment” Remove unnecessary references in , Otherwise, a large number of errors will be reported ;

3, If ARM Compiler Choose to use “Use default compiler version 6” Some references will be automatically checked , But because of the “CMSIS” Version is old , stay V6 Unable to compile under , Compile failed .

 The compiler version should be selected correctly

open stm32f10x_conf.h The file was found to contain stm32f10x Header files of peripherals on the chip . That is to say, they are using stm32f10x When a peripheral of the chip , It is not only necessary to add the driver file of this peripheral to the project , Also change the header file of the peripheral “ Include to ”stm32f10x_conf.h in .

system_stm32f10x.c Contained in the SystemInit()– System initialization , This function is run before startup .

stay startup_stm32f10x_hd.s
One 、 The function of the startup file

( About the role of the startup code , As mentioned earlier , Here's another word )

(1) Initialize stack pointer SP;

(2) Initializer counter pointer PC;

(3) Setup heap 、 The size of the stack ;

(4) Set the entry address of the exception vector table ;

(5) Configure external SRAM As data storage ( This is configured by the user , General development boards have no external SRAM);

(6) Set up C Branch entry of Library __main( Finally used to call main function );

(7) stay 3.5 Version of the startup file also calls in system_stm32f10x.c In the document SystemIni() Function to configure the system clock .

Reset_Handler PROC
EXPORT Reset_Handler [WEAK]
IMPORT __main
IMPORT SystemInit
LDR R0, =SystemInit
BLX R0
LDR R0, =__main
BX R0
ENDP

原网站

版权声明
本文为[Metro ghost gyro]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202221356393743.html