Skip to main content
ilyus
Senior II
November 24, 2021
Solved

Integration TouchGFX Generator and STM32CubeIDE STM32F469-DISC

  • November 24, 2021
  • 4 replies
  • 3989 views

Windows 10, TouchGFX Designer 4.18, STM32CubeIDE 1.7.0

STM32F469-DISCO board with 800x480 DSI display.

I'm trying to create a TouchGFX project, for which I can edit the visual part in TouchGFX Designer and the rest in STM32CubeIDE, so that I can edit stuff in the designer, save it and then go to STM32CubeIDE, compile it there and upload to the board. So far without success. I've been occasionally trying to do this for a few months. I try for a few days (heavy brainstorming), doesn't work, I give up (due to feeling helpless and demotivated and due to lack of possible solutions). Tried with designer 4.16 and cube 1.6.0 initially.

Now, I haven't found a single valid google result on how to do it and only a pair of vids on YouTube (by EE Karl). There is pretty much no other information on the topic in the google, I googled my fingers to blood.

-----------------------------------------------------------------------

A little premise about how I got into this situation:

I would want to go the other way around (create STM32CubeIDE project, setup peripherals, add TouchGFX component), but about half a year ago I spent 3-4 months daily trying to setup hardware and all I got was slo-mo picture with diagonal screen tearing (1s animation took like 4 seconds), after which I had a burnout regarding STM32 which persits to this day. For the most part due to lack of information - there is no info anywhere on the internet about what kind of settings to use with the display. So I was pretty much brute forcing different settings and never got adequate performance. So I switched to setting up TouchGFX Designer project for 469 first and then working on it in STM32CubeIDE, since then setting up hardware is taken care of, including Ext. Flash and SDRAM and everything else that needs to be setup once and not touched anymore. A handy shortcut for me to skip to actually interesting parts.

End of premise

----------------------

Current problem:

there is no clear guide/instruction/manual/logical sequence about how to convert TouchGFX Designer project into something I can launch via STM32CubeIDE. So I'm trying to follow the few bits and pieces of information scattered on the internet and gently spruced my creative imagination.

I created a TouchGFX Designer project for my 469 disco board, clicked "generate code", opened STM32CubeIDE, File->Import->Existing Projects into Workspace, chose the folder my my TouchGFXDesigner App ("MyApplication" default TouchGFX Designer project name). In the checkboxes under "Options" in Import window only "search for nested projects" was ticked. Nothing else. (hasn't found any nested projects anyway). Imported it.

Now I have a project named "STM32F469I-EVAL" in STM32CubeIDE. Yes, EVAL. No idea why. I can't open IOC file, it says

Invalid State: Most probably trying to open 'STM32F469I-EVAL.ioc' file from an abnomal previous IDE session exit. Please close such editor and have a new try to recover properly.

I don't have any editors open and didn't have any. I never opened that IOC file with anything. Anyway, I restarted STM32CubeIDE multiple times. It stays.

Also, when I press "build" (the hammer icon), I I get all those smart lines about compiler doing it's compily things, until

make: *** No rule to make target 'C:/TouchGFXProjects/MyApplication/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.c', needed by 'Drivers/STM32F4xx_HAL_Driver/stm32f4xx_hal_uart.o'. Stop.

Specifically this file. The previous files with similar names like stm32f4xx_hal_tim compile OK and don't give any errors. IDE restart doesn't help it either.

I don't understand anything at all in compilers or linkers or whatever mysterious magic happens here. I just want to get the thing running and make it editable, I'm not experienced in STM32 (as you could have guessed). So if you want me to give you some info or you know what I should do/try, please explain it like for 50 IQ with every mouse click and every link to whatever helpful material you have in mind.

Basically, you can see I have all sorts of issues mentioned here and there, I would be glad if you could give me anything to improve my current situation of hopeless burnout with zero progress over several months of googling, videos, courses and practical trying. Thank you for your attention.

SOLUTION FOUND

After long chat discussion with MM..1 and TeamViewer session we came to conclusion that Touch Designer 469-Disco projects of version 3.0.5 ARE BUGGED, 3.0.4 works OK!

(thank you for your time and patience)

My STM32 adventures are back on track.

Thank you everyone who participated in discussion!

This topic has been closed for replies.
Best answer by MM..1

Your fail starts here : File->Import->Existing Projects into Workspace, chose the folder my my TouchGFXDesigner App ("MyApplication" default TouchGFX Designer project name). In the checkboxes under "Options" in Import window only "search for nested projects" was ticked. Nothing else. (hasn't found any nested projects anyway). Imported it.

Or firstly here : clicked "generate code", opened STM32CubeIDE

Normal guideless steps for use TouchGFX example projects is open TouchGFX and press Run on Target. After this read and understand code in any notepad.

On some not all this example exist folders with project files for KEIL , IAR or some IDEs, but this is designed to open not import. Then you can open and read or try build from prepared IDE. Open is double click on for example .project file placed in STMCubeIDE example subfolder.

And basically custom project need create from scratch , i preffer use STMCubeIDE and New project wizard.

4 replies

MM..1
MM..1Best answer
Chief III
November 24, 2021

Your fail starts here : File->Import->Existing Projects into Workspace, chose the folder my my TouchGFXDesigner App ("MyApplication" default TouchGFX Designer project name). In the checkboxes under "Options" in Import window only "search for nested projects" was ticked. Nothing else. (hasn't found any nested projects anyway). Imported it.

Or firstly here : clicked "generate code", opened STM32CubeIDE

Normal guideless steps for use TouchGFX example projects is open TouchGFX and press Run on Target. After this read and understand code in any notepad.

On some not all this example exist folders with project files for KEIL , IAR or some IDEs, but this is designed to open not import. Then you can open and read or try build from prepared IDE. Open is double click on for example .project file placed in STMCubeIDE example subfolder.

And basically custom project need create from scratch , i preffer use STMCubeIDE and New project wizard.

ilyus
ilyusAuthor
Senior II
November 25, 2021

I read the entire code over months, and I understood what it does for the most part. It didn't help much. When I tried to implement stuff, it didn't work. Besides, if I just open the thing in STM32CubeIDE, i can't compile. It just opens it like a folder, "build" and "run" buttons are greyed out. And I don't know anything about linkers or compilers to make it work.

Also, sometimes I barely understand what you're saying ("On some not all this example exist folders with project files for KEIL" - are you google translating from some other language? Because grammar is so broken I genuinely don't understand what you're trying to say, sorry)

I tried to create from STM32CubeIDE new project wizard first, as I already said in my post. After 3 or so months of trying to make it work (with slo-mo image with diagonal tearing line being my best result, but also normal picture with one horizontal line jitter only if there is animation on screen and other kinds of problems) I gave it up.

I appreciate your attention, but your reply is not very helpful. I'm sorry. Maybe I'm even less competent than you think of me.

Romain DIELEMAN
ST Employee
November 25, 2021

Hi,

First, unfortunately you are working with the STM32F469 Disco and there is a known issue at the moment with the TouchGFX Board Setup for the STM32F469 DISCO where it is renamed STM32F4669 EVAL in STM32CubeIDE. This will soon be fixed. Meanwhile you could use a previous version of the TBS by clicking on the version number of a TBS when creating a new project in TouchGFX Designer.

When you start a project from TouchGFX Designer with a TouchGFX Board Setup for one of ST development kit you will have a fully configured STM32CubeMX project along with projects for the toolchains STM32CubeIDE, Keil and EWARM. You just have to double click on .cproject or .project in the /STM32CubeIDE folder in your project folder to open the project in STM32CubeIDE.

When you want to create a project from scratch it is recommended to start a project from STM32CubeMX (for better folder structure). Before generating code make sure you have selected the right toolchain, STM32CubeIDE in your case, and set the TouchGHFX Generator. Then you will have a generated TouchGFX project and a generated STM32CubeIDE project that work together. You can just copy paste the configuration we have set in our TBS (in STM32CubeMX but also in code in the main.c and in the files under the TouchGFX/target folder) until it gets fixed.

I strongly recommend to have a look at our documentation and ST videos on youtube.

/Romain

ilyus
ilyusAuthor
Senior II
November 25, 2021

Thank you!! I will check the resources provided (although ST youtube videos are in my opinion VERY weak tutorials, because they're just holding your hand without explaining much/enough, they have a huge "knowledgeable person" bias in them - they would be clear to the person who already knows stuff but forgot specifics, not newcomers; I usually resort to some 3rd party explanations, including paid courses if I have to; yet I've been subbed to ST youtube for a while and watched a number of vids - and made my opinion about those vids as stated above).

Just to humiliate myself even further: "Before generating code make sure you have selected the right toolchain". I have no idea what exactly toolchain is (smth with compilers? Programs that convert C/C++ into assembly all the way into binary?), and I have even less clue about how to select/tweak it. It's not a commonly available info I came across.

Also, I have no idea what TBS is.

I created a new project in TouchGFX Designer, "run target" (it's running on MCU now), then I opened .cproject. STM32CubeIDE proudly said "imported in workspace successfully" (or the verb wasn't "imported", I closed the window without remembering the exact work). I clicked "build" and got the same as before:

arm-none-eabi-gcc "C:/TouchGFXProjects/TestApp4/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.c" -mcpu=cortex-m4 -std=gnu11 -g3 -DUSE_HAL_DRIVER -DSTM32F469xx -DDEBUG -c -I../../Core/Inc -I../../Drivers/CMSIS/Include -I../../TouchGFX/target -I../../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../../TouchGFX/App -I../../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I../../TouchGFX/target/generated -I../../Drivers/BSP/Components/Common -I../../Middlewares/Third_Party/FreeRTOS/Source/include -I../../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -I../../Drivers/BSP/STM32469I-Discovery -I../../Drivers/STM32F4xx_HAL_Driver/Inc -I../../Middlewares/ST/touchgfx/framework/include -I../../TouchGFX/generated/fonts/include -I../../TouchGFX/generated/gui_generated/include -I../../TouchGFX/generated/images/include -I../../TouchGFX/generated/texts/include -I../../TouchGFX/gui/include -I../../TouchGFX/generated/videos/include -Os -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Drivers/STM32F4xx_HAL_Driver/stm32f4xx_hal_tim_ex.d" -MT"Drivers/STM32F4xx_HAL_Driver/stm32f4xx_hal_tim_ex.o" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "Drivers/STM32F4xx_HAL_Driver/stm32f4xx_hal_tim_ex.o"
make: *** No rule to make target 'C:/TouchGFXProjects/TestApp4/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.c', needed by 'Drivers/STM32F4xx_HAL_Driver/stm32f4xx_hal_uart.o'. Stop.
make: *** Waiting for unfinished jobs....
"make -j4 all" terminated with exit code 2. Build might be incomplete.

While previous files above compiled ok (I wanted to paste more of an output here, but it's VERY long, even if I copy just 2 more lines from the CDT Build Console).

I know too little about toolchain stuff to be able to fix it on my own. Only the thought that everyone who knows it went through learning this comforts me haha.

Anyway, I'm kinda stuck exactly as before.

Anyway, thank you for your reply, I'll go reading documentation now, maybe will find some other source of info too, can't have too many.

MM..1
Chief III
November 25, 2021

I try replicate your setup , how version you choice to use?

0693W00000GYtOjQAL.png 

mandrake
Associate III
November 29, 2021

Holy mackerel! Thanks for this thread. I've lost weeks struggling with this issue.

Why doesn't ST inform uses about this problem and the simple fix.

SOLUTION:

When you select the STM32F469I-DISCO board in TouchGFX, before clicking on create, select Version 3.0.4.

wired
Senior II
March 31, 2022

ST Support - Before I spend any time updating to Designer v4.19, Is this version 3.0.4 thing fixed? Do STM32F469i-DISCO setups work properly now with the latest version of all software?