Part Number: TM4C1294NCPDT
Tool/software: Code Composer Studio
Hello,
I am attempting to share some source files between multiple CCS projects by adding said files to each project as linked resources. Because these projects (and the shared code) are under version control and must be buildable on different machines with minimal hassle, I decided to make all of the links relative to PROJECT_LOC.
Here is the directory structure that I am using:
workspace
example_project_folder
library
include
... various .h files
source
... various .c files
In the following examples, you can assume PROJECT_LOC is set to the 'example_project_folder'. I want to add a file called 'crc16.c'. The path to this file from the workspace folder would be library/source/crc16.c.
Method 1 (Add Files Dialog) When I right-click on the project name and use the 'Add Files' dialog, the path is relative, as expected. This is what I want!
Here is an example of the resulting "Location" shown in the Properties window for a file added in this way: PROJECT_LOC/../library/source/crc16.c
Method 2 (Drag Item From File Explorer) When I drag files (or folders) onto the project name from my system file explorer, using 'Link to files' and 'Create link locations relative to PROJECT_LOC', I get an incorrect result. The path is absolute, which is not what I want.
Here is an example of the resulting "Location" shown in the Properties window for a file added in this way: PROJECT_LOC/../../../../home/ofdouglas/storage/embedded/library/source/crc16.c
The path that results from method 2 is an absolute path. Obviously this is not portable!
I would like to be able to use the drag-and-drop method (method 2), because the add files dialog (method 1) will not allow me to add an entire folder. If I were to use method 1, I would have to add every single file manually and then recreate my directory structure inside the project.
Is there a solution that will allow me to add an entire folder (preferably including multiple levels of subfolders) that will use a purely relative path?