Skip to main content
Zhi Pang
Associate II
November 23, 2018
Solved

Does CubeMX 5.0.0 Ready to Build a TouchGFX Project?

  • November 23, 2018
  • 58 replies
  • 11637 views

I upgraded my CubeMX to 5.0.0 and installed F4 1.22.0 firmware recently.

So, I tried to use CubeMX build a TouchGFX Project that use TrueSTUDIO as IDE.Since I was successful run a STemWin Project as my custom F429IGx board graphic solution.

In order to enable TouchGFX middleware in CubeMX, I activated and configured FreeRTOS, CRC, LTDC, DMA2D, TIM7 and FMC-SDRAM1.All setting were the same with my previous STemWin project, excepted in GRAPHICS I used TouchGFX as Graphics Framework. And then I generated code.

1. When opened the project, there were *.c , *.cpp , *.h and *.hpp files. But in C/C++ Build - Tool Setting , neither C++ Compiler and C++ Linker existed. So if I build the project under this settings, I will get a link error say something like main function undefined. Because main function is in main.cpp file and wound't be compile by GCC like other cpp files.

2. So I converted the project to C++ project, by using File - New - Convert to a C/C++ Project (Adds C/C++ nature) method. Now the C++ Compiler showed up and C++ Linker replaced C Linker.I built the project again, but a ton of error message like head files couldn't find show up. I fixed by copied and changed include path from C compiler directories to C++ compiler.But things not go well,some directories in Project Resources Manager's Includes still in grey which implicate those directories did not exist in that location.

3. Then I use TouchGFX Designer to generated a simple project which is only contains a single screen of a text and a background image.After code generation, I put the entire folder in TrueSTUDIO project's root. Now the "Includes" didn't has grey directories any more.I dragged all the cpp files which is generated by TouchGFX Designer into TrueSTUDIO project path [Application-User-TouchGFX-generated|gui].Things going in here is a bit out of my ability, since I am new in TouchGFX and new in mixin C(GCC) and C++(G++) code together.

4. I tried out lots of combination of Assembler, C Complier, C++ Complier, C++ Linker settings which mention in TouchGFX website.I can't describe all of them.The best result I can get is all c files compile into *.o successfully by GCC and all C++ files compile into *.o successfully by G++, but when executed

arm-atollic-eabi-g++ -o LC-MC001.elf *.o ...

command,which as we know is linking, tons of error show up.

d:/program files (x86)/atollic/truestudio for stm32 9.0.0/armtools/bin/../lib/gcc/arm-atollic-eabi/6.3.1/../../../../arm-atollic-eabi/bin/ld.exe: error: LC-MC001.elf uses VFP register arguments, Application\User\Core\main.o does not
d:/program files (x86)/atollic/truestudio for stm32 9.0.0/armtools/bin/../lib/gcc/arm-atollic-eabi/6.3.1/../../../../arm-atollic-eabi/bin/ld.exe: failed to merge target specific data of file Application\User\Core\main.o
d:/program files (x86)/atollic/truestudio for stm32 9.0.0/armtools/bin/../lib/gcc/arm-atollic-eabi/6.3.1/../../../../arm-atollic-eabi/bin/ld.exe: error: LC-MC001.elf uses VFP register arguments, Application\User\TouchGFX\generated\ApplicationFontProvider.o does not
d:/program files (x86)/atollic/truestudio for stm32 9.0.0/armtools/bin/../lib/gcc/arm-atollic-eabi/6.3.1/../../../../arm-atollic-eabi/bin/ld.exe: failed to merge target specific data of file Application\User\TouchGFX\generated\ApplicationFontProvider.o
...

5. The last information about this I can find is related to floating point implementation? I already tried to switch all implementation to HW or SW the same time.But no luck.

UPDATE

6. I switch Assembler, C compiler, C++ compiler, C++ Linker floating point option to Hardware implementation.And remove -mfloat-abi=softfp parameter which is recommend by this article:

https://touchgfx.zendesk.com/hc/en-us/articles/206116381-Using-other-IDEs-with-TouchGFX

So, after that, all of the processor will have a united floating point setting. Then put SysTick_Handler function back into stm32f4xx_it.c file. Finally, my project build without any error for the first time.

7. I download the program in my board. Sadly, I got this.0690X000006CSy2QAG.jpg

 And my original design is below.

