cancel
Showing results for 
Search instead for 
Did you mean: 

d/l-ed STM32F0xx Std Periph Library. looking for better instructions to incorporate into STM32CubeIDE. Looked in help file, online. ?where to put library on hard drive, config IDE so always available without adding to each new project.

SLask.1
Associate
 
3 REPLIES 3

The SPL predates STM32 CubeIDE by several years.

Should however be buildable in any of the relevant tools chains. Basically add .C files into project, so project and libraries ones, point the Include Path(s) are the associated parts, and set a handful of compiler command line defines.

For example:

     USE_STDPERIPH_DRIVER

     STM32F051

     USE_STM320518_EVAL

     USE_DEFAULT_TIMEOUT_CALLBACK

The IAR and KEIL project files are readable ASCII, you can infer include paths and defines from salient examples.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
SLask.1
Associate

Thanks for the reply.

Pavel A.
Evangelist III

> so always available without adding to each new project

Indeed, it is a good idea to share the libraries among many projects.

Put them in any directory outside of your user profile (so that you can move the projects to other computers and to other users).

Then, use the Eclipse feature of linked folders/files and project variables, to define the paths of your libraries in your projects, and use that to define the include paths.

The IAR IDE has a similar feature for linked folders. Don't know about Keil.

In makefiles use of variables to define paths just goes naturally.

Of course, don't modify the shared files.