2024-12-28 09:07 AM
I am confused where my source file should be stored. It seems that I have duplicate files stored in multiple locations. Some seem to get updated together and some don't!
For instance I have a main.h file stored here-> FJB_KEYPAD_R5\STM32CubeIDE\Application\User\Core\Inc and another main.h stored here-> X:\STM32_development\FJB_KEYPAD_R5\Core\Inc
They are not the same and get referenced differently depending on which file I am using.
I only want one main.h!
What is the correct way to store my source and include files?
2024-12-28 01:13 PM
Close Eclipse (CubeIDE) and check at the file system level if those are real files or just Eclipse artefacts.
As long as you don't get compiler errors, ignore it.
Was the projecte generated / copied / cloned from somewhere?
hth
KnarfB
2024-12-28 03:05 PM
Yes, I made a couple backups of the project (files) and reloaded it. Plus I probably grabbed some of it from another project. I am trying to learn TouchGFX plus this IDE!
If I go back into mxcube and change anything, then go back into the ide and build I will get several of the duplicate files loaded as shown above. I can just delete them and build again with no errors, but because it creates a new copy of main.c that has any changes I have made, I now need to open the main.c in my APPLICATION/USER/CORE/SRC (stm32ide folder) and copy the changes. I also have an issue with main.h in that I need two copies to build without errors. One in my APPLICATION/USER/CORE/SRC (stm32ide folder) and one in CORE/SRC.
I hope you understand what is going on, because I do not! This IDE is a pain, I spend more time trying to get IDE to work then I do coding. I have used IAR for many years without these issues....I may need to upgrade my ARM IAR for ST soon if this keeps up.
Anyway, I need to correct this as it is a PITA! but not sure how? I hope you can help.
2024-12-30 06:38 PM
Not sure this is an IDE issue. It seems like more of a project generation issue.
Here is the documentation for generating code using TouchGFX as well as its folder structure. I'd recommend starting with a clean project, or with an existing example.
Generating Code | TouchGFX Documentation
2024-12-31 06:39 AM
I figured out a way to organize the project.
Right click on the folder you want your files to appear (Typically your Src and Inc folders). Select import. Choose File System. Then use explorer to browse to the folder and select files you want. Next click Advanced-> and check Create Links in Workspace and also check Create link location relative to: PROJECT_LOC.
Now the files will be show in the selected folder in your project. I was able to clean up my project and show my Include *.h files in my Inc folder that for some reason the IDE chooses to sometimes show them and sometimes not!
I personally like to be able to see all my Inc files and not have to open them by clicking on their reference in my c files.