0690X000006CSy7QAG.jpg

I will keep you update if any further information.

Thanks for your reading, I know it's a very long problem description.:face_with_tears_of_joy:

This topic has been closed for replies.
Best answer by Nawres GHARBI

Hi @Zhi Pang​ ,

After some investigations, it seems that there are some generation problems when using TrueStudio and TouchGFX.

I advice to switch to SW4STM32 until this issue is fixed.

We are sorry for the disturbance this issue may bring.

58 replies

Clark Sann
Associate III
December 9, 2018

@PPiar​ 

For some reason, when I do what you suggested, I still cannot build. Here is exactly what I am doing:

  1. Use CubeMX to create a TouchGFX project using SW3STM32.
  2. In CubeMX, click the Execute button, and use TouchGFX Designer to create a simple GUI with a couple buttons and a couple sliders.
  3. Close CubeMX and open SW4STM32.
  4. In the Project Explorer, navigate to Project->TouchGFX->simulator. Right click the simulator folder, select Resource Configurations->Exclude from Build. The folder and all of its contents are grayed out and the icon has a slash through it.
  5. In the Project Explorer, navigate to Project->Middlewares->ST->TouchGFX->touchgfx->framework->source->platform->hal->simulator->sdl2. Right click the simulator folder, select Resource Configurations->Exclude from Build. The folder and all of its contents are grayed out and the icon has a slash through it.
  6. Build and get the following error: C:/Users/Administrator/workspace/Test_SW4STM33/Middlewares/ST/TouchGFX/touchgfx/framework/include/platform/hal/simulator/sdl2/HALSDL2.hpp:22:10: fatal error: SDL2/SDL_video.h: No such file or directory #include <SDL2/SDL_video.h>. This is apparently caused because the project does not have the SDL2 folder in the include path.
  7. Add the following to the include path in Project Properties->C/C++ Build->Paths and Symbols-> CNU C++->Includes: Middlewares\ST\TouchGFX\touchgfx\framework\include\platform\hal\simulator\sdl2\vendor\
  8. Rebuild. This time the compiler finds the missing files but still produces this error:

Building file: ../Middlewares/ST/TouchGFX/touchgfx/framework/source/platform/driver/touch/SDL2TouchController.cpp

Invoking: MCU G++ Compiler

C:\Users\Administrator\workspace\Test_SW4STM33\Debug

arm-none-eabi-g++ -mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-sp-d16 '-D__weak=__attribute__((weak))' '-D__packed=__attribute__((__packed__))' -DUSE_HAL_DRIVER -DSTM32F746xx '-DUSE_BPP=16' -I"C:/Users/Administrator/workspace/Test_SW4STM33/FATFS/Target" -I"C:/Users/Administrator/workspace/Test_SW4STM33/FATFS/App" -I"C:/Users/Administrator/workspace/Test_SW4STM33/Core/Inc" -I"C:/Users/Administrator/workspace/Test_SW4STM33/TouchGFX/target" -I"C:/Users/Administrator/workspace/Test_SW4STM33/USB_HOST/App" -I"C:/Users/Administrator/workspace/Test_SW4STM33/USB_HOST/Target" -I"C:/Users/Administrator/workspace/Test_SW4STM33/TouchGFX/generated/fonts/include" -I"C:/Users/Administrator/workspace/Test_SW4STM33/TouchGFX/generated/texts/include" -I"C:/Users/Administrator/workspace/Test_SW4STM33/TouchGFX/generated/images/include" -I"C:/Users/Administrator/workspace/Test_SW4STM33/TouchGFX/generated/gui_generated/include" -I"C:/Users/Administrator/workspace/Test_SW4STM33/TouchGFX/gui/include" -I"C:/Users/Administrator/workspace/Test_SW4STM33/Middlewares/ST/TouchGFX/touchgfx/framework/include" -I"C:/Users/Administrator/workspace/Test_SW4STM33/Drivers/STM32F7xx_HAL_Driver/Inc" -I"C:/Users/Administrator/workspace/Test_SW4STM33/Drivers/STM32F7xx_HAL_Driver/Inc/Legacy" -I"C:/Users/Administrator/workspace/Test_SW4STM33/Middlewares/Third_Party/FatFs/src" -I"C:/Users/Administrator/workspace/Test_SW4STM33/Middlewares/Third_Party/FreeRTOS/Source/include" -I"C:/Users/Administrator/workspace/Test_SW4STM33/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS" -I"C:/Users/Administrator/workspace/Test_SW4STM33/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1" -I"C:/Users/Administrator/workspace/Test_SW4STM33/Middlewares/ST/STM32_USB_Host_Library/Core/Inc" -I"C:/Users/Administrator/workspace/Test_SW4STM33/Middlewares/ST/STM32_USB_Host_Library/Class/CDC/Inc" -I"C:/Users/Administrator/workspace/Test_SW4STM33/Drivers/CMSIS/Device/ST/STM32F7xx/Include" -I"C:/Users/Administrator/workspace/Test_SW4STM33/Drivers/CMSIS/Include" -I"C:/Users/Administrator/workspace/Test_SW4STM33/Middlewares/ST/TouchGFX/touchgfx/framework/include/platform/hal/simulator/sdl2/vendor" -Og -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fno-exceptions -fno-rtti -MMD -MP -MF"Middlewares/ST/TouchGFX/touchgfx/framework/source/platform/driver/touch/SDL2TouchController.d" -MT"Middlewares/ST/TouchGFX/touchgfx/framework/source/platform/driver/touch/SDL2TouchController.o" -o "Middlewares/ST/TouchGFX/touchgfx/framework/source/platform/driver/touch/SDL2TouchController.o" "../Middlewares/ST/TouchGFX/touchgfx/framework/source/platform/driver/touch/SDL2TouchController.cpp"

