Having trouble using STM32F4 standard peripheral library
Hi,
I have an STM32F4 discovery board and I'd like to use the standard peripheral library. So far, I have downloaded the library (STM32F4xx_DSP_StdPeriph_Lib_V1.0.1) and I have installed the CPU support package, as well as the SPL updates package, specifying the install directory of the SPL (C:\Users\Chris\Documents\CrossWorks Projects).
I have started a project as an STM32 excecutable, but I am very confused as to how to use the includes. Let's say I would like to include the file stm32f4xx_dac.h from (C:\Users\Chris\Documents\CrossWorks Projects\STM32F4xx_DSP_StdPeriph_Lib_V1.0.1\Libraries\STM32F4xx_StdPeriph_Driver\inc). What is the syntax to include this file?
Thanks,
Chris
-
You need to set the User Include Directories property for the project to include the full path of the StdPeriph directory. I have the StdPeriph in a directory at the same level as my project directory, so I use $(ProjectDir)/../STM32F4xx_DSP_StdPeriph_Lib_V1.0.1\Libraries\STM32F4xx_StdPeriph_Driver\inc to the User Include Directories list.
After you do that, you can just #include "stm32f4xx_whatever.h" in your files.
Please sign in to leave a comment.
Comments
1 comment