Skip to main content
JHarding
Senior
January 21, 2020
Question

Runing TouchGFX based code from STM32CubeIDE

  • January 21, 2020
  • 35 replies
  • 9708 views

I cannot seem to get an Application Template to run from STM32CubeIDE.

Using the following versions of tools:

TouchGFX 4.13.0

STM32CubeIDE 1.2.0

Windows 10

Here are the steps that I follow:

From within TouchGFX:

1. File->New

2. Select Application Template STM32F746G Discovery Kit

3. Select UI Template -> Blank UI

4. Name the project STDemo and Click Create

5. Add a white box that fills the entire canvas.

6. Add a button that I can tap

7. Click Generate Code

8. Click Run Target

This does work, and I get the desired white box and single button that I can tap. Yay!

NOTE: To get TouchGFX designer to "Run Target" I did have to install STM32CubeProgrammer. I don't recall reading this anywhere in the guides that have been posted, but is made apparent by the error message that TouchGFX Designer throws when STM32CubeProgrammer is not installed.

Now I want to put this into STM32CubeIDE so I can link the button with some code. Here are the steps that I follow using the project that was created above:

1. Navigate to the "TouchGFXProjects" folder on my C: drive

2. Locate the STDemo project that I created above.

3. Locate the "STM32CubeIDE" folder that TouchGFX created.

4. Locate the .cproject file with in the "STM32CubeIDE" folder and open it using STM32CubeIDE.

5. The project is successfully imported.

6. Right click on the project name and select "Build"

7. I get this error:

make: *** No rule to make target 'C:/TouchGFXProjects/STDemo/TouchGFX/gui/src/logoargbbilinear127qspi_screen/LogoARGBBilinear127QSPIPresenter.cpp', needed by 'Application/User/gui/LogoARGBBilinear127QSPIPresenter.o'. Stop.
 
make: *** Waiting for unfinished jobs....

This is where I am stuck :(

The long term goal here is to get the new version of TouchGFX running on my custom hardware. I have the older version of TouchGFX from CubeMX 5.4 working on my custom board, but feel that it is "legacy" because of the new version of STM32CubeIDE and the X-Cube pack for TouchGFX. The best way to get this working is to start from a "known working setup", and this is by using the STM32F746G-Disco board. Once I can successfully get this board working from within the STM32CubeIDE I would like to get it working on my custom hardware.

This topic has been closed for replies.

35 replies

Martin KJELDSEN
Principal III
January 21, 2020

I'll get back to you in the morning if that's okay. Thanks, by the way, for a very detailed post =)

The thing is that the "post generate command" in the .touchgfx file is what will add screens and assets to your projects (like CubeIDE, EWARM, MDKARM projects) after pressing the "Generate Code" button in Touchgfx. Can you try generating code from designer? And does LogoARGBBilinear127QSPIPresenter.cpp exist in your CubeIDE project? Sometimes you need to refresh manually in CubeIDE to see the updated structure

Also. I will see about making a note about st-link / cube programmer - and if it's already there will make it more apparent that you need to install it - Maybe with links.

/Martin

JHarding
JHardingAuthor
Senior
January 21, 2020

I tried regenerating code from within TouchGFX Designer, same error. From within STM32CubeIDE I also tried right clicking on the project and clicking "refresh", that didn't help.

The file "LogoARGBBilenear127QSPIPresenter.cpp" does not exist in my project. I just let STM32CubeIDE import the project. I didn't do anything special after that such as import other files, I figured STM32CubeIDE would know which files to import. I have attached a screen shot of the structure of the freshly imported project. To me, it does seem incomplete.

EDIT: It looks like the files might want to be in the project, but they have this yellow exclamation mark next to them. Check the new screen shot0690X00000BwJ1wQAF.png

Martin KJELDSEN
Principal III
January 21, 2020

This looks really weird!

You have .o files listed, among other things. And no code files. Very strange. Send me the project.

Martin KJELDSEN
Principal III
January 21, 2020

I see you updated the post - Can you open those code files? Here's a CubeIDE project i just generated

0690X00000BwJ26QAF.png

JHarding
JHardingAuthor
Senior
January 21, 2020

I cannot open those files, screen shot attached...

JHarding
JHardingAuthor
Senior
January 21, 2020

I have attached the project file.

Martin KJELDSEN
Principal III
January 21, 2020

Okay, i'll check it out tomorrow - nearing midnight here.

Does that error make sense to you? Is the file not there on disk?

JHarding
JHardingAuthor
Senior
January 21, 2020

The file is not on disk. It makes sense that there is an error for a file that seems like it should be there, but isn't. That file is not mine so I don't know if it should be there or not. I hope that makes sense. Yes, please get some sleep :) I understand how it can be difficult working with people on the other side of the world.

Martin KJELDSEN
Principal III
January 21, 2020

Okay, i thought it was your file. Then that's really mysterious!

Stathis
Associate
January 22, 2020

Martin,

I have a similar problem as foll :

1.I start with TouchGFX Designer choose STM32f746G V3.0, "import" a gui (swipe container example) and "Generate Code". CubeMX file and Stm32CubeIDE project generated.

2. Connect the STM32F746G-Disco evaluation board and click "Run Target" everything was fine, the gui runs on the board.

3. Import the generated project in Stm32CubeIDE (1.2.0) or Stm32CubeIDE (1.1.0) and build, an error apears :

" make: *** No rule to make target C:/TouchGFXProjects/MyApplication_3/TouchGFX/gui/src/logoargbbilinear127qspi_screen

/LogoARGBBilinear127QSPIPresenter.cpp', needed by Application/User/gui/LogoARGBBilinear127QSPIPresenter.o'. Stop."

I exclude all these files that produce this error from build ( these where files of graphics that are not used in the selected gui) .

Build again and there are no more errors.

4. Trying to debug and get the following error : Break at address "0xf3af4804" with no debug information available, or outside of program code.

And on the console the following info :

Download verified successfully

(Read)Failed determine breakpoint type

Error! Failed to read target status

Debugger connection lost.

Shutting down...

It happens on both Stm32CubeIDE (1.2.0) and (1.1.0)

JHarding
JHardingAuthor
Senior
January 22, 2020

@Stathis​ This was my first thought to try this morning, you beat me to it!

I went to attempt something similar, but instead I just wanted to try and delete these files. When in STM32CubeIDE I tried to delete the files and the STM32CubeIDE presented this dialog:0690X00000BwLMrQAN.png

That got me thinking about linked resources in other projects I have worked on, so I went to view all of the linked resources in this project. Right click the project->Properties->Resource->Linked Resources-> then click the linked resources tab. I then see a list of all the linked resources:

0690X00000BwLNfQAN.png

I did not link these resources, TouchGFX must have created these links when generating the project.

Clearly there are "Invalid locations". So I browse to these locations on my disk, and yep, these files don't exist. There are similarly named files, but not the correct ones.

The Path Variable that is being used to generate the links for the resources is odd, and doesn't show in the Path Variables tab either:

0690X00000BwLOTQA3.png

JHarding
JHardingAuthor
Senior
January 22, 2020

Ok, I have a new approach that at least gets me a project that will fully compile. I can load this project on to my F746Disco, but I do hit a HardFault_Handler when the call to hal.taskEntry(); is executed...

This time I have created a video like another user did because it is just about as verbose as it gets, it is attached to this message, hopefully this helps.

scottSD
Senior III
January 23, 2020

@JHarding​ 

I appreciate the video.

Did the new Application Template @Martin KJELDSEN​  fix your Hard Fault issue?

Martin KJELDSEN
Principal III
January 24, 2020

The application template only fixed up compilation issues with CubeIDE projects (since the updater currently does not clean up unused files) - This means that if you delete a screen, you will have to delete it manually from the CubeIDE project. Adding new files works, but removing unused files doesn't.

/Martin