In file included from C:/Users/Administrator/workspace/Test_SW4STM33/Middlewares/ST/TouchGFX/touchgfx/framework/include/platform/hal/simulator/sdl2/vendor/SDL2/SDL_video.h:31:0,

         from C:/Users/Administrator/workspace/Test_SW4STM33/Middlewares/ST/TouchGFX/touchgfx/framework/include/platform/hal/simulator/sdl2/HALSDL2.hpp:22,

         from ../Middlewares/ST/TouchGFX/touchgfx/framework/source/platform/driver/touch/SDL2TouchController.cpp:17:

C:/Users/Administrator/workspace/Test_SW4STM33/Middlewares/ST/TouchGFX/touchgfx/framework/include/platform/hal/simulator/sdl2/vendor/SDL2/SDL_stdinc.h:261:50: error: size of array 'SDL_dummy_enum' is negative

    typedef int SDL_dummy_ ## name[(x) * 2 - 1]

                         ^

C:/Users/Administrator/workspace/Test_SW4STM33/Middlewares/ST/TouchGFX/touchgfx/framework/include/platform/hal/simulator/sdl2/vendor/SDL2/SDL_stdinc.h:290:1: note: in expansion of macro 'SDL_COMPILE_TIME_ASSERT'

 SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));

 ^~~~~~~~~~~~~~~~~~~~~~~

Middlewares/ST/TouchGFX/touchgfx/framework/source/platform/driver/touch/subdir.mk:21: recipe for target 'Middlewares/ST/TouchGFX/touchgfx/framework/source/platform/driver/touch/SDL2TouchController.o' failed

make: *** [Middlewares/ST/TouchGFX/touchgfx/framework/source/platform/driver/touch/SDL2TouchController.o] Error 1

I have no idea how to fix this error.

Was your compiler able to find a path to the SDL2 folder? Do you have any ideas why you are able to build your project and I cannot build mine?

Thank you in advance for any further help you can provide!

PPiar
Visitor II
December 11, 2018

exclude file platform/driver/touch/SDL2TouchController.cpp from compilation

Clark Sann
Associate III
December 13, 2018

Thank you for that advice! I did that and everything compiled!

Now, during linking, I'm getting a large number of multiple definition errors:

