cancel
Showing results for 
Search instead for 
Did you mean: 

STM32Cube project, how does a file (source or header) containing only a path work?

obj87
Associate

For example there would be a file called "common.h" containing a single line no #include or anything:

../../../Common/Inc/common.h
And in that path there is also a common.h containing the actual C code.
 
The STM32Cube project structure is something like this with App1 and App2 being project folders so it is being used to link to common files.
- Common/
---- Inc
-------- common.h
- App1/
---- Core
-------- Inc
------------ common.h
- App2/
---- Core
-------- Inc
------------ common.h
 
It works so what I would love to know is how it works and what makes it work especially? Is it cube? If so, what in cube is it? How can I reproduce it?

Grateful for any insight!
Oscar
1 ACCEPTED SOLUTION

Accepted Solutions
Pavel A.
Evangelist III

> file called "common.h" containing a single line no #include or anything:

../../../Common/Inc/common.h
 
This maybe is a broken Linux symlink, copied to Windows as a normal file. Create a Windows symlink or Eclipse linked file.

View solution in original post

2 REPLIES 2
Pavel A.
Evangelist III

> file called "common.h" containing a single line no #include or anything:

../../../Common/Inc/common.h
 
This maybe is a broken Linux symlink, copied to Windows as a normal file. Create a Windows symlink or Eclipse linked file.

Thank you so much!

This was really bothering me that I couldn't figure out what it was. It does indeed seem to be symlinks because I cloned the repository into windows as is and it runs just fine if I do it in WSL instead.