Showing results for 
Search instead for 
Did you mean: 

STM32H757I-EVAL adc acquisition project don't flash on TouchGFX



I'm a student and i'm creating a project of a HMI adc acquisition interface with a STM32H757I_EVAL according to this video:

I created the HMI as simple as possible, simulated and uploaded into the board via TouchGFX and works fine. Then i wrote the code according to the video with my teacher into STM32CubeIDE, compiled and got 0 errors and 0 warnings. Simulated again into TouchGFX and still simulated fine.


When i upload the code into the board via STM32CubeIDE it upload but the lcd monitor shows a pixelated grey screen, but if i touch the button i placed into the HMI it changes screen into a different pixelated grey scale screen, so the "button object" works but not displayed properly.


When i upload the code via TouchGFX it compiles but when flashing it got "undefined reference" error to the hal adc instruction i wrote (start, pollforconversion, getvalue,stop) and the flashing fails. I got this exact errors:



CM7/TouchGFX/build/STM32H747I_EVAL/CM7/TouchGFX/gui/src/model/Model.o: In function `Model::tick()':
c:\Users\<user>\Documents\ProgettiTouchGFX\Prova/CM7/TouchGFX/gui/src/model/Model.cpp:32: undefined reference to `HAL_ADC_Start'
c:\Users\<user>\Documents\ProgettiTouchGFX\Prova/CM7/TouchGFX/gui/src/model/Model.cpp:33: undefined reference to `HAL_ADC_PollForConversion'
c:\Users\<user>\Documents\ProgettiTouchGFX\Prova/CM7/TouchGFX/gui/src/model/Model.cpp:34: undefined reference to `HAL_ADC_GetValue'
c:\Users\<user>\Documents\ProgettiTouchGFX\Prova/CM7/TouchGFX/gui/src/model/Model.cpp:35: undefined reference to `HAL_ADC_Stop'
CM7/TouchGFX/build/STM32H747I_EVAL/CM7/Core/Src/main.o: In function `MX_ADC1_Init':
c:\Users\<user>\Documents\ProgettiTouchGFX\Prova/CM7/Core/Src/main.c:283: undefined reference to `HAL_ADC_Init'
c:\Users\<user>\Documents\ProgettiTouchGFX\Prova/CM7/Core/Src/main.c:291: undefined reference to `HAL_ADCEx_MultiModeConfigChannel'
c:\Users\<user>\Documents\ProgettiTouchGFX\Prova/CM7/Core/Src/main.c:305: undefined reference to `HAL_ADC_ConfigChannel'
collect2.exe: error: ld returned 1 exit status
gcc/makefile_cm7:378: recipe for target 'CM7/TouchGFX/build/bin/target.elf' failed
make[3]: *** [CM7/TouchGFX/build/bin/target.elf] Error 1
make[3]: Leaving directory 'c:/Users/<user>/Documents/ProgettiTouchGFX/Prova'
gcc/makefile_cm7:374: recipe for target 'generate_assets' failed
make[2]: *** [generate_assets] Error 2
make[2]: Leaving directory 'c:/Users/<user>/Documents/ProgettiTouchGFX/Prova'
Makefile_cm7:49: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory 'C:/Users/<user>/Documents/ProgettiTouchGFX/Prova/gcc'
../../gcc/Makefile:10: recipe for target 'flash' failed
make: *** [flash] Error 2



where am i wrong?

Chief II

This is normal , modified project stop be simulated or flashed on designer. You can do this only in IDE, or require rewrite build scripts, but this is waste of time.

Normal workflow with real hw is in designer manage GUI and only generate code.

HW and debug plus flash you do in IDE.

Hello @Dast-r ,

Based on the errors you have provided, TouchGFX is trying to use the object files that it previously compiled to flash the board, and obviously they are different from your current code. I suggest you to delete the Config, generated, and build folders, and try again. 

I hope this helps you, don't hesitate to ask more questions

Mohammad MORADI
ST Software Developer | TouchGFX

Hello @Dast-r ,

Were you able to make any progress on this topic?

Mohammad MORADI
ST Software Developer | TouchGFX