Skip to main content
FMarr.1
Associate II
December 12, 2020
Solved

STM32H7BWorkshop2020, I upgrade IDE, TouchGFX, Firmware repository to 1.08 and all. Started from fresh sample from the workshop, TouchGFX generates codes that cannot be compiled. What should I change?

  • December 12, 2020
  • 5 replies
  • 1421 views

..

This topic has been closed for replies.
Best answer by Alexandre RENOUX

Hi FMarr.1,

The compiling error you faced seems to be linked to the fatc that you upgraded to the newest version. I believe some functions are no longer supported in the newest version. So following the indication of the workshop but doing your project yourself is the correct way to go I think.

If you touchscreen does not work, it could be that you haven't initialized the touchscreen correctly (I2C not enabled, etc.). Since you are working with H7B3-DISCO, I recommend you to use the Application Template available in the Designer or at least to refer to it.

/Alexandre

5 replies

MM..1
Super User
December 12, 2020

"VERY WELL" explain. Try copy here error message!

FMarr.1
FMarr.1Author
Associate II
December 12, 2020

15:22:42 **** Incremental Build of configuration Debug for project STM32H7B3I_DISCO ****

make -j8 all 

arm-none-eabi-g++ -o "STM32H7B3I_DISCO.elf" @"objects.list" -l:libtouchgfx-float-abi-hard.a -mcpu=cortex-m7 -T"C:\2020_ST_GFX_WS\STM32H7BWorkshop2020\STM32H7BWorkshop2020\STM32CubeIDE\STM32H7B3LIHXQ_FLASH.ld" --specs=nosys.specs -Wl,-Map="STM32H7B3I_DISCO.map" -Wl,--gc-sections -static -L"C:\2020_ST_GFX_WS\STM32H7BWorkshop2020\STM32H7BWorkshop2020\STM32CubeIDE\Middlewares\ST\touchgfx\lib\core\cortex_m7\gcc" -L"C:/_SandBox/2020_WShp_GFX/Lab/STM32H7BWorkshop2020_NSA/Middlewares/ST/touchgfx/lib/core/cortex_m7/gcc" -L"C:/STM32H7BWorkshop2020/DryRun/STM32H7BWorkshop2020/Middlewares/ST/touchgfx/lib/core/cortex_m7/gcc" -L"C:/_Temp/STM32H7BWorkshop2020/STM32H7BWorkshop2020/Middlewares/ST/touchgfx/lib/core/cortex_m7/gcc" -L"C:/STM32H7BWorkshop2020/STM32H7BWorkshop2020/Middlewares/ST/touchgfx/lib/core/cortex_m7/gcc" -LC:/2020_ST_GFX_WS/STM32H7BWorkshop2020/STM32H7BWorkshop2020/Middlewares/ST/touchgfx/lib/core/cortex_m7/gcc --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -lstdc++ -lsupc++ -Wl,--end-group

C:\2020_ST_GFX_WS\STM32H7BWorkshop2020\STM32H7BWorkshop2020\STM32CubeIDE\Middlewares\ST\touchgfx\lib\core\cortex_m7\gcc\libtouchgfx-float-abi-hard.a(LCD.o): In function `touchgfx::LCD::drawString(touchgfx::Rect, touchgfx::Rect const&, touchgfx::LCD::StringVisuals const&, unsigned short const*, ...)':

(.text._ZN8touchgfx3LCD10drawStringENS_4RectERKS1_RKNS0_13StringVisualsEPKtz+0x0): multiple definition of `touchgfx::LCD::drawString(touchgfx::Rect, touchgfx::Rect const&, touchgfx::LCD::StringVisuals const&, unsigned short const*, ...)'

Application/User/generated/Texts.o:C:/2020_ST_GFX_WS/STM32H7BWorkshop2020/STM32H7BWorkshop2020/TouchGFX/generated/texts/src/Texts.cpp:51: first defined here

C:\2020_ST_GFX_WS\STM32H7BWorkshop2020\STM32H7BWorkshop2020\STM32CubeIDE\Middlewares\ST\touchgfx\lib\core\cortex_m7\gcc\libtouchgfx-float-abi-hard.a(Font.o): In function `touchgfx::Font::getStringWidth(unsigned short const*, ...) const':

(.text._ZNK8touchgfx4Font14getStringWidthEPKtz+0x0): multiple definition of `touchgfx::Font::getStringWidth(unsigned short const*, ...) const'

Application/User/generated/Texts.o:C:/2020_ST_GFX_WS/STM32H7BWorkshop2020/STM32H7BWorkshop2020/TouchGFX/generated/texts/src/Texts.cpp:14: first defined here

