Discuss STM32 and TouchGFX implementations, including configuration, debugging, and optimization.
Most recent activity
Hi,I wanted to have space as fallback character for one of the fonts that I'm using.I tried setting the fallback character as empty.....fallback character with 0x20 (ASCII value of space).Both the approaches don't seem to work.Looking for some guidance. @Mohammad MORADI ESFAHANIASL @Romain DIELEMAN @Yoann KLEIN @JTP1 Thanks & Regards,Keerthi
Hi,I cannot seem to be able to print char array to unicode buffer.I have set Wildcard ranges to 0-9,A-z (also tried 0x20-0x7E)I'm trying to display file names in the UI, which have arbitrary and modifyable names. When I do snprintf with "%s" with a char array, TouchGFX will print ?-marks, character values in the buffer appear to be of values around 25 000. Do I need to convert characters somehow?Why this results putting numbers ~25000 to the buffer, and thus ?-marks intead of "test"?char text[] = "test"; //allocate global variable ... Unicode::snprintf(textAreaItemBuffer, TEXTAREAITEM_SIZE, "%s", text);However, this works fineUnicode::snprintf(textAreaItemBuffer, TEXTAREAITEM_SIZE, "%s", touchgfx::TypedText(T_TEST).getText());And printing numbers using %d also works. What is wrong with snprinting char array with "%s"?Thanks!
Hi!I want to ask a question about designing a chess game such as Gomoku using TouchGFX. As far as I know, I need to put two chesses in every single spot and set them as invisible. When user clicks, then set them to visible. However, this is a very tedious implmentation when board size is really large.I am wondering if there's another way to directly draw a new circle in the ClickHandler callback function? Thanks so much for your support!
HiI am new in the touchGFX, so I think/hope that I did a silly error.By the simulation i could simply change the a float value shown in a TextArea using a bar progress or buttons.From the simulation all works properly, but when I flash the software in the STM32750Disckovery kit, I can see "-in" instead of the value.Attached the flles of the screen.Thanks
HiI am working on creating some graphic base applications using touchgfx. I plan to create UI as possible as modular and responsive. After basic configuration of all possible events coming from UI(LCD) I want to create such design where later on there is possibility to change UI by using only touchgfx designer tool. To move ahead I have few quires if anyone can help me out here, 1. Is there any way I can compile the UI related changes from touchgfx designer tool for stm32 based custom board.2. If yes then, Is there any way to separate out two different binaries: one for UI (generated form touchgfx designer) and second for peripheral configurations, and event handlers for controlling UI inputs.
Imagine that two .ioc files exist for the same device, with identical peripherals defined but different settings/pin assignments.If the user code written for device is not affected by the settings change (for example, the pin assignemnt is different for an SPI interface), is it somehow possible to indicate which codebase is to be used when building the application? For example, a CMake option for pointing to the generated code base on a setting, or something similar?I am looking into maintaining a codebase across different generation of hardware so using such an option would be extremely useful.
Hi all I am coding based on STM32H735GDK. after I added a new font and debug on Touchgfx, It showed wrong message : `FontFlashSection' will not fit in region `FLASH' I uncommont the "FontFlashSection" in STM32H735IGKX_FLASH.ld to deploy the FontFlashSection on the OSPI and debug on CubeIDE, it works very well. But the touchGFX still gives the same wrong message and cannot debug It seems the touchGFX didn't use the STM32H735IGKX_FLASH.ld and still deploy FontFlashSection on the internal flash How can I solve the problem, many thanks!
Hey, my question is how to add additional c source files to TouchGFX project so I can build project in TouchGFX Designer?I know I have to edit Makefile . I already tried it but with no success. Here is the code of my makefile:# Helper macros to convert spaces into question marks and back again e := sp := $(e) $(e) qs = $(subst ?,$(sp),$1) sq = $(subst $(sp),?,$1) # Get name of this Makefile (avoid getting word 0 and a starting space) makefile_name := $(wordlist 1,1000,$(MAKEFILE_LIST)) # Get path of this Makefile makefile_path := $(call qs,$(dir $(call sq,$(abspath $(call sq,$(makefile_name)))))) # Get path where the Application is application_path := $(call qs,$(abspath $(call sq,$(makefile_path)../..))) .PHONY: clean assets all ifneq ($(words $(makefile_path))$(words $(MAKEFILE_LIST)),11) all clean assets: $(error Spaces not allowed in path) else project_path := $(call qs,$(abspath $(call sq,$(makefile_path)../../..))) core_path := $(project
I probably found a design issue by the code generated by the STM32CubeMX for TouchGFX project.When using project generated by STM32CubeMX, the main.c initialization looks like this:int main(void) { // Generated initialisation code ... MX_TouchGFX_Init(); /* Call PreOsInit function */ MX_TouchGFX_PreOSInit(); /* USER CODE BEGIN 2 */ /* USER CODE END 2 */ /* Init scheduler */ osKernelInitialize(); /* Call init function for freertos objects (in freertos.c) */ MX_FREERTOS_Init(); /* Start scheduler */ osKernelStart(); /* We should never get here as control is now taken by the scheduler */ /* Infinite loop */ /* USER CODE BEGIN WHILE */ while (1) { /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ } /* USER CODE END 3 */ }Here you see the MX_TouchGFX_Init() function called to initialize the TouchGFX library. Underlaying it calls the name_init() which is part of the static linked library. During the nema initialization the static linked code somewhere calls the FreeRT
Hello,I am experimenting on a STM32H7S78-DK board with a custom UI.Sometimes the board looks like frozen and inspecting with the debugger I always find that the core is running, but GUITask is waiting for nema semaphore.The call originates from nema_wait_irq_cl() with cl_id = last_cl_id + 1. A reset may or may not solve the problem: sometimes the board works good, others it hangs up at the first few frames or after some interactions.Removing all widgets and adding them one by one leads to incoherent results. It looks like working and then it hangs again or it may work without any change. Which steps should I take to investigate the issue? Best regards,Alessandro
I need to read data from SD card and then send them via uart in STM32f7 discovery kit. so I did the initial setting such as open the text file using fatfs and then inside a while loop I read the data. but I need to execute that when I press fetch button in my UI, but suddenly all fall apart, I don't know exact reason is it because of interrupt of the SDMMC or is there a way to do it safely.
I am trying to use Touch GFX on a Mac. I have a Windows 11 Virtual PC running in Parallels and cant Get CubeIDE, Cube Programmer and Touch GFX all working. I can build and simulate in Touch GFX which is great but I cant get the ST LINK interface to my discovery board to work. Whilst I can pass the USB / ST LINK through from MacOS to Parallels the Windows instance will not install the drivers in order for it to work. In device manager I can see ST-Link Debug with the Warning exclamation - but even a manual attempt to install the driver fails. HAs anyone been able to make this work?
Hello everyone.I have my custom board.STM32F750Z8 CPU with MT25QL128ABA External Flash.I don't have external RAM. My application code runs at External Flash. It is a simple code. I create just one screen at the TouchGFX and add two buttons. No other screens, no interactions... It's very light code.I try to communicate 4.3(480x272) TFT-LCD. But it doesn't show full screen. Bottom of the screen is missing. (Image attached).I tried different "buffer addresses" like 0x20000000(DTCM) and 0x20010000(SRAM1). SRAM1 address is more reliable. I tried to change "Signal Polarity" but it didn't affect.Thanks for helping.CubeIDE version 1.6.1TouchGFX version 4.16.0Windows 7
Hi!I am having an issue with getting my TouchGFX project up and running on my new system. I have a custom board using an STM32H7 MCU on which I am currently running my application. Now I am trying to get my project to run on another custom board, using the same MCU, but on this one, textareas are glitching and not showing. The two boards have separate CubeMX files, so what I've done is that I've imported the GUI from the old board to the new one in TouchGFX Designer using Edit -> Import -> GUI, and it looks to have been successful. But when I run my application on my new board, text is not showing properly. Either they are gone/have disappeared or they are glitching and only showing parts of letters. What can be wrong here? Is it something with the textareas itself? Could I have done something wrong transferring the settings in CubeMX (they look correct)? I am using TouchGFX Designer 4.22. New system screen: Old working system with expected output:
Hello everybody.How can I change the behavior of the base class generator in touchgfx designer?I need to place part of the classes in an external memory chip. To do this, I modify the base class as follows:For example:Original generator code class Navigator : public NavigatorBase{public:Navigator();virtual ~Navigator() {}... I want to place this class in an external flash memory by adding the code: #ifndef SIMULATOR#define QUADSPI_EXT_FLASH_MEMORY __attribute__((section("ExtConstDataSection"))) __attribute__((aligned(1)))#else //SIMULATOR#define QUADSPI_EXT_FLASH_MEMORY#endif //SIMULATORclass Navigator : public NavigatorBase{public:QUADSPI_EXT_FLASH_MEMORYNavigator();virtual ~Navigator() {}...It works, but when generating the code in the Touchgfx designer, all my extra code is removed.How can I generate code in the Touchgfx designer and not clear my extra code?
Hi,I am trying to implement STemWin v5.22 for an F4 MCU. I made sure to provide a path to the static library and included all the other necessary files. However I still get this error:../Lib\lib_STemWin522_CM4_GCC.a(GUI_Core.o): In function `GUI__Config': GUI_Core.c:(.text.GUI__Config+0xc): undefined reference to `GUI_X_Config' collect2.exe: error: ld returned 1 exit statusGUI_X_Config is defined in GUI.h of the STemWin library, to which there is a path provided.I don't really understand why there is still an unresolved dependency. Are there other files necessary for this STemWin version? I only got the static library from some online repo, not the official ST website. I don't think this version of STemWin is available anymore
Hello, I am trying to understand how and in which order exactly events are dispatched to drawables in the draw tree. I was not able to find any information regarding this topic on the touchgfx documentation website. I have two use cases for which this would be relevant:1. I have a scroll list of custom containers which contain several clickable items. Drag events on the scroll list are intercepted by the touch areas of the clickable items. This makes the scroll list difficult to scroll as you have to hit the tiny spaces in between the clickables for the drag event to register.I saw two posts on this forum regarding a similar problem:Thread 1 Thread 2 The accepted answers in both of them did not fix my problem as my application does not allow me to override the touch handling on the view level. The answer given by @GMeur in thread 2 was closer to what i was looking for but only works for me when the scroll list template object itself is clickable. In my case only the chil
Dear All,I am developing an application on the STM32F746 that uses TouchGFX. I am able to load some images from my SD card to the primary cache and I am able to display the images individually on the screen. But when I try to display them together I am struggling. One of the images has unknown size at compile time, since it is loaded from the SD card.This is what does my screen look like in the TouchGFX designer:Both DynamicBackground and DynamicIcon_1 use the same configuration:At times, in my application I need to be able to show one of them or both of them. The location of the image is supposed to be passed by the application.What I am experiencing is that if I try to draw one image, while the other is already being drawn, I am getting a hardfault at this point:From what I have seen so far, if I set the alpha of each image less than 255, then I am not experiencing this issue.But I am trying to understand why does this happen and if there is a fix that does not require to change the
Hi gm, I am creating a project in STM32CubeIDE with touchGFX, right now the project builds, but when i pass it to the board the screen shows white, and when debugging I noticed that when it gets to the line tick() in HAL.hpp->backPorchExited which is called from TouchGFXHAL.cpp the code stops, And I really don't understand this, the function itself is empty in HAL.hpp and it's called from inside the HAL class so i don't get how is this making my code stop. I don't really know what kind of screenshots I can provide here, let me know if you want me to pass the project files or something.
Hello,I'm working on a UI with touchGFX, and I was wondering which is the better practice in order to maximize performances and memory managment: is it better to create a new screen for each page of the UI, or to keep screens at minimum and to play with invisible/visible widgets?I'm creating a menu to setup a weekly schedule. I use a single screen for the entire setup flow, and for each step of the setup I turn visible only the widgets I need. When the user completes that step and pass to the next one, all those widgets become invisible and new ones become visible.I'm proceeding like this because the choices made in the previous steps influence the aspect of the following steps, and being in the same screen its easier to access those info. But since the widget counter is going through the roof, I'm wondering is this approach will give me performance issue in the future!Do you have any advice/consideration?
Good morning everyone, I created a project for a client and it is now in an advanced state.All the time the project was developed with a horizontal display (we are talking about two years of work), at a certain point a larger display was used, original 800x480, new 1024x600.The use was in portrait mode.I started to have content flickering.I worked hard for days, thinking I might have a problem with buffer declarations, memory management, or other things related to hardware or settings. Today I made the macabre discovery.I positioned the landscape position of only the display on the touchgfx gui and everything magically works perfectly, naturally you can only see half of the objects as many of them are defined out of field, but no flickering of text or images.The flickering occurs between one writing and another to change the data. For a moment, new fonts appear dotted with errors or buttons or whatever redraws between one buffer and another, and all of this depends only on the orientat
I have a STM32F7508-DK board and I'm using the last version of the STM32CubeIDE and TouchGFX.I create a project in TouchGFX (or open one of the examples that are there) -> generate code -> open project in STM32CubeIDE -> compile -> run -> works fine.Now in STM32CubeIDE I want to generate separate c and h files for each of the periphery. I open Device Configuration Tool -> Project Manager tab -> Code Generator -> and select Generate peripheral initialization as a pair of '.c /' h ' files per peripheral -> generate code again -> compile -> run -> doesn't work, black screen on the board. I don't change anything in the code, I only select the option to generate separate files.Could someone please help me where can be problem?
I am using the STM32H745XIH6 board and I have setup SPI using CubeMX in CubeIDE and for some reason, the HAL_SPI_Transmit_DMA never calls the HAL_SPI_TxCpltCallback unless I put a HAL_Delay after the function. /* Includes ------------------------------------------------------------------*/ #include "main.h" #include "app_touchgfx.h" /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "main_user.h" #include <string.h> /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ /* USER CODE BEGIN PTD */ /* USER CODE END PTD */ /* Private define ------------------------------------------------------------*/ /* USER CODE BEGIN PD */ #ifndef HSEM_ID_0 #define HSEM_ID_0 (0U) /* HW semaphore 0*/ #endif /* USER CODE END PD */ /* Private macro -------------------------------------------------------------*/ /* USER CODE BEGIN PM */ /* USER CODE
I can build using C:\ST\STM32CubeIDE_1.11.2\STM32CubeIDE\headless-build.bat -import ./.. -cleanBuild PROJECTNAME/Debug or C:\ST\STM32CubeIDE_1.11.2\STM32CubeIDE\headless-build.bat -import ./.. -build PROJECTNAME/Debug In PowerShell or older command prompt running from the Source/TouchGFX folder in my project.However if I copy the exact line into "Compile Target Command" in TouchGFX Designer I get the following error: URI: file:/C:/source/CUSTOMER_NAME/PROJECTNAME/Source is not valid in the workspace! I tried the following:putting it in a batch file Build.cmdRunning it with cmd.exe /c "MY COMMAND"running the batchfile with cmd.exe /c "Build.cmd"Using the full path of the project instead of "./..".Batch file: OFF echo incrementally building... SET var=%cd% ECHO %var% C:\ST\STM32CubeIDE_1.11.2\STM32CubeIDE\headless-build.bat -import ./.. -build PROJECTNAME/Debug It does run the batch file and I had it print the current directory, which was t
HiI'm trying to use handleTickEvent() in order to execute 2 functions in every tick, but it does nothing, I have declared virtual void handleTickEvent(); in the hpp file of my screen and then called it like this:But this only calls those functions the first time i click on my scrollable container, and I'm not understanding what's happening, I mean I can get that I'm doing something wrong, but why does it get there only the first time I click on the scrollable container that the function updateList() updates?
ST Community highlights – April to June 2026
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.