make all 
Building target: Test_SW4STM33.elf
Invoking: MCU G++ Linker
arm-none-eabi-g++ -mcpu=cortex-m7 -mthumb -mfloat-abi=hard -mfpu=fpv5-sp-d16 -L"C:\Users\Administrator\workspace\Test_SW4STM33\Middlewares\ST\TouchGFX\touchgfx\lib\core\cortex_m7\gcc" -specs=nosys.specs -specs=nano.specs -T"../STM32F746NGHx_FLASH.ld" -Wl,-Map=output.map -Wl,--gc-sections -fno-exceptions -fno-rtti -o "Test_SW4STM33.elf" @"objects.list" -l:libtouchgfx-float-abi-hard.a -lm
Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers_cmsis.o: In function `touchgfx::OSWrappers::initialize()':
C:\Users\Administrator\workspace\Test_SW4STM33\Debug/../Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers_cmsis.cpp:18: multiple definition of `touchgfx::OSWrappers::initialize()'
Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers.o:C:\Users\Administrator\workspace\Test_SW4STM33\Debug/../Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers.cpp:18: first defined here
Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers_cmsis.o: In function `touchgfx::OSWrappers::takeFrameBufferSemaphore()':
C:\Users\Administrator\workspace\Test_SW4STM33\Debug/../Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers_cmsis.cpp:30: multiple definition of `touchgfx::OSWrappers::takeFrameBufferSemaphore()'
Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers.o:C:\Users\Administrator\workspace\Test_SW4STM33\Debug/../Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers.cpp:25: first defined here
Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers_cmsis.o: In function `touchgfx::OSWrappers::giveFrameBufferSemaphore()':
C:\Users\Administrator\workspace\Test_SW4STM33\Debug/../Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers_cmsis.cpp:36: multiple definition of `touchgfx::OSWrappers::giveFrameBufferSemaphore()'
Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers.o:C:\Users\Administrator\workspace\Test_SW4STM33\Debug/../Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers.cpp:29: first defined here
Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers_cmsis.o: In function `touchgfx::OSWrappers::tryTakeFrameBufferSemaphore()':
C:\Users\Administrator\workspace\Test_SW4STM33\Debug/../Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers_cmsis.cpp:42: multiple definition of `touchgfx::OSWrappers::tryTakeFrameBufferSemaphore()'
Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers.o:C:\Users\Administrator\workspace\Test_SW4STM33\Debug/../Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers.cpp:34: first defined here
Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers_cmsis.o: In function `touchgfx::OSWrappers::giveFrameBufferSemaphoreFromISR()':
C:\Users\Administrator\workspace\Test_SW4STM33\Debug/../Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers_cmsis.cpp:48: multiple definition of `touchgfx::OSWrappers::giveFrameBufferSemaphoreFromISR()'
Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers.o:C:\Users\Administrator\workspace\Test_SW4STM33\Debug/../Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers.cpp:39: first defined here
Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers_cmsis.o: In function `touchgfx::OSWrappers::signalVSync()':
C:\Users\Administrator\workspace\Test_SW4STM33\Debug/../Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers_cmsis.cpp:54: multiple definition of `touchgfx::OSWrappers::signalVSync()'
Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers.o:C:\Users\Administrator\workspace\Test_SW4STM33\Debug/../Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers.cpp:49: first defined here
Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers_cmsis.o: In function `touchgfx::OSWrappers::waitForVSync()':
C:\Users\Administrator\workspace\Test_SW4STM33\Debug/../Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers_cmsis.cpp:63: multiple definition of `touchgfx::OSWrappers::waitForVSync()'
Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers.o:C:\Users\Administrator\workspace\Test_SW4STM33\Debug/../Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers.cpp:60: first defined here
Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers_cmsis.o: In function `touchgfx::OSWrappers::taskDelay(unsigned short)':
C:\Users\Administrator\workspace\Test_SW4STM33\Debug/../Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers_cmsis.cpp:74: multiple definition of `touchgfx::OSWrappers::taskDelay(unsigned short)'
Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers.o:C:\Users\Administrator\workspace\Test_SW4STM33\Debug/../Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers.cpp:69: first defined here
Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers_cmsis.o: In function `vApplicationStackOverflowHook':
C:\Users\Administrator\workspace\Test_SW4STM33\Debug/../Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers_cmsis.cpp:104: multiple definition of `vApplicationStackOverflowHook'
Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers.o:C:\Users\Administrator\workspace\Test_SW4STM33\Debug/../Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers.cpp:91: first defined here
Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers_cmsis.o: In function `vApplicationMallocFailedHook':
C:\Users\Administrator\workspace\Test_SW4STM33\Debug/../Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers_cmsis.cpp:110: multiple definition of `vApplicationMallocFailedHook'
Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers.o:C:\Users\Administrator\workspace\Test_SW4STM33\Debug/../Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers.cpp:97: first defined here
Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers_cmsis.o: In function `vApplicationIdleHook':
C:\Users\Administrator\workspace\Test_SW4STM33\Debug/../Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers_cmsis.cpp:115: multiple definition of `vApplicationIdleHook'
Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers.o:C:\Users\Administrator\workspace\Test_SW4STM33\Debug/../Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers.cpp:102: first defined here
collect2.exe: error: ld returned 1 exit status
make: *** [Test_SW4STM33.elf] Error 1
makefile:92: recipe for target 'Test_SW4STM33.elf' failed
 
