2020-11-07 04:34 PM
Successfully converted an ST32F769 aws IOT example 1-4-1 from SW4STM32 to CubeIDE by using the CubeIDE tool "Import SW4STM32 or TrueStudio project"
Everything went fine and the example is working under CubeIde. So far so good.
Now I try to add some of my own code to the project and have difficulties to locate my code and include files:
The conversion created a labyrinth of folders hierarchy with repeating names like Middleware that can be found above the project root and deep inside the project root folder. The Middleware folder outside (above) the project root contains C files but Middleware (and its sub folders) inside the project root is completely empty from code
The Ide shows the Middleware full of code (probably the outer Middleware )
The Ide (Project Explorer)shows all user code inside a User folder, but on the file system this folder is empty. If I add my own file using the Ide, My file is shown both in the Ide User folder and in the (now not empty) User folder on the file system
In other words the CubeIde Project Explorer shows a folder Hierarchy different from the file system.
The compiler can find all the C files but I have difficulties specifying the path to my header files in the Ide. Selecting my header files folders in the Ide (Paths and Symbols)
generate a grayed out path.
(Attached a tree file of the file system)
What am I missing ?
2020-11-07 08:16 PM
> The Ide (Project Explorer)shows all user code inside a User folder, but on the file system this folder is empty.
The examples for SW4STM32 use the advanced Eclipse feature known as linked resources.
Unfortunately Eclipse is not an easy intuitive IDE for starters. Take your time, explore it.
-- pa
2020-11-08 09:35 AM
Thanks, I had no idea. Thought all project's resources MUST be under the project's root.
What will be the best practice to add (from another unrelated project) a ready made folder containing both C and header file to the Cloud project
Should I Create a new folder(not a Source Folder because it is under the main source folder) in the Project explorer and then copy the files from the original folder to this newly created folder ?
Since this folder contains also header files used by the C files, should I also add it to the Includes path list (Paths and Symbols) ?
2020-11-12 12:14 AM
Hello, I am new here.
Any progress?
2020-11-24 05:43 AM
"What am I missing ?" .... nothing unfortunately. Fact is STM32Cube examples structure is a bit complex dealing with packaging constraints (preventing source dupes from one example to another). Complexity is related to two factors:
1) First is example is multi IDEs compliant so some sources are out of IDE folder repository root and all such is mixing some EWARN, SW4STM32 & MDK material ...
2) Second some symbolic links are used looking fine if IDE view but not helping if file system view
As addon your IOT AWS example is super complex because relying on multi projects
Once understood all such is still hopefully pretty usable and I'n thinking one advice will help you: look only at your IDE view ... forget file system.
But you need to get too right material imported properly within your IDE. Discussing here about STM32CubeIDE let's:
1) Create a brand new workspace. Select a worspace folder with no relation to example you're importing. Let's define OUR working area somewhere (good practive is to avoid any blank or special characters within paths ...)
2) Import ONE by ONE relying on FIle > Open Project From File System all 'SW4STM32' folders which are part of your example (looking at your tree you have at least as example STM32769I_Discovery_2_Images_SBSFU/SW4STM32 and 2_Images_SECoreBin/SW4STM32 and ...)
2020-11-26 06:21 PM
> 2) Second some symbolic links are used looking fine if IDE view but not helping if file system view
There are no symbolic links in the examples. Symbolic links do not exist in Windows [before Win7, and even in Win10 are encumbered].
So, Eclipse invented their own portable replacement of symlinks called "linked resources".
-- pa
2020-11-26 11:15 PM
Exact symlinks like are Eclipse metadata part of .project file content.