cancel
Showing results for 
Search instead for 
Did you mean: 

How can I add files to a STM32CubeIDE project as links?

phgphd
Associate II

If anyone is familiar with Code Composer IDE, CCS allows me to add files to a project as links. If this is not possible, perhaps you might have suggestions of how to share common code files between projects without replicating the common code.

1 ACCEPTED SOLUTION

Accepted Solutions
phgphd
Associate II

So there is a way to work within IDE. Under File select Import, under General select File System, then select Advanced, select "create links", then setup your 'from Directory' and 'Into Folder' fields. One or more files/or folders can be then be linked.

View solution in original post

5 REPLIES 5
Pavel A.
Evangelist III

CubeIDE is based on Eclipse, exactly as the CCS. So, linked files and folders work in CubeIDE exactly as in CCS.

So CCS provides a menu item to add files as links from within the IDE. That is what I am asking, can I add files as links from within Cube IDE or do I need create the links outside the IDE using Windows?

phgphd
Associate II

So there is a way to work within IDE. Under File select Import, under General select File System, then select Advanced, select "create links", then setup your 'from Directory' and 'Into Folder' fields. One or more files/or folders can be then be linked.

I have gotten this to work, but one of the files I have linked to my project is an include file.  When I try to make the project I get an error saying that the .h file does not exist.  I tried adding a path to the project as seen in the following screen capture, but it appears that the compiler is not taking the file link.  How can this be resolved?

RLein1_0-1742245671159.png

 

I discovered the solution.  You need to select File System instead of Workspace when creating the path