2023-01-12 05:19 AM
I have imported several example projects into CubeIDE which don't show the header files. The header files do actually exist in the windows file explorer, and the project does properly build and run. So why don't these show up on the CubeIDE (Eclipse) project view? Is there some Eclipse setting that I am missing?
Solved! Go to Solution.
2023-01-13 05:40 AM
You can relax again - this is in no way intended to prevent your access to the header files, but simply improves the overview.
If you open such a project and in it e.g. main.c, you will find a tab Outline on the GUI of STM32CubeIDE in a subwindow (usually on the top right). Alternatively you can open this window by Window > Show View > Outline
There you will find not only the variables, functions, etc., but also the header files used. Simply double-click the desired .h and you will get this .h file in the editor area.
Does it answer your question?
Regards
/Peter
2023-01-13 02:46 AM
Hello @Community member
Thank you for posting your issue !
Actually ,in the examples only c-files are shown in the IDE. h-files are not listed. They are only known to the toolchain as include paths. But not visible in the IDE.
This is a known limitations of the example projects.
Best regards,
Wijeden,
2023-01-13 05:22 AM
Really?? No offense, but this makes no sense to me since much of the documentation refers to the .h files for configuration and other information. The .h files are a very important part of understanding how the examples work (or don't work).
Was this intentional?
Is there a way to make the .h files visible?
2023-01-13 05:40 AM
You can relax again - this is in no way intended to prevent your access to the header files, but simply improves the overview.
If you open such a project and in it e.g. main.c, you will find a tab Outline on the GUI of STM32CubeIDE in a subwindow (usually on the top right). Alternatively you can open this window by Window > Show View > Outline
There you will find not only the variables, functions, etc., but also the header files used. Simply double-click the desired .h and you will get this .h file in the editor area.
Does it answer your question?
Regards
/Peter
2023-01-13 05:52 AM
Peter,
Thanks for pointing this out. But still, why do the examples follow this form when standard C programming does not. I'm not sure if you are trying to "simplify" the folder structure for beginners, or if there is some other reason. But to me, this is confusing and unnecessary, especially if we plan to use the example as our template for a final project. Just my 2 cents.
Thx,
MikeH
2023-01-14 06:40 PM
Move to some actually usable IDE instead of Eclipsoid... ;)
https://community.st.com/s/question/0D53W00000U7PcHSAV/keil-vs-stm-ide
2024-03-27 01:29 PM - edited 2024-04-12 05:57 AM
Hi @Peter BENSCH,
The "outline" content is also visible under the file it self in Project Explorer but when I double click or select "Open" from context menu it open tab with the c file not the include. That is confusing!
I agree that it can be opened from different "outline" view, but that is not intuitive at all and inconsistent for sure. In reality one have no idea what is included where so fishing for files like that is not practical.
I think this is the reason for Project explorer view to show relevant .h files. Instead it is detective work looking for them.
I actually prefer that the c and h are in same folder because from human point of view it is more natural even though old IT people would not like that :smiling_face_with_smiling_eyes:.
I really hate that the files are not part of the project and immediately visible in It is confusing and seriously inconvenient. As @MHoop.1 mentioned they are often referenced with folder name which leads to wtf :flushed_face: moment when opening the project.
When using code generator for G0 series it adds c and h files. That that enforces the expectation to see .h in this case as well.
In summary I believe it would be less confusing show .h files in corresponding location. I rest my case ;)
PS:
I just realized that search in files is broken too because of headers are not linked in project explorer. That is serious inconvenience as well for looking any #define or declaration. After a while of browsing the demo project I got frustrated and drag-drop all the .h files to project explorer as relative links. Than I could finally use the Cube as IDE.
The fact that folder structure in project explorer does not match the real folder structure only adds to the confusion.
Adding folders as native source code folders would be huge simplification and cause none of these problems.
2024-09-16 08:50 AM
@PR.10 wrote:Hi @Peter BENSCH,
The "outline" content is also visible under the file it self in Project Explorer but when I double click or select "Open" from context menu it open tab with the c file not the include. That is confusing!
I agree that it can be opened from different "outline" view, but that is not intuitive at all and inconsistent for sure. In reality one have no idea what is included where so fishing for files like that is not practical.
I think this is the reason for Project explorer view to show relevant .h files. Instead it is detective work looking for them.
I actually prefer that the c and h are in same folder because from human point of view it is more natural even though old IT people would not like that :smiling_face_with_smiling_eyes:.
I really hate that the files are not part of the project and immediately visible in It is confusing and seriously inconvenient. As @MHoop.1 mentioned they are often referenced with folder name which leads to wtf :flushed_face: moment when opening the project.
When using code generator for G0 series it adds c and h files. That that enforces the expectation to see .h in this case as well.
In summary I believe it would be less confusing show .h files in corresponding location. I rest my case ;)
PS:
I just realized that search in files is broken too because of headers are not linked in project explorer. That is serious inconvenience as well for looking any #define or declaration. After a while of browsing the demo project I got frustrated and drag-drop all the .h files to project explorer as relative links. Than I could finally use the Cube as IDE.
The fact that folder structure in project explorer does not match the real folder structure only adds to the confusion.
Adding folders as native source code folders would be huge simplification and cause none of these problems.
To add to the problem, when you have errors in .h files, search will not work and the error reported has no file information. The only option is to "guess" where the origin is and then search through all .h files to troubleshoot. Very frustrating.
2024-10-11 02:58 AM
+1 to what he said, it doesn't make sense and it's frustrating....
Also, "Window > Show View > Outline" doesn't display .h on my side...
useless/20
Seb