2019-10-28 02:29 PM
Hi,
from Properties -> Paths and Symbols i added file path to 'Include Directories'. Then, i added my source file and my header file to 'my_libs' which i created under project_name -> Drivers.
When i call a function from library i see 'undefined reference to (function_name)' error.
How can i fix this?
Best regads.
Solved! Go to Solution.
2019-10-29 02:01 AM
In this tree diagram the HAL_Driver node at the bottom?
2019-10-28 03:17 PM
Include files describe the interfaces for the code, not the library code itself.
Add the library source files to your project so they get built, and are linkable.
For definitions, make sure stm32xyz_hal_conf.h in the project calls out the modules you want to use.
2019-10-29 01:19 AM
Thanks for answer.
I added this snippet to stm32f0xx_hal_conf.h
#ifdef DS18B20
#include "DS18B20.h"
#endif /* DS18B20 DRIVER ENABLED*/
But i couldn't understand where should i add the library source files
2019-10-29 02:01 AM
In this tree diagram the HAL_Driver node at the bottom?
2019-10-29 06:05 AM
Thanks, now it works