2024-02-23 06:35 AM
Hi there, I'm coming across some issues with respect to Touch GFX and my project. I'm trying to build a UI on the Touch GFX Designer software such that it can display certain temperature readings onto the Riverdi STM32H7 embedded display. I'm trying to use SPI2 communication line from the on-display board MCU to the temperature sensor module and hardware seems to be fine. For the CS Pin I'm using the GPIOA Pin 5 which is used for DAC1 (I've commented out it's initialisation and used it as a Output pin).
I was able to successfully build the Touch GFX project and was able to access the 'gui' folder generated by the designer as you can see below:
Next, I added the files pertaining to the MAX31856 temperature sensor that I'm using and please note that these files are in C and not C++. I also made sure that they were included in the project correctly however I'm not certain. Below are the include paths, the sensor files and the sensor file position in the project explorer:
A) GCC Compiler -> Include paths:
B) G++ Compiler -> Include paths:
C) MAX31856.c and .h files:
MAX31856.c file:
MAX31856.h file:
D) Project Explorer View:
C:/Tempcounter/CM7/TouchGFX/gui/src/screen1_screen/Screen1View.cpp:27: undefined reference to `MAX31865_readTemp()'
collect2.exe: error: ld returned 1 exit status
It would be great if anyone could help with this issue!
2024-02-23 06:38 AM
@Mohammad MORADI ESFAHANIASL I've had a look at some of your responses on Touch GFX and external buttons, it would be great if I could please get some insight on this.
2024-02-23 06:42 AM
@Martin KJELDSEN it would be great to have your opinion on this as well.
2024-02-23 06:45 AM
@LouisB Could I please get some assistance with this.
2024-02-23 07:30 AM
Hello @koderboi22 ,
First of all, I got a bit confused by your statement "I was able to successfully build the Touch GFX project and was able to access the 'gui' folder generated by the designer", are you trying to create a custom project yourself? Or are you using the available board setup in TouchGFX Designer?
And for the error you mentioned, you need to define some functions in the Model that will interact with MAX31856, and then, you need to call those functions in you Screen1View.cpp.
You can check the available Board Specific Demos to get inspiration for your project because they show how you can interact with the rest of the board.
I hope this helps you, don't hesitate to ask more questions.
2024-02-23 07:50 AM
Yes I'm trying to build my custom project and I want to use certain functions from my own .c and .h files which I've added to the project. I'm using the onboard MCU on the Riverdi STM32H7 Display to setup coms between the sensor module and the screen. I'm struggling to get the data from the sensor onto my screen and wanted to know how I can achieve this.
Also I will have a look at some demos and get back to you regarding the issue if it persists, Thank you.
2024-02-23 08:26 AM
Please use this button to properly post source code - not as images/screenshots:
2024-02-23 10:17 AM
Hello
You probably should use extern "C" in max_31856.h- file funtion definitions when calling from cpp- file.
Check this:
Br JTP
2024-02-27 03:11 AM
Hi @JTP1 , I tried using extern as well but it didn't work, I'll use the MVP structure and try it, hope I'll have better luck.
2024-03-14 08:10 AM
Hello @koderboi22 ,
Did you make any progress on this matter?