2022-02-17 05:41 PM
2022-02-18 02:36 AM
Is it an object library or a source library?
For a source library:
Compile the project.
To have the library common to all projects, create the folder out of the project, then create a link to this folder in every project, and add the path to the settings. https://mcuoneclipse.com/2014/08/15/link-to-files-and-folders-in-eclipse/
2022-02-22 07:37 PM
Thanks for your reply and answers!
It is a source library with .c and .h files:
https://github.com/jrowberg/i2cdevlib
I guess the tricky part for me is I want to use the STM32HAL folder and within that folder some of the libraries reference other folders within that STM32HAL folder:
i.e. MPU6050 references I2Cdev.h in MPU6050.h
So I was hoping to keep the .c and .h files in their respective folders to keep everything nice and organized as I will be using a few libraries like this. Rather than having all the .c and .h files in separate folders.
Ideally organized like this:
Rather than this kind of idea (if that is possible):
I will look at what you sent and see if I can get it working organized in the folder structure I am hoping for!
Thanks!
2022-02-22 08:08 PM
This is where I am at so far btw:
I added the git library to the project under "Drivers" because that seemed like an appropriate place to put it. I changed 1 thing in I2Cdev to make it compatible with the board I am currently using:
#include "stm32l4xx_hal.h"
Other than that, it is all stock from the github project. I will tinker around and see if it makes sense why it is not working soon.
EDIT:
I can tell it is coming from this library reference for every folder. So I need to figure out a way to call I2Cdev from within other folders -- some sort of relative path or something
2022-02-22 08:39 PM
I just figured out it was my file paths not set up which is an easy solution! This is just for this project but to do it globally you would follow the link you sent but I wanted to make sure it worked locally before trying globally since it would be great to have access to globally. Thanks again for your time and help!