15:55:40 Build Finished (took 1s.567ms)

Anyone have any ideas how to fix this?

PPiar
Visitor II
December 14, 2018

full list of excluded from build files:

/Middlewares/ST/TouchGFX/touchgfx/framework/source/platform/driver/touch/SDL2TouchController.cpp

/Middlewares/ST/TouchGFX/touchgfx/framework/source/platform/hal/simulator/sdl2/HALSDL2_icon.cpp

/Middlewares/ST/TouchGFX/touchgfx/framework/source/platform/hal/simulator/sdl2/HALSDL2.cpp

/Middlewares/ST/TouchGFX/touchgfx/framework/source/platform/hal/simulator/sdl2/OSWrappers.cpp

/TouchGFX/simulator/*.*

/TouchGFX/simulator/msvs/*.*

/TouchGFX/simulator/gcc/*.*

Clark Sann
Associate III
December 15, 2018

Hey Nick

By excluding the files you list, I have finally built and flashed my first TouchGFX project using SW4STM32. THANK YOU! That is awesome. I've been trying for months to get SW4STM32 to build a TouchGFX project. Thank you again.

I do have one problem though. My GUI appears on the screen but then the screen freezes. None of the buttons or sliders work at all.

I'm having trouble tracing this app, but it appears to me that the program dies inside of main.cpp at the call to GRAPHICS_Init(). I get to a breakpoint at that point, but when I start after reaching that breakpoint, I do not get to the next statement which is osThreadDef(defaultTask, StartDefaultTask, osPriorityNormal, 0, 4096);

And I do not ever seem to reach touchgfx::touchgfx_init() which is the very next statement called when GRAPHICS_Init is called. That makes no sense. I wonder if tracing is working right.

PPiar
Visitor II
December 16, 2018

Try splitting it off into two tasks. It helped me to get another task to get some time. Also, I'm running gui task with normal priority.

Also, touch screen is not initialized by default, I'm still figuring out how to but should be easy to pull this part from another example

/* USER CODE BEGIN 4 */
void StartGuiTask(void const * argument)
{
 /* Graphic application */
 GRAPHICS_MainTask();
}
/* USER CODE END 4 */
 
/* USER CODE BEGIN Header_StartDefaultTask */
/**
 * @brief Function implementing the defaultTask thread.
 * @param argument: Not used 
 * @retval None
 */
/* USER CODE END Header_StartDefaultTask */
void StartDefaultTask(void const * argument)
{
 /* init code for FATFS */
 MX_FATFS_Init();
 
 /* init code for LIBJPEG */
 MX_LIBJPEG_Init();
 
 /* USER CODE BEGIN 5 */
 /* Infinite loop */
 for(;;)
 {
 HAL_GPIO_WritePin(GPIOI, ARDUINO_D7_Pin, GPIO_PIN_RESET);
 osDelay(500);
 HAL_GPIO_WritePin(GPIOI, ARDUINO_D7_Pin, GPIO_PIN_SET);
 osDelay(500);
 }
 /* USER CODE END 5 */ 
}

Clark Sann
Associate III
December 16, 2018

I decided to reconfigure my project in CubeMX. I found that ST has restructured the files and the simulator files are now gone. So there is no need to exclude any files at all. In SW4STM32, the project builds as soon as I add a few files I need.

I did find that the user include directory is now hidden from Eclipse. Not sure I like that very much. It was awkward to put my include file into the hidden directory. I couldn't find any way to do that within Eclipse. If anyone knows how to do that, please add a comment.

When I run the project on the STM32F756G-DISCO, it puts up the proper GUI and then freezes. I'm not sure yet whether this is due to a problem with FreeRTOS or with the TouchController.

PPiar
Visitor II
December 16, 2018

overall, this is sooo unreliable! I was changing something related to touch screen code, and whole project went into lala land.. First, LCD started displaying garbage. No idea what I have done, but after 10-15 attempts manually clean up object files on HDD and rebuild, I finally seeing reasonable colors on LCD, but nowhere close to actual GUI I'm seeing in Designer.

Another clean up for generated gui files and linker can't find references to touchgfx core functionality..

where is re-build all button in Designer?

why after restarting designer, resources loosing text values? why typography resets to default settings, not what I changed?

this is so painful to waste so much time on nothing, really

Clark Sann
Associate III
December 16, 2018

I think I had the same thing happen. I had a working GUI on my 746G-DISCO. I was trying to get FreeRTOS working, and I started getting garbled GUI. So I backed out my changes but the display was still messed up. I eventually started over, wasting a lot of time, and found a completely different project structure. I am now trying to add a TouchController since CubeMX does not include those drivers and has most of the code commented out.

And yes, I have seen all the Designer problems you mention. And there are also a few bugs in CubeMX.

PPiar
Visitor II
December 16, 2018

I think I've started over 5-6 times by now :\

PPiar
Visitor II
December 16, 2018

touchgfx CLI also strange. Is there any doc for using it?

seems only command which works there is touchgfx help :\

any other ends up like below:

$ touchgfx list COMPILER
No touchgfx environment variable...
E:/TouchGFX/4.10.0/env/MinGW/msys/1.0/ruby193/lib/ruby/gems/1.9.1/gems/touchgfx-cli-4.10.0/lib/touchgfx/cli/base.rb:18:in `touchgfx_root': unhandled exception
 from E:/TouchGFX/4.10.0/env/MinGW/msys/1.0/ruby193/lib/ruby/gems/1.9.1/gems/touchgfx-cli-4.10.0/lib/touchgfx/cli/base.rb:34:in `source_root'
 from E:/TouchGFX/4.10.0/env/MinGW/msys/1.0/ruby193/lib/ruby/gems/1.9.1/gems/touchgfx-cli-4.10.0/lib/touchgfx/cli/base.rb:39:in `list'
 from E:/TouchGFX/4.10.0/env/MinGW/msys/1.0/ruby193/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
 from E:/TouchGFX/4.10.0/env/MinGW/msys/1.0/ruby193/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
 from E:/TouchGFX/4.10.0/env/MinGW/msys/1.0/ruby193/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
 from E:/TouchGFX/4.10.0/env/MinGW/msys/1.0/ruby193/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
 from E:/TouchGFX/4.10.0/env/MinGW/msys/1.0/ruby193/lib/ruby/gems/1.9.1/gems/touchgfx-cli-4.10.0/lib/touchgfx.rb:16:in `<module:CLI>'
 from E:/TouchGFX/4.10.0/env/MinGW/msys/1.0/ruby193/lib/ruby/gems/1.9.1/gems/touchgfx-cli-4.10.0/lib/touchgfx.rb:9:in `<module:TouchGFX>'
 from E:/TouchGFX/4.10.0/env/MinGW/msys/1.0/ruby193/lib/ruby/gems/1.9.1/gems/touchgfx-cli-4.10.0/lib/touchgfx.rb:8:in `<top (required)>'
 from E:/TouchGFX/4.10.0/env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
 from E:/TouchGFX/4.10.0/env/MinGW/msys/1.0/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
 from E:/TouchGFX/4.10.0/env/MinGW/msys/1.0/ruby193/lib/ruby/gems/1.9.1/gems/touchgfx-cli-4.10.0/bin/touchgfx:6:in `<top (required)>'
 from E:/TouchGFX/4.10.0/env/MinGW/msys/1.0/ruby193/bin/touchgfx:22:in `load'
 from E:/TouchGFX/4.10.0/env/MinGW/msys/1.0/ruby193/bin/touchgfx:22:in `<main>'

Mon2
Senior III
January 2, 2019

@PPiar​, our fellow developer brother - we feel your pain - are you up and running? If not, what is your target kit?

(correcting my spelling mistake - was laughing too hard after reading some of your posts - sorry. Been there, done the same)

Are you ok to use IAR or SW4STM32 as the compilers? At this time, you may not have a choice if you wish to use all of these tools together.

@Clark Sann​ has posted a complete process on using TouchGFX + CubeMX for the STM32F746G Discovery toolchain integration.

We will all go to therapy together before this is all over =)

< permanent link on our server >

https://axxonshare.s3.amazonaws.com/my_combo_tutorial.zip

KMunj
Associate III
December 17, 2018

​I am trying to do the same. Started with CubeMX 5.0, TouchGFX 4.10.0 and TrueStudio 9.2.0.

I followed all the steps in Tutorial 10 of UM1718.

In my case, I can generate the code in CubeMX. Then I can build it successfully on TrueStudio without any errors.

When I run the debugger, I get following error message all the time;

I think the problem is that .elf file is not getting generated. I searched on my C drive and I can’t find that file.

If anyone knows how to fix it, please let me know.

I have addressed to local ST folks, but I haven't heard anything back.

Thanks

Kiran

Martin KJELDSEN
Principal III
January 2, 2019

Hi,

Did you get anywhere with this issue? I didn't see any attached log or screenshot to your post, so i'm not sure what the precise error you're getting is.

Thanks!

KMunj
Associate III
January 2, 2019
Hi Martin,
I have not resolved this issue yet.
I have been working with ST BU Manager from Santa Clara office Tim Nakonsut. But he has been out for holiday shutdown.
All I want is updated Tutorial 10 in UM1718. I can’t make current tutorial 10 in UM1718 work. The problem I am see is that when the build is done, it doesn’t create .elf or .bin file and Debugger doesn’t start.
Thank you very much.
Regards,
Kiran
Mon2
Senior III
January 2, 2019

@KMunj​ - what do you wish to do? What is your target kit?

Please do review the following in the meantime:

< permanent link on our server >

https://axxonshare.s3.amazonaws.com/my_combo_tutorial.zip

NB: Martin will know more of course - he is a developer of the TouchGFX toolchain (Draupner) but the above are confirmed work arounds we developed after weeks of the same efforts.

Clark Sann has written a similar document for the STM32F746G Discovery target & SW4STM32 compiler.

Hope it helps.

Kumar

KMunj
Associate III
January 3, 2019

​Hi Kumar,

As per your instruction, I did everything.

There were few differences between F429 and F746 discovery boards, like I had to use SPI2 instead of SPI5.

But MX created the code without any warning. But when do clean and  a build, I get following build error and it gets terminated.

C:/TouchGFXProjects/my_SW4STM32_STM32F746_DISC-project2/Middlewares/ST/TouchGFX/touchgfx/os/OSWrappers.cpp:1:10: fatal error: touchgfx/hal/OSWrappers.hpp: No such file or directory

#include <touchgfx/hal/OSWrappers.hpp>

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

compilation terminated.

make: *** [Middlewares/TouchGFX/OSWrappers.o] Error 1

Middlewares/TouchGFX/subdir.mk:18: recipe for target 'Middlewares/TouchGFX/OSWrappers.o' failed

10:57:47 Build Finished (took 5s.982ms)

Following is the build screen. Please let me know how to fix this issue.

Thanks

Kiran

0690X000006CxVkQAK.png

Mon2
Senior III
January 3, 2019

Hi Kiran (@KMunj​ ). Please review the article from Clark Sann (@Clark Sann​ :

https://community.st.com/s/question/0D50X0000AAHSjZSQX/how-to-get-a-working-touchgfx-project-working-with-stm32f746gdisco-board-and-sw4stm32

Hope this helps. Post back if it does not.

Kumar

KMunj
Associate III
January 3, 2019

​Hi Kumar,

Thank you very much for the link. That was good. I managed to do the 1st two labs from the ST  seminar, I attended using EWARM. Everything worked as explained by Clark Sann in the document.

Hi Clark Sann,

Thank you very much for the article.

I will try other two labs tomorrow. They should work.

Thanks,

Kiran

TCao.2
Visitor II
January 18, 2021

UM1718 Rev 33 (11/2020) I got didn't have Tutorial 10. Is there a download link for UM with TouchGFX tutorial?

Romain DIELEMAN
ST Employee
January 19, 2021

Hi,

This post is outdated. The latest versions of the tools are STM32CubeMX 6.1.1 and TouchGFX 4.16.

The TouchGFX tutorials and documentation have been improved and moved to a new website.

If you have more questions could you create a new post with the relevant information and topic tags ?

/Romain