2024-05-24 10:30 AM - edited 2024-06-09 09:48 AM
Software Using:
Hardware Using:
Tips: Don't use SPACES in the path of any STM software and your projects, sometimes it will warn you but the other time it will create problems without your notice.
Here is my progress:
set(root_tgfx_dir ../../TouchGFX)
set(touchgfx_include_DIRS
${root_tgfx_dir}/gui/include
${root_tgfx_dir}/generated/gui_generated/include
${root_tgfx_dir}/generated/images/include
${root_tgfx_dir}/generated/bitmaps/include
${root_tgfx_dir}/generated/fonts/include
${root_tgfx_dir}/generated/texts/include
${root_tgfx_dir}/generated/videos/include
${root_tgfx_dir}/../Middlewares/ST/touchgfx/framework/include
${root_tgfx_dir}/../Middlewares/ST/touchgfx/framework/include/common
${root_tgfx_dir}/../Middlewares/ST/touchgfx/framework/common/include
${root_tgfx_dir}/App
${root_tgfx_dir}/Target
${root_tgfx_dir}/Target/generated
)
file(GLOB_RECURSE graphics_core_generated_SRCS
${root_tgfx_dir}/generated/*.cpp
${root_tgfx_dir}/gui/*.cpp
${root_tgfx_dir}/gui/*.c
${root_tgfx_dir}/App/*.c
${root_tgfx_dir}/Target/*.cpp
${root_tgfx_dir}/Target/*.c
)
set(graphics_core_generated_SRCS ${graphics_core_generated_SRCS})
list(FILTER graphics_core_generated_SRCS EXCLUDE REGEX ".*/simulator/.*")
list(FILTER touchgfx_include_DIRS EXCLUDE REGEX ".*/simulator/.*")
and add these to their corresponding places:
target_include_directories(stm32cubemx INTERFACE
<...>
${touchgfx_include_DIRS}
)
target_sources(stm32cubemx INTERFACE
<...>
${graphics_core_generated_SRCS}
)
<...>
add_library(touchgfx INTERFACE)
target_link_libraries(stm32cubemx INTERFACE
touchgfx ${CMAKE_SOURCE_DIR}/Middlewares/ST/touchgfx/lib/core/cortex_m4f/gcc/libtouchgfx-float-abi-hard.a
)
Beware if you generate code again using STM32CubeMX, the above addition will be deleted, you'll have to add it again or just use git.
Build again and you will get these error:
undefined reference to `touchgfxDisplayDriverTransmitActive'
undefined reference to `touchgfxDisplayDriverTransmitBlock'
After some reading I fond out you have to implement these yourself, so I created some dummy function for it, and the build successes.
After the successful build, I ported my display driver and set up some code for simple test purpose, and it indeed can run, turns out all you need to do is just disable one command and edit one CMake file.
Solved! Go to Solution.
2024-05-29 03:08 AM
Updated and updating.
2024-05-29 01:18 AM
Hello @Aquamarine ,
It would be nice to mention the board and display you use as well as the version of the softwares you use and make sure you use the most recent ones.
Interestingly, when I try to build using CubeIDE, it too failed with the similar error.
I think you should try to fix that before processing further. Projects should be working on CubeIDE (especially if this one of the board setup we provide).
Regards,
2024-05-29 03:08 AM
Updated and updating.