2019-04-03 08:29 AM
Hello!
I am working on to integrate a BMP180 sensor with my stm32f769i discovery board. The goal would be to read temperature and air pressure values and show these values on the screen. I have written the driver code in C for the bmp180 and it's working fine on other boards that doesn't use touchgfx, freertos, cpp. But it isn't working on stm32f769i with touchgfx on it.
I tried to use:
extern "C"
{
#include "bmp180.h"
}
But I get the following error:
Linking TouchGFX/build/bin/target.elf
TouchGFX/build/ST/STM32F769I-DISCO/Core/Src/main.o: In function `main':
c:\TouchGFXProjects\HWButton/Core/Src/main.cpp:153: undefined reference to `BMP180_Init(__I2C_HandleTypeDef*, unsigned char)'
collect2.exe: error: ld returned 1 exit status
gcc/Makefile:330: recipe for target 'TouchGFX/build/bin/target.elf' failed
make[2]: *** [TouchGFX/build/bin/target.elf] Error 1
gcc/Makefile:326: recipe for target 'generate_assets' failed
make[1]: *** [generate_assets] Error 2
../gcc/Makefile:45: recipe for target 'all' failed
make: *** [all] Error 2
Could you please help me how I can integrate my driver code and run it successfully?
Thank you very much in advance!
2019-04-03 12:57 PM
2019-04-03 04:59 PM
Can you post your "main.cpp", "bmp180.c", and "bmp180.h" files? It's hard to tell why linking is failing without seeing what's in those.