cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE: Different File Structure

KMew
Senior III

I am using the STM32H7B3I-EVAL, which includes a touch screen that uses the TouchGFX application. I am trying to do its tutorials, which includes modifying the code in the STM32CubeIDE. However, when I do, the file structure is different in my computer's file explorer compared to what is shown in the STM32CubeIDE project explorer.

For example, the TouchGFX folder in my File Explorer is not present in the IDE project explorer.

What causes this and what can be done to fix it?

0693W00000UnLQNQA3.png 

0693W00000UnLQhQAN.png

1 ACCEPTED SOLUTION

Accepted Solutions
RomainR.
ST Employee

Hello @KMew (Community Member)

Here below my answer to your previous questions:

"The level I'm looking at (ADC_Display) does not match what's in the project explorer. "

Again, that's is normal because STM32CubeIDE as a configuration view of it's root folder that is STM32CubeIDE\

"I went into one of the subfolders (ADC_Display/STM32CubeIDE) and I found a matching file directory!" 

Yes and that is what I already explain to you yesterday and just above.

"Now, it still poses an issue because this project folder is missing things like the header files and such. Does this information help at all? The .project and .cproject should be in the ADC_Display folder, not ADC_Display/STM32CubeIDE folder, correct?"

No your project generated has no issue. All sources and header file are located on folder above \STM32CubeIDE, like ..\Core or ..\TouchGFX.

Yes these informations are mandatory and STM32CubeIDE is able to found them because the path of the project are correctly configured (see following picture)

These folder path configuration are also into the .cproject file.

0693W00000UnZNwQAN.pngI confim again there is no issue in your generated project.

Best regards

Romain

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

21 REPLIES 21
RomainR.
ST Employee

Hello @KMueh.1 (Community Member)

The representation of directories in STM32CubeIDE is specific to the way the project was created. This view of your project structure is totally dependent on the Eclipse project in a specific workspace.

You should note that the files in an eclipse project can be physically local to the project, but also linked (belonging to another path) 

Maybe this resource could be useful for you:

https://www.eclipse.org/escet/use/projects.html

Also the project you are working on is standard to the STM32CubeMX structure when generating a project.

Best regards,

Romain

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hello Romain,

Thank you for your reply.

I find this strange, as I was previously working with this project and the files/folders were visible in the project explorer. I only came back to it recently to try and modify it with my own code. The only thing I changed is that I took it off a company Dropbox and put it in my local folders. Would that change how the project explorer displays the folders at all?

I'm asking because this project was created by the TouchGFX compiler. I tested it with another test project, compiling it the same way in TouchGFX and I can see the file structure there.

RomainR.
ST Employee

Were you able to exclude your Drivers directory ?

Thank you to mark my post as answered.

Best regards,

Romain,

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hello Romain,

Thank you for the reply, but I can't mark it as answered as my problem is still not resolved.

There's something I clearly don't understand about how these projects define the files for the workspace. I had a previously working project folder. I imported it to another folder (because I wanted to organize my work), and now the previous project folder does not work at all.

I need a solution that I can understand as to why the project explorer is so incomplete and why it's now causing my projects to not build.

RomainR.
ST Employee

Hello @KMueh.1 (Community Member)

I'm sorry, do not take into account my previous post I got the wrong subject.

For your problem it is clear that when you imported your original project into a new location you probably broke the project links. How did you do this import, manually ?

Can you check in the STM32CubeIDE folder (from your file explorer) that it contains the files:

.cproject and .project? 

It is also strange that all your directories are in the same directory as the .metadata which is used for the configuration of the Eclipse workspace?

You indicate that the project was created with TouchGFX. Here is what I would do in your place:

- I create and generate a new TouchGFX project with the same name as your initial project (same board). 

- Before opening it with STM32CubeIDE, you manually copy all the directories and source files from your initial project (except Debug) and you must keep the same folder organization.

You should then obtain the same structure of your project.

Best regards,

Romain

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hello Romain,

To answer your questions:

  1. I did import it manually. I copy and pasted the entire folder (including the .metadata) into a new folder.
  2. I looked in the folders and I only see .project. I do not see .cproject anywhere.

Also, I tried creating a new TouchGFX project and I'm running into a similar problem as before. The project explorer files are incomplete. It is only showing the files in the .ioc executable. Why can I not see Core, Drivers, EWARM, gcc, MDK-ARM, Middlewares, STM32CubeIDE, TouchGFX?

My folder directories are shown in the picture and my workspace is set to Master_Control/Software/Display.

0693W00000UnVvfQAF.png0693W00000UnVvkQAF.png

RomainR.
ST Employee

If .cproject is missing, indeed it can't work well.

STM32CubeIDE needs both .project and .cproject.

In your question:

"Also, I tried creating a new TouchGFX project and I'm running into a similar problem as before. The project explorer files are incomplete. It is only showing the files in the .ioc executable. Why can I not see Core, Drivers, EWARM, gcc, MDK-ARM, Middlewares, STM32CubeIDE, TouchGFX?"

In your new TouchGFX screen capture, the project is not incomplete, it is just folding.

In STM32CudeIDE project explorer window, you have to unfold the project to see all the files (the arrow on the left of the project name) Core, Drivers, TouchGFX and friend.....

Best regards

Romain

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hello,

What is the purpose of .cproject? When and how is it generated?

Also, sorry, I did have it folded, but I did mean that the folder structure is still not correct in there. It does not align with the folder structure in my file explorer.

0693W00000UnW2CQAV.png

RomainR.
ST Employee

.project and .cproject are generated by CubeMX or TouchGFX and they are part of the configuration files of the Eclipse project. their format is xml file.

You can open it with a modern text editor and see how they are structured and what information they provide.

This is your new TouchGFX project that you just created ?

Does it compile without errors ?

If yes, simply copy your user source codes from your original project. And you try to compile it.

Best regards,

romain

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.