cancel
Showing results for 
Search instead for 
Did you mean: 

Linking error when adding Video Widget

TLaur.3
Associate II

Hello,

I've followed the Generator User Guide to implement the Video decoding.

Unfortunatly, when I add the video widget and try to run on target, I obtain the following error :

 Linking CM7/TouchGFX/build/bin/target.elf
        CM7/TouchGFX/build/Riverdi_70STM32H7/CM7/TouchGFX/target/generated/SoftwareMJPEGDecoder.o: In function `SoftwareMJPEGDecoder::decodeMJPEGFrame(unsigned char const*, unsigned long, unsigned char*, unsigned short, unsigned short, unsigned long) [clone .part.3]':
        c:\TouchGFXProjects\RIVERDI_7_H7/CM7/TouchGFX/target/generated/SoftwareMJPEGDecoder.cpp:347: undefined reference to `jpeg_std_error'
        c:\TouchGFXProjects\RIVERDI_7_H7/CM7/TouchGFX/target/generated/SoftwareMJPEGDecoder.cpp:350: undefined reference to `jpeg_CreateDecompress'
        c:\TouchGFXProjects\RIVERDI_7_H7/CM7/TouchGFX/target/generated/SoftwareMJPEGDecoder.cpp:353: undefined reference to `jpeg_mem_src'
        c:\TouchGFXProjects\RIVERDI_7_H7/CM7/TouchGFX/target/generated/SoftwareMJPEGDecoder.cpp:356: undefined reference to `jpeg_read_header'
        c:\TouchGFXProjects\RIVERDI_7_H7/CM7/TouchGFX/target/generated/SoftwareMJPEGDecoder.cpp:362: undefined reference to `jpeg_start_decompress'
        c:\TouchGFXProjects\RIVERDI_7_H7/CM7/TouchGFX/target/generated/SoftwareMJPEGDecoder.cpp:375: undefined reference to `jpeg_read_scanlines'
        c:\TouchGFXProjects\RIVERDI_7_H7/CM7/TouchGFX/target/generated/SoftwareMJPEGDecoder.cpp:396: undefined reference to `jpeg_finish_decompress'
        c:\TouchGFXProjects\RIVERDI_7_H7/CM7/TouchGFX/target/generated/SoftwareMJPEGDecoder.cpp:399: undefined reference to `jpeg_destroy_decompress'
        CM7/TouchGFX/build/Riverdi_70STM32H7/CM7/TouchGFX/target/generated/SoftwareMJPEGDecoder.o: In function `SoftwareMJPEGDecoder::decodeFrame(touchgfx::Rect const&, unsigned char*, unsigned long)':
        c:\TouchGFXProjects\RIVERDI_7_H7/CM7/TouchGFX/target/generated/SoftwareMJPEGDecoder.cpp:424: undefined reference to `jpeg_std_error'
        c:\TouchGFXProjects\RIVERDI_7_H7/CM7/TouchGFX/target/generated/SoftwareMJPEGDecoder.cpp:427: undefined reference to `jpeg_CreateDecompress'
        c:\TouchGFXProjects\RIVERDI_7_H7/CM7/TouchGFX/target/generated/SoftwareMJPEGDecoder.cpp:430: undefined reference to `jpeg_mem_src'
        c:\TouchGFXProjects\RIVERDI_7_H7/CM7/TouchGFX/target/generated/SoftwareMJPEGDecoder.cpp:433: undefined reference to `jpeg_read_header'
        c:\TouchGFXProjects\RIVERDI_7_H7/CM7/TouchGFX/target/generated/SoftwareMJPEGDecoder.cpp:439: undefined reference to `jpeg_start_decompress'
        c:\TouchGFXProjects\RIVERDI_7_H7/CM7/TouchGFX/target/generated/SoftwareMJPEGDecoder.cpp:447: undefined reference to `jpeg_read_scanlines'
        c:\TouchGFXProjects\RIVERDI_7_H7/CM7/TouchGFX/target/generated/SoftwareMJPEGDecoder.cpp:465: undefined reference to `jpeg_read_scanlines'
        c:\TouchGFXProjects\RIVERDI_7_H7/CM7/TouchGFX/target/generated/SoftwareMJPEGDecoder.cpp:486: undefined reference to `jpeg_finish_decompress'
        c:\TouchGFXProjects\RIVERDI_7_H7/CM7/TouchGFX/target/generated/SoftwareMJPEGDecoder.cpp:489: undefined reference to `jpeg_destroy_decompress'

FOr information, I use Touchgfx 4.20 on the riverdi RVT70HSSNWC00-B board.

Thanks.

4 REPLIES 4
Romain DIELEMAN
ST Employee

Hello,

For riverdi products I would recommend contacting their help desk directly as we are not the ones behind the development of the projects available in TouchGFX Designer. They are our partners, and we only upload them.

/Romain

Romain DIELEMAN
ST Employee

Wait, did you start your project from a TouchGFX Board Template for this riverdi board from TouchGFX Designer or did you do the development of your projects from scratch from STM32CubeMX? From the riverdi project available in TouchGFX Designer I can see that the video decoding strategy is in Hardware decoding, whereas your errors refer to SoftwareMJPEGDecoder.

No matter the answer I just know that enabling video is a mess on dual core boards 😅, so I would still recommend contacting riverdi for better help. Maybe other users can chip in too if they have made it work on other H7 dual core boards.

/Romain

Hello Romain,

Thanks for your answers. I've succeeded to deploy my app with the video by create a new project and import my gui. In fact, it was in Hardware decoding (even if I tried yesterday and failed 😅).

But another issue, I've succeeded by running on target from TouchGFX Designer but when I import the project in CubeIDE, there is another error :

c:\st\stm32cubeide_1.11.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.100.202210260954\tools\arm-none-eabi\bin\ld.exe: ./Application/User/generated/Screen2ViewBase.o: in function `Screen2ViewBase::Screen2ViewBase()':
C:/TouchGFXProjects/test_functional/CM7/TouchGFX/generated/gui_generated/src/screen2_screen/Screen2ViewBase.cpp:28: undefined reference to `video_SampleVideo2_800x480_bin_start'

videos/VideoDatabase.hpp is include in Screen2ViewBase.cpp and I can go through the video_SampleVideo2_800x400_bin_start declaration by "Ctrl + click" on the cpp file.

Can you help me or should I contact their support also ?

Thanks !

This seems to me like a path missing issue in STM32CubeIDE. Even if the files does exist and the include is correct in the code, STM32CubeIDE may not know how/where to look for it. So you need to go to the properties of your project (right click on the name of your project on the tree view on the left), and navigate to the path and symbols section. The screenshot is just to show you were to navigate, try to add to your project as a path maybe ../TouchGFX/generated/videos/include if it is not already included

0693W00000Y88wZQAR.pngThe video_sample..._bin_start initialisation is in VideoDataBase.hpp in the generated/videos/include/videos folder so that is why i would first look there.

/Romain