cancel
Showing results for 
Search instead for 
Did you mean: 

Flash custom target using TouchGFX Designer

PBU
Associate III

Hi,

I'm using STM32f779NI Eval board, but i have changed the display in board with 24Bit RGB parallel Interface. Is it possible to flash the target directly using TouchGFX Designer.

4 REPLIES 4
Martin KJELDSEN
Chief III

Hi @PBU​,

It's possible. Basically, the "Run target" button you see in your TouchGFX project in the designer is made possible by the commands defined in the .touchgfx file. e.g.

   "GenerateAssetsCommand": "make -f simulator/gcc/Makefile assets -j10",
 
   "PostGenerateCommand": "touchgfx update_project --project-file=..\\EWARM\\MyApplication3.ewp --gui-group-name=Application/User/TouchGFX/gui --generated-group-name=Application/User/TouchGFX/generated && touchgfx update_project --project-file=simulator/msvs/Application.vcxproj",
 
"CompileSimulatorCommand": "make -f simulator/gcc/Makefile -j10",
 
"RunSimulatorCommand": "build\\bin\\simulator.exe",
 
"CompileTargetCommand": "make -f ../gcc/Makefile -j8",
 
"FlashTargetCommand": "make -f ../gcc/Makefile -j8 flash"
 

So, you see there are two commands for compiling for target and programming target. In this case, the Makefile has a "flash" option that uses ST-Link (External flashloader .stldr configuration is also in there). You can put whatever you want for the .touchfx commands.

Do you have a Touchgfx project? You could save this non-standard project as a custom application template. What you do then is create a project based on an AT, make the changes you need to to:

  1. Finish your board bringup
  2. Make sure "Run simulator" and "Run target" work (edit .touchgfx file commands at the bottom of file to your liking or keep them as is - You must then modify the makefile to use the proper external flashloader. If using Atollic, etc, you must specify some way for touchgfx to update the projects in the postgenerate .touchgfx command)
  3. Have an empty gui in your project
  4. Create your custom application template you can use to create new applications from through the designer

https://touchgfx.zendesk.com/hc/en-us/articles/115002741432-Create-custom-Application-Template

Hope this helps a bit!

Best regards,

Martin

Hi Martin,

I have used the STM32F769 - Eval Board application template and modified resolution, & colour depth in MyApplication.touchgfx file, also made changes in stm32f769i_discovery_lcd.c & .h file since I'm using 24 Bit Parallel RGB .

i have verified the lcd driver file, it is working fine with atollic studio. My aim design and run target using the touchgfx designer .

The Application works fine while using basic widgets like text & box, and i'm getting the output in LCD. If i try to add any image or icons the LCD becomes blank.

I have verified the application.map file the images are mapped correctly, also i have also verified initialization of NOR Flash and SDRAM. Also changed the corresponding External Flash Loader in MakeFile.

While flashing the target.hex file using STM32 ST Link Utility the result is same (Blurred Image).

PBU
Associate III

Blurred Image

Does your TouchGFX Framebuffer settings match the display and image formats? There are three things that must match here.

  • LTDC configuration
  • TouchGFX Framebuffer depth (BoardConfiguration - touchgfx_generic_init() ) and type of LCD class, e.g. LCD16.cpp, LCD24.cpp. From your blurred image it tells me that the LTDC is trying to clock out pixels to the display from a framebuffer that does not match the LCD class being used. e.g. your framebuffer is 16bpp but you're using LCD16.cpp.
  • Format of images being generated - My guess is that your device is blank because touchgfx LCD class asserts that the image its trying to display is NOT equal to the LCD class being used, e.g. LCD24.cpp. You can inspect the generated image code files to check their current format - It says so in a comment in the beginning of the array.

Hope that helps!

Best regards,

Martin