2019-11-06 11:29 AM
Hi
I am trying to use TouchGFX with my 32F429IDISCOVERY, DISCO1 according to the video https://www.youtube.com/watch?v=VOs2LYO7wSA) and the description https://touchgfx.zendesk.com/hc/en-us/articles/360021620431-Configuring-STM32F429I-DISCO
I use STM32CubeIDE Version: 1.0.2 and TouchGFX 4.12.2
Unfortunately It does not work still I have the following errors.
make -j4 all
arm-none-eabi-g++ -o "First_Project.elf" @"objects.list" -l:libtouchgfx-float-abi-hard.a -mcpu=cortex-m4 -T"F:\Workspace_STM32CubeIDE\First_Project\STM32F429ZITX_FLASH.ld" --specs=nosys.specs -Wl,-Map="First_Project.map" -Wl,--gc-sections -static -L"F:\Workspace_STM32CubeIDE\First_Project\Middlewares\ST\TouchGFX\touchgfx\lib\core\cortex_m4f\gcc" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -lstdc++ -lsupc++ -Wl,--end-group
Src/BoardConfiguration.o: In function `FrontendApplication::handleTickEvent()':
F:/Workspace_STM32CubeIDE/First_Project/Debug/../TouchGFX/gui/include/gui/common/FrontendApplication.hpp:18: undefined reference to `Model::tick()'
Src/BoardConfiguration.o: In function `FrontendHeapBase::gotoStartScreen(FrontendApplication&)':
F:/Workspace_STM32CubeIDE/First_Project/Debug/../TouchGFX/generated/gui_generated/include/gui_generated/common/FrontendHeapBase.hpp:75: undefined reference to `FrontendApplicationBase::gotoScreen1ScreenNoTransition()'
Src/BoardConfiguration.o: In function `FrontendHeap::FrontendHeap()':
F:/Workspace_STM32CubeIDE/First_Project/Debug/../TouchGFX/gui/include/gui/common/FrontendHeap.hpp:68: undefined reference to `FrontendApplication::FrontendApplication(Model&, FrontendHeap&)'
F:/Workspace_STM32CubeIDE/First_Project/Debug/../TouchGFX/gui/include/gui/common/FrontendHeap.hpp:68: undefined reference to `Model::Model()'
Src/BoardConfiguration.o:(.data._ZL12fontProvider+0x0): undefined reference to `vtable for ApplicationFontProvider'
Src/BoardConfiguration.o: In function `touchgfx::HAL& touchgfx::touchgfx_generic_init<STM32F4HAL>(touchgfx::DMA_Interface&, touchgfx::LCD&, touchgfx::TouchController&, short, short, unsigned short*, unsigned long, unsigned long)':
F:/Workspace_STM32CubeIDE/First_Project/Debug/../Middlewares/ST/TouchGFX/touchgfx/framework/include/common/TouchGFXInit.hpp:89: undefined reference to `BitmapDatabase::getInstance()'
F:/Workspace_STM32CubeIDE/First_Project/Debug/../Middlewares/ST/TouchGFX/touchgfx/framework/include/common/TouchGFXInit.hpp:89: undefined reference to `BitmapDatabase::getInstanceSize()'
F:/Workspace_STM32CubeIDE/First_Project/Debug/../Middlewares/ST/TouchGFX/touchgfx/framework/include/common/TouchGFXInit.hpp:96: undefined reference to `touchgfx::Texts::setLanguage(unsigned short)'
Src/BoardConfiguration.o: In function `ApplicationFontProvider::~ApplicationFontProvider()':
F:/Workspace_STM32CubeIDE/First_Project/Debug/../TouchGFX/generated/fonts/include/fonts/ApplicationFontProvider.hpp:24: undefined reference to `vtable for ApplicationFontProvider'
Src/STM32F4HAL.o: In function `HAL_LTDC_LineEventCallback':
F:/Workspace_STM32CubeIDE/First_Project/Debug/../Src/STM32F4HAL.cpp:94: undefined reference to `touchgfx::OSWrappers::signalVSync()'
Src/STM32F4HAL.o:(.rodata._ZTV10STM32F4HAL+0x48): undefined reference to `touchgfx::HAL::blitCopy(unsigned short const*, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, unsigned char, bool, unsigned short, touchgfx::Bitmap::BitmapFormat, touchgfx::Bitmap::BitmapFormat)'
Src/STM32F4HAL.o:(.rodata._ZTV10STM32F4HAL+0x58): undefined reference to `touchgfx::HAL::blitFill(touchgfx::colortype, unsigned short, unsigned short, unsigned short, unsigned short, unsigned char, unsigned short, touchgfx::Bitmap::BitmapFormat)'
Src/STM32F4HAL.o:(.rodata._ZTV10STM32F4HAL+0x8c): undefined reference to `touchgfx::HAL::configurePartialFrameBuffer(unsigned short, unsigned short, unsigned short, unsigned short)'
Src/STM32F4HAL.o:(.rodata._ZTV10STM32F4HAL+0x9c): undefined reference to `touchgfx::HAL::drawDrawableInDynamicBitmap(touchgfx::Drawable&, unsigned short)'
Src/STM32F4HAL.o:(.rodata._ZTV10STM32F4HAL+0xa0): undefined reference to `touchgfx::HAL::drawDrawableInDynamicBitmap(touchgfx::Drawable&, unsigned short, touchgfx::Rect const&)'
Src/main.o: In function `main':
F:/Workspace_STM32CubeIDE/First_Project/Debug/../Src/main.cpp:144: undefined reference to `osThreadCreate'
F:/Workspace_STM32CubeIDE/First_Project/Debug/../Src/main.cpp:151: undefined reference to `osKernelStart'
Src/main.o: In function `StartDefaultTask(void const*)':
F:/Workspace_STM32CubeIDE/First_Project/Debug/../Src/main.cpp:471: undefined reference to `osDelay'
Src/usb_host.o: In function `MX_USB_HOST_Init':
F:/Workspace_STM32CubeIDE/First_Project/Debug/../Src/usb_host.c:76: undefined reference to `USBH_Init'
F:/Workspace_STM32CubeIDE/First_Project/Debug/../Src/usb_host.c:80: undefined reference to `USBH_RegisterClass'
F:/Workspace_STM32CubeIDE/First_Project/Debug/../Src/usb_host.c:84: undefined reference to `USBH_Start'
F:/Workspace_STM32CubeIDE/First_Project/Debug/../Src/usb_host.c:91: undefined reference to `CDC_Class'
Src/usbh_conf.o: In function `HAL_HCD_SOF_Callback':
F:/Workspace_STM32CubeIDE/First_Project/Debug/../Src/usbh_conf.c:137: undefined reference to `USBH_LL_IncTimer'
Src/usbh_conf.o: In function `HAL_HCD_Connect_Callback':
F:/Workspace_STM32CubeIDE/First_Project/Debug/../Src/usbh_conf.c:147: undefined reference to `USBH_LL_Connect'
Src/usbh_conf.o: In function `HAL_HCD_Disconnect_Callback':
F:/Workspace_STM32CubeIDE/First_Project/Debug/../Src/usbh_conf.c:157: undefined reference to `USBH_LL_Disconnect'
Src/usbh_conf.o: In function `HAL_HCD_HC_NotifyURBChange_Callback':
F:/Workspace_STM32CubeIDE/First_Project/Debug/../Src/usbh_conf.c:171: undefined reference to `USBH_LL_NotifyURBChange'
Src/usbh_conf.o: In function `HAL_HCD_PortEnabled_Callback':
F:/Workspace_STM32CubeIDE/First_Project/Debug/../Src/usbh_conf.c:181: undefined reference to `USBH_LL_PortEnabled'
Src/usbh_conf.o: In function `HAL_HCD_PortDisabled_Callback':
F:/Workspace_STM32CubeIDE/First_Project/Debug/../Src/usbh_conf.c:191: undefined reference to `USBH_LL_PortDisabled'
F:\Workspace_STM32CubeIDE\First_Project\Middlewares\ST\TouchGFX\touchgfx\lib\core\cortex_m4f\gcc\libtouchgfx-float-abi-hard.a(HAL.o): In function `touchgfx::HAL::taskEntry()':
(.text._ZN8touchgfx3HAL9taskEntryEv+0x12): undefined reference to `touchgfx::OSWrappers::waitForVSync()'
F:\Workspace_STM32CubeIDE\First_Project\Middlewares\ST\TouchGFX\touchgfx\lib\core\cortex_m4f\gcc\libtouchgfx-float-abi-hard.a(HAL.o): In function `touchgfx::HAL::unlockFrameBuffer()':
(.text._ZN8touchgfx3HAL17unlockFrameBufferEv+0x0): undefined reference to `touchgfx::OSWrappers::giveFrameBufferSemaphore()'
F:\Workspace_STM32CubeIDE\First_Project\Middlewares\ST\TouchGFX\touchgfx\lib\core\cortex_m4f\gcc\libtouchgfx-float-abi-hard.a(HAL.o): In function `touchgfx::HAL::lockFrameBuffer()':
(.text._ZN8touchgfx3HAL15lockFrameBufferEv+0xa): undefined reference to `touchgfx::OSWrappers::takeFrameBufferSemaphore()'
F:\Workspace_STM32CubeIDE\First_Project\Middlewares\ST\TouchGFX\touchgfx\lib\core\cortex_m4f\gcc\libtouchgfx-float-abi-hard.a(HAL.o): In function `touchgfx::HAL::initialize()':
(.text._ZN8touchgfx3HAL10initializeEv+0x4): undefined reference to `touchgfx::OSWrappers::initialize()'
F:\Workspace_STM32CubeIDE\First_Project\Middlewares\ST\TouchGFX\touchgfx\lib\core\cortex_m4f\gcc\libtouchgfx-float-abi-hard.a(DMA.o): In function `touchgfx::DMA_Interface::addToQueue(touchgfx::BlitOp const&)':
(.text._ZN8touchgfx13DMA_Interface10addToQueueERKNS_6BlitOpE+0x1c): undefined reference to `touchgfx::OSWrappers::tryTakeFrameBufferSemaphore()'
F:\Workspace_STM32CubeIDE\First_Project\Middlewares\ST\TouchGFX\touchgfx\lib\core\cortex_m4f\gcc\libtouchgfx-float-abi-hard.a(DMA.o): In function `touchgfx::DMA_Interface::waitForFrameBufferSemaphore()':
(.text._ZN8touchgfx13DMA_Interface27waitForFrameBufferSemaphoreEv+0x2): undefined reference to `touchgfx::OSWrappers::takeFrameBufferSemaphore()'
(.text._ZN8touchgfx13DMA_Interface27waitForFrameBufferSemaphoreEv+0xa): undefined reference to `touchgfx::OSWrappers::giveFrameBufferSemaphore()'
F:\Workspace_STM32CubeIDE\First_Project\Middlewares\ST\TouchGFX\touchgfx\lib\core\cortex_m4f\gcc\libtouchgfx-float-abi-hard.a(DMA.o): In function `touchgfx::DMA_Interface::executeCompleted()':
(.text._ZN8touchgfx13DMA_Interface16executeCompletedEv+0x2e): undefined reference to `touchgfx::OSWrappers::giveFrameBufferSemaphoreFromISR()'
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:60: First_Project.elf] Error 1
"make -j4 all" terminated with exit code 2. Build might be incomplete.
20:20:19 Build Failed. 23 errors, 0 warnings. (took 903ms)
Regards
Arthur
2019-11-14 12:41 PM
I'm having the same problem on F746G. I've succesfully built and loaded demo from: https://community.st.com/s/question/0D50X0000At0N95SQE/cubeide-100-touchgfx-4100-working-project-inside-stm32f746gdisco
Then I've added few more GUI items, generated code in GFXDesigner and saved .ioc, generating the code.
In STM32F7HAL.cpp I get few undefined references, all to touchgfx::OSWrappers methods.
To linker's path variables I've added new one: ${PROJECT_LOC}\Middlewares\ST\TouchGFX\touchgfx\framework\include
And OSWrappers.hpp is in: /Middlewares/ST/TouchGFX/touchgfx/framework/include/touchgfx/hal/
Adding path variable didn't help.
However GPIO.hpp included from the same folder doesn't throw undefined references error.
EDIT: In example project, OSWrappers.cpp was excluded form build, what led to linker errors. To fix it, had to right click the file in project tree and then edit Resource Configurations.