Import Fully-Working TouchGFX Project into STM32CubeIDE. "Run as" grayed out. How to flash from STM32CubeIDE?
Situation: STM32F469 Discovery board with DSI 800x480 Screen, broken native BSP drivers (Display-related part of the driver). I tried to create a project in STM32CubeIDE, set all the settings, initialized as default for the discovery. Added BSP files. Doesn't work. Spent 2 months editing BSP drivers, but only got it to half-working state with 9000 glitches and wrong things happening.
Solution I found this morning: if I create the project FIRST in Touch GFX Designer, I can choose example program for my discovery board. Then I press "Run Target", and it uploads a whole working GUI program to the discovery board without me ever seeing a single line of code. It even generates all the main files, sets up FreeRTOS, generates CubeMX file with the CORRECT settings (which are different from default discovery board's settings if I make new STM32F469-disco project, no wonder it doesn't work). It generates MX automatic parts and fills in all "user customizable" sections of files too, makes all BSP calls, initializes DSI display, SDRAM, starts FreeRTOS task, everything.
So, I have full code of a working program with all necessary drivers/files/initializations included, fully self-contained, and it WORKS when uploaded via TouchGFX Designer. BUT!
I can't upload (flash) it in STM32CubeIDE! Only via TouchGFX Designer "Run Target". Where I can't edit code, obviously.
In STM32CubeIDE, I go to "File"->"Open Projects from File System", go to the project folder generated by TouchGFX Designer, it has all mains, all SDRAM setups and everything-everything, fully working thing, and the folder structure is just like any other natively created STM32CubeIDE project. Except that when I right click any file in this project (which btw has a symbol of folder for whatever reason), "Run As" is grayed out for no obvious reason, even though it has mx ioc file, main.c file, all libraries, drivers, linkers and stuff.
Question is: how can I force STM32CubeIDE to upload this imported project from STM32CubeIDE and not from TouchGFX Designer? (100% identical files, 0 changes, TouchGFX can compile and upload it, CubeIDE can't - grayed out)
I tried to google this question, but it's hard to word it right, and I couldn't find anything of value. Videos of embryonic.dk were extremely helpful in understanding what is what and why, among other things, but he creates STM32CubeIDE project first and then adds TouchGFX - it worked for me for STM32F746 board, but not with STM32F469, unfortunately, this procedure is out of the question for me on 469, because CubeIDE is broken for F469 (wrong default configs, nowhere to get all correct configs unless you already have them).
Alternative solution would be to "steal" configs and setup from that generated touchgfx fully working program and make new STM32CubeIDE Project from scratch with that info, it's a little more time consuming, but doable; but I have to be able to import it straight into CubeIDE, right?
