STM32 learning path - created STM32 F429 standard library project template (2)

1. Establish a "HalLib" folder under "Template_0" folder

 

 

2. Src, Inc files under official STM32CubeF4 package "\ STM32Cube_FW_F4_V1.10.0 \ Drivers \ STM32F4xx_HAL_Driver" directory folder to "HalLib" folder, delete the "Src" folder "stm32f4xx_hal_dsi.c, stm32f4xx_hal_iptim.c and stm32f4xx_hal_msp_template.c "

 

 

 

 3. Establish "Core" folder under "Template_0" folder

 

 

 

 4. "startup_stm32f429xx.s" under the official STM32CubeF4 package "\ STM32Cube_FW_F4_V1.11.0 \ Drivers \ CMSIS \ Device \ ST \ STM32F4xx \ Source \ Templates \ arm" directory to the "Core" folder;

The "\ STM32Cube_FW_F4_V1.11.0 \ Drivers \ CMSIS \ Include" directory "cmsis_armcc.h, core_cm4.h, core_cmFunc.h, core_cmInstr.h, core_cmSimd.h" copy to "Core" folder;

The "stm32f4xx_it.h, stm32f4xx_hal_conf.h and main.h" under "\ STM32Cube_FW_F4_V1.11.0 \ Projects \ STM32F429I-Discovery \ Templates \ Inc" directory to the "Core" folder;

The "\ STM32Cube_FW_F4_V1.11.0 \ Projects \ STM32F429I-Discovery \ Templates \ Src" "system_stm32f4xx.c, stm32f4xx_it.c, stm32f4xx_hal_msp.c and main.c" in the directory to the "Core" folder. 

5. Open the "Manage Project Items", the establishment of two Groups: Core and HalLib.

6. "Core" group add "Core" folder all files

 

 

7. "HalLib" grouping Add "HalLib / Src" folder all files

 

8. Open the "Options for Target -> C / C ++ -> Include Path", add global macro "USE_HAL_DRIVER, STM32F429xx", add the directory containing the ".. \ Core" and ".. \ HalLib \ Inc"

 

 

 

 

9. write simple programs in main.c, to ensure error-free compilation

 

 

 

Guess you like

Origin www.cnblogs.com/sysedoc/p/11572720.html