cancel
Showing results for 
Search instead for 
Did you mean: 

Help for first graphic project with STM32H743VIT6.

MPast.1
Senior II

Hi all,

I'm new on ST word, but I want to learn how realize graphic interface with gfxstudio.

I bought a board with STM32H743VIT6 (some more infos here: https://github.com/WeActTC/MiniSTM32H7xx)

I installed GFXstudio (v4.16 - v4.15 and v4.13) on STM32CubeIDE 1.5.1.

I create a new project (C++), I choose the right uC and I configured all peripherals to

manage an external TFT 480x272 display (via LTDC)

I designed a simple Screen with a picture and 2 buttons, then I generate the code from GFXstudio 4.16 and it works without problems.

When I try to compile the project on Stm32CubeIDE I see a lots of missing files and patch witch block the compiling process.

Every time I insert a new patch, i receve a new error cause a new file is missing.

I would like to know some simple things to start my first project:

1) Why I must insert all the patch to locate the files needed by project? is it possibile do it automatically?

(some of missing files:

   touchgfx/hal/OSWrappers.hpp: No such file or directory

   touchgfx/widgets/graph/AbstractDataGraph.hpp: No such file or directory   

   touchgfx/widgets/graph/GraphElements.hpp: No such file or directory)

2) I change the setting from gfxStudio to load assets (image and text) from internal FLASH. How I can access to the external resources?

  in other words, I configured also QUADSPI(2) but "external Data Reader" is always not settable.

3) How can I connect Touch Screen press/release action to the graphic stack?

Can someone help me for my first project? Can someone check my project and adjust the wrong settings? Or does someone has some ready project fro this uC family?

For the moment I would like only to see my design appear on the TFT display.

In the 2nd step I would like to load data from external SPI and interract with touch screen

PS: I tried to load some ready project/template from GFXstudio, but everyone generate errors while compiling (on STM32CubeIDE)

In the attachment, my simple project.

Thanks a lot in advance

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @MPast.1​ ,

When I said you would have a working project with the H743, I didn't that you could just use the project and change the MCU. I meant that you use this as a reference. Sorry for the misunderstanding.

In other words, you create your project from scratch selecting the right MCU you're using (I recommend using CubeMX for MCU settings and only switch to CubeIDE for compilation and debug purposes because as the name states it is first and foremost an IDE) and then you copy and adapt all the settings from the working project on H743-EVAL along with most of the code. The Application Templates acts as REFERENCE when making a project on custom hardware.

From the look of your project AlgoTouchTest, you didn't refer correctly to the Application template. In your main.c, MX_TouchGFX_Process() or TouchGFX_Task() are nowhere to be seen.

I will repeat myself, but it's essential if you want to achieve something with TouchGFX or ST in general but : refer to example codes. For TouchGFX, these example codes are the Application Templates. By looking at them and the the similarities you should be able to pinpoint what's the problem.

Right now, TouchGFX does not seem to start at all. Either you rename your task from StartDefaultTask  to TouchGFX_Task and set it to weak or you call MX_TouchGFX_Process in your StartDefaultTask before the for loop.

From what you said, it seems you've done that part. After you referred closely to the examples and your code is still hanging somewhere, here is what you need to do : Attach the call stack and any information that could help us understand the issue.

But before that a clean project that looks like one of the Application Template will help you and us a lot to make your project work.

/Alexandre

View solution in original post

10 REPLIES 10
MPast.1
Senior II

Hi: I have an update.

The problem is only on gfxStudio 4.16 plugin installed on STM32CubeIDE 1.5.1.

Convert the project to gfxStudio 4.15 plugin, all work fine without any compiling errors.

On gfxStudio 4.16 there are some files "corrupted" : the compiler doesn't find "LCD2getPixel" and "LCD2setPixel" because they moved respect the previous gfxStudio 4.15 and instead of "getGraphAreaPaddingRight" the original file contains "getGraphAeraPaddingRight".

In 2 hours I will build the prototype to check the right display and board management: stay tuned!!

ChahinezC
Lead

Dear @MPast.1​ , thank you for your relevant question.

In fact, it is recommended to first create your GUI on the TouchGFX tool and then migrate to the STM32CubeIDE by clicking on "Generate Code". We are not sure whether you did the same way mentioned or reversed.

Regarding the version issue, one of our TouchGFX experts can help you better with it; @Martin KJELDSEN​  @Alexandre RENOUX​.

We hope that we have helped you figure out the answer to your question.

Alexandre RENOUX
Principal

Hello MPast.1,

As ChahinezC said, you should start with TouchGFX Designer first. Before creating a project from scratch you should acquire the necessary knowledge. For now I recommend two things :

  • Choose the H743-EVAL Application Template in TouchGFX Designer and generate code. Then you will have a working project running on H743. This should be helpful for you.
  • Read the documentation website. The team spent weeks to write this documentation and I believe it will answer most of your questions :)

I'm not sure from where you got the name gfxStudio but the ST C++ graphic library is called TouchGFX.

/Alexandre

MPast.1
Senior II

Hi,

thanks for your advices but I didn't make progress today.

(when yesterday I wrote about gfxStudio 4.16 I meant TouchGFX 4.16: i was too tired. It was a my mistake).

Today I tried to open TouchGFX 4.15, and load stm32H743 example than I generated successufully the code.

After I moved on STM32CubeIDE folder just created by generated process and load the ".procjet" file. IDE imported successfully the project and configuraton.

Now a small but really BIG problem compared: is not possible (from the CubeIDE) change the package of microcontroller and then the relative pinout.

(I can't use BGA package with its relative pinout).

Another problem is witch this code I can't (obviously) debug or load the firmware: So I merged all the projects files manually (compared with an stm32h743Vitx project) and I replaced all referements to STM32H743VIT6 microcontroller.

Nothing changes: my display is always black.

So I tried to do the simplest thing (more peoples on youtube use this procedure): I created a new project from the CubeIDE selecting and configuring all the peripherals that I need ( LTDC, GPIO, Clock sources...) and I enabled TouchGFX 4.15 tool plugin . From the CubeIDE a click on ".touchgfx.part" to create by TouchGFX 4.15 a simple screen with a picture.

After code generating on TouchGFX, and a compiling with zero warnings, nothing is change: always black screen.

(I'm sure that harware is OK because I test the display board with a microchip PIC32 and it works correctly: tomorrow I will check another time with oscilloscopes all the signals to be sure that stm32 generate all signal in right mode)

Now I have some question:

1) From debug I can see that code pass only one time on StartDefaultTask where I place MX_TouchGFX_Process(); . Is it right or it must by pass more times?

2) Can a wrong RTOS configuration block the graphic stack?

3) I'm in trouble with DE polarity because on IDE is present "Not Data Enable Polarity". I'm confusing with the right status: however i tried both of them , but nothing changed

4) Does exist some tricks to change MCU configuration easly when I use an ready TouchGFX board and template?

5) Can ST allow (in the next release of TouchGFX) to realize a custom template based on users microcontroller and display size? Now when you choose a board, display and all other informations are blocked (I don't understand the reason I can't change the size of screen).

I'm sorry for all those questions, but I'm in panic because I don't understand where is/are the problem on my FW/HW. I thought it was very easy realize a custom screen and instead I can't display a button...

PS = Does someone tried my project? Is there some error on my configuration?

thanks a lot in advance...

Marco P,

>>Does someone tried my project? Is there some error on my configuration?

Between the board, the screen and the toolset, there's probably very few people here you have any constituency with.

You've got two ST employees involved, but outside of ST boards/screens you're probably not going to get much support for random screens.

I don't recall seeing any reference to the make/model of screen, it's controller, or timing parameters. I'd probably focus on getting the screen working outside of all the TouchGFX stuff first.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Hi @MPast.1​ ,

When I said you would have a working project with the H743, I didn't that you could just use the project and change the MCU. I meant that you use this as a reference. Sorry for the misunderstanding.

In other words, you create your project from scratch selecting the right MCU you're using (I recommend using CubeMX for MCU settings and only switch to CubeIDE for compilation and debug purposes because as the name states it is first and foremost an IDE) and then you copy and adapt all the settings from the working project on H743-EVAL along with most of the code. The Application Templates acts as REFERENCE when making a project on custom hardware.

From the look of your project AlgoTouchTest, you didn't refer correctly to the Application template. In your main.c, MX_TouchGFX_Process() or TouchGFX_Task() are nowhere to be seen.

I will repeat myself, but it's essential if you want to achieve something with TouchGFX or ST in general but : refer to example codes. For TouchGFX, these example codes are the Application Templates. By looking at them and the the similarities you should be able to pinpoint what's the problem.

Right now, TouchGFX does not seem to start at all. Either you rename your task from StartDefaultTask  to TouchGFX_Task and set it to weak or you call MX_TouchGFX_Process in your StartDefaultTask before the for loop.

From what you said, it seems you've done that part. After you referred closely to the examples and your code is still hanging somewhere, here is what you need to do : Attach the call stack and any information that could help us understand the issue.

But before that a clean project that looks like one of the Application Template will help you and us a lot to make your project work.

/Alexandre

Hi all.

Finally my simple project works!!! thank very much at all !!!

I want to share with you which was the problems:

1) FREERTOS = I changed some "Config parameters" copying H743-EVAL settings

2) FREERTOS = i changed Heap size, I replaced the StartDefaultTask with TouchGFX_Task and increased stack size to 4096

3) I checked if TouchGFX_Task function wasn't present MX_TouchGFX_Process();

4) on SOFTWARE PACKs--> TOUCHGFX 4.16 = I changed Buffer Location setting to "By Allocation" instead of "By address = 0x24000000"

5) on LTDC --> Layer Settings = I changed Layer 0 - Color Frame Buffer Start Address from 0x24000000 to ZERO

After those editing, projects start without any problem. It is evident that I need more time to study this amazing device.

However thanks a lot to everybody for patience !

0693W000006HrDGQA0.jpg

PCabr.1
Associate II

Hello MPast.1

Could you share your example project with me? i'm having the same problem as you.

but i'm using the STM32H7A3VIT6 or STM32H7B3VIT6 LQFP100.

I tried many different things to make it happen.

MPast.1
Senior II

HI,

In attachment I inserted an Empty project configurated for STM32H743VIT6. This project has the minimal configuration to active LCD drivers and to show a simple graphic example.

I would like to hint to you to use STM32IDE and create a new "STM32 project"

 0693W000008yLJzQAM.jpgAnd choose your device . Into a second step, you can load the "device configuration tools" to enable and active all the peripherals you need.

0693W000008yLK4QAM.jpg 

When you enable Touch GFX, ide create an empty graphic project.

0693W000008yLJ6QAM.jpgThis is your start point.

All It's very simple. You don't need to do anything else.