C:\2020_ST_GFX_WS\STM32H7BWorkshop2020\STM32H7BWorkshop2020\STM32CubeIDE\Middlewares\ST\touchgfx\lib\core\cortex_m7\gcc\libtouchgfx-float-abi-hard.a(Font.o): In function `touchgfx::Font::getStringWidth(unsigned char, unsigned short const*, ...) const':

(.text._ZNK8touchgfx4Font14getStringWidthEhPKtz+0x0): multiple definition of `touchgfx::Font::getStringWidth(unsigned char, unsigned short const*, ...) const'

Application/User/generated/Texts.o:C:/2020_ST_GFX_WS/STM32H7BWorkshop2020/STM32H7BWorkshop2020/TouchGFX/generated/texts/src/Texts.cpp:23: first defined here

C:\2020_ST_GFX_WS\STM32H7BWorkshop2020\STM32H7BWorkshop2020\STM32CubeIDE\Middlewares\ST\touchgfx\lib\core\cortex_m7\gcc\libtouchgfx-float-abi-hard.a(Font.o):(.rodata._ZTVN8touchgfx4FontE+0x0): multiple definition of `vtable for touchgfx::Font'

Application/User/generated/Texts.o:(.rodata._ZTVN8touchgfx4FontE+0x0): first defined here

C:\2020_ST_GFX_WS\STM32H7BWorkshop2020\STM32H7BWorkshop2020\STM32CubeIDE\Middlewares\ST\touchgfx\lib\core\cortex_m7\gcc\libtouchgfx-float-abi-hard.a(TextProvider.o): In function `touchgfx::TextProvider::initializeInternal()':

(.text._ZN8touchgfx12TextProvider18initializeInternalEv+0x0): multiple definition of `touchgfx::TextProvider::initializeInternal()'

Application/User/generated/Texts.o:C:/2020_ST_GFX_WS/STM32H7BWorkshop2020/STM32H7BWorkshop2020/TouchGFX/generated/texts/src/Texts.cpp:46: first defined here

C:\2020_ST_GFX_WS\STM32H7BWorkshop2020\STM32H7BWorkshop2020\STM32CubeIDE\Middlewares\ST\touchgfx\lib\core\cortex_m7\gcc\libtouchgfx-float-abi-hard.a(TextProvider.o): In function `touchgfx::TextProvider::getNextLigature(unsigned char)':

(.text._ZN8touchgfx12TextProvider15getNextLigatureEh+0x0): multiple definition of `touchgfx::TextProvider::getNextLigature(unsigned char)'

Application/User/generated/Texts.o:C:/2020_ST_GFX_WS/STM32H7BWorkshop2020/STM32H7BWorkshop2020/TouchGFX/generated/texts/src/Texts.cpp:32: first defined here

Application/User/TouchGFX/target/generated/TouchGFXConfiguration.o:(.rodata._ZTV19FrontendApplication[_ZTV19FrontendApplication]+0x30): undefined reference to `touchgfx::Application::requestRedraw()'

Application/User/TouchGFX/target/generated/TouchGFXConfiguration.o:(.rodata._ZTV23FrontendApplicationBase[_ZTV23FrontendApplicationBase]+0x30): undefined reference to `touchgfx::Application::requestRedraw()'

Application/User/TouchGFX/target/generated/TouchGFXConfiguration.o:(.rodata._ZTVN8touchgfx14MVPApplicationE[_ZTVN8touchgfx14MVPApplicationE]+0x30): undefined reference to `touchgfx::Application::requestRedraw()'

collect2.exe: error: ld returned 1 exit status

make: *** [makefile:85: STM32H7B3I_DISCO.elf] Error 1

"make -j8 all" terminated with exit code 2. Build might be incomplete.

15:22:46 Build Failed. 16 errors, 0 warnings. (took 3s.785ms)

FMarr.1
FMarr.1Author
Associate II
December 12, 2020

the error seems to be in Texts.cpp

By the way, i started from scratch another project, following the indication in the workshop.

It works except the touchscreen does not work. I compare with the workshop code and

missed code in TouchGFXGPIO, this is code generated from TouchGFX. So maybe there miss some

setup i should do to tell TouchGFX i am using touch screen.

Alexandre RENOUX
Alexandre RENOUXBest answer
Visitor II
December 14, 2020

Hi FMarr.1,

The compiling error you faced seems to be linked to the fatc that you upgraded to the newest version. I believe some functions are no longer supported in the newest version. So following the indication of the workshop but doing your project yourself is the correct way to go I think.

If you touchscreen does not work, it could be that you haven't initialized the touchscreen correctly (I2C not enabled, etc.). Since you are working with H7B3-DISCO, I recommend you to use the Application Template available in the Designer or at least to refer to it.

/Alexandre

FMarr.1
FMarr.1Author
Associate II
December 14, 2020

Thanks for reply, i will compare the two versions and try to see where I am wrong.

Regards