Skip to main content
DCroc.2
Visitor II
September 16, 2022
Solved

Adding new c and header files to a project? Also...what is that called?

I have a stm32f3discovery board and I want to start playing with the LSM303DLHC MEMS sensor.

I seem to have found the original example code on github.

So I guess I need to add both the header and c file to my project. I'm not sure how to go about this. Also, what is this procedure called? Am I "adding a library"? Or is it called a driver?

    This topic has been closed for replies.
    Tesla DeLorean
    Tesla DeLoreanBest answer
    Guru
    September 16, 2022

    A library is a precompiled file, typically having several object files in it, so a .A or .LIB

    In tools like Keil / IAR you "Add Existing File(s)" to the project node, where you'd add the C file.

    The .H file would be found via "Include Paths"

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..

    1 reply

    Tesla DeLorean
    Tesla DeLoreanBest answer
    Guru
    September 16, 2022

    A library is a precompiled file, typically having several object files in it, so a .A or .LIB

    In tools like Keil / IAR you "Add Existing File(s)" to the project node, where you'd add the C file.

    The .H file would be found via "Include Paths"

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..