●发动文件的挑选
1. Low-density devices (STM32F10nx4= 16k,STM32F10nx6= 32k)
– startup_stm32f10x_ld_vl.s:小容量超值型。STM32F100xx系列,闪存16k~32k字节。
– startup_stm32f10x_ld.s:小容量型。STM32F101xx, STM32F102xx, STM32F103xx系列,闪存16k~32k字节。
2. Medium-density devices (STM32F10nx8= 64k,STM32F10nxB= 125k)
– startup_stm32f10x_md_vl.s:中容量超值型。STM32F100xx系列,闪存64k~128k字节。
– startup_stm32f10x_md.s:中容量型。STM32F101xx, STM32F102xx, STM32F103xx系列,闪存64k~128k字节。
3. High-density devices (STM32F10nxC= 256k,STM32F10nxD= 384k,STM32F10nxE= 512k)
– startup_stm32f10x_hd_vl.s:大容量超值型。STM32F100xx系列,闪存256k~512k字节。
– startup_stm32f10x_hd.s:大容量型。STM32F101xx, STM32F103xx系列,闪存256k~512k字节。
4. XL-density devices (STM32F10nxF= 768k,STM32F10nxG= 1024k)
– startup_stm32f10x_xl.s:超大容量型。S TM32F101xx, STM32F103xx系列,闪存512k~1024k字节。
5. Connectivity line devices (STM32F105xx,STM32F107xx)
– startup_stm32f10x_cl.s:互联型。TM32F105xx, STM32F107xx系列。
●运用固件库的宏界说
在Keil中运用固件库时工程需求进行装备,在工程选项中的”C/C++”标签页有预处理的宏界说,在这里需求界说USE_STDPERIPH_DRIVER,并依据运用STM32的器材类型进行界说,同发动项称号相似。
/* #defineSTM32F10X_LD*//*!< STM32F10X_LD: STM32 Low density devices */
/* #defineSTM32F10X_LD_VL*//*!< STM32F10X_LD_VL: STM32 Low density Value Line devices */
/* #defineSTM32F10X_MD*//*!< STM32F10X_MD: STM32 Medium density devices */
/* #defineSTM32F10X_MD_VL*//*!< STM32F10X_MD_VL: STM32 Medium density Value Line devices */
/* #defineSTM32F10X_HD*//*!< STM32F10X_HD: STM32 High density devices */
/* #defineSTM32F10X_HD_VL*//*!< STM32F10X_HD_VL: STM32 High density value line devices */
/* #defineSTM32F10X_XL*//*!< STM32F10X_XL: STM32 XL-density devices */
/* #defineSTM32F10X_CL*//*!< STM32F10X_CL: STM32 Connectivity line devices */