New library function template

First, create a new folder

        [CORE
        [FWLIB
Template[OBJ
        [SYSTEM
        [USER

Second, new construction

Project-new μversion project

Third, copy files

  1. E: \ stm32 \ Explorer A disk - Information -2 \ 8, STM32 reference \ 1, STM32F4xx firmware library \ STM32F4xx_DSP_StdPeriph_Lib_V1.4.0 \ Libraries \ STM32F4xx_StdPeriph_Driver \ inc and src
    ------>
    D: \ ACODE \ Template \ FWLIB
  2. E: \ stm32 \ Explorer A disk - Information -2 \ 8, STM32 reference \ 1, STM32F4xx firmware library \ STM32F4xx_DSP_StdPeriph_Lib_V1.4.0 \ the Libraries \ CMSIS \ Device \ ST \ STM32F4xx \ Source \ Templates \ ARM \ startup_stm32f40_41xxx.s
    - ----->
    D: \ ACODE \ Template \ CORE
  3. E: \ stm32 \ Explorer A disk - Information -2 \ 8, STM32 reference \ 1, STM32F4xx firmware library \ STM32F4xx_DSP_StdPeriph_Lib_V1.4.0 \ Libraries \ CMSIS \ Include core_cm4.h and core_cm4_simd.h and core_cmFunc.h and core_cmInstr.h
    ------>
    D: \ ACODE \ Template \ CORE
  4. E:\stm32\探索者A盘-资料-2\8,STM32参考资料\1,STM32F4xx固件库\STM32F4xx_DSP_StdPeriph_Lib_V1.4.0\Libraries\CMSIS\Device\ST\STM32F4xx\Include stm32f4xx.h和system_stm32f4xx.h
    ------>
    D:\acode\Template\USER
  5. E:\stm32\探索者A盘-资料-2\8,STM32参考资料\1,STM32F4xx固件库\STM32F4xx_DSP_StdPeriph_Lib_V1.4.0\Project\STM32F4xx_StdPeriph_Templates main.c和stm32f4xx_conf.h和stm32f4xx_it.c和stm32f4xx_it.h和system_stm32f4xx.c
    ------>
    D:\acode\Template\USER

    四、添加到工程

FWLIB: src中除了stm32f4xx_fmc.c外的所有文件
CORE: startup_stm32f40_41xxx.s
USER: 3个.c文件

STM32F40_41xxx,USB_STDPERIPH_DRIVER

要吐了,看到第25分钟,明天继续

Guess you like

Origin www.cnblogs.com/holaworld/p/12406062.html