Portable Projects: Difference between revisions
From DSignT Support Database
Jump to navigationJump to search
WikiImporter (talk | contribs) (Pushed from DSignT Issue Database.) |
WikiImporter (talk | contribs) (Pushed from DSignT Issue Database.) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 26: | Line 26: | ||
#include <dmodule/dm2c6747.h> | #include <dmodule/dm2c6747.h> | ||
* edit the .project file in the project directory (current_project in the above example) and replace the absolute paths with the | * edit the .project file in the project directory (current_project in the above example) and replace the absolute paths with the EXT_ROOT__current_project macro. Replace the <location> tag | ||
<linkedResources> | <linkedResources> | ||
<link> | <link> | ||
| Line 43: | Line 43: | ||
== Additional Tags == | == Additional Tags == | ||
http://www.dsignt.de/support/doc/portable_ccs_projects/html/index.html | |||
[[Migrating C2000 Projects from CCSv3.3 to CCSv4|Migrating old projects]] | [[Migrating C2000 Projects from CCSv3.3 to CCSv4|Migrating old projects]] | ||
Latest revision as of 15:12, 22 June 2012
Problem
CCS4 projects store absolute paths. Moving a project to a different directory or another computer is not possible.
Solution
This example assumes the following directory structure:
CCS_projects
|
+--- dmodule (D.Module specific headers and linker command files)
|
+--- common (libs, headers, etc)
|
+--- utils
|
+--- myprojects
| |
| +--- current_project (source files)
- create a file macros.ini in the project directory (current_project in the above example). This file must contain an entry EXT_ROOT__current_project = ../../
EXT_ROOT__current_project now points to the project base directory (CCS_projects in the above example). To give highest compatibility even for later CCS releases, this macro should always start with a leading EXT_ROOT__ and end with the trailing project name.
- make sure all source files include header files with a relative path, or add the include path in the project settings:
#include "../../dmodule/dm2c6747.h"
or, if the base directory CCS_projects is added to the project include options:
#include <dmodule/dm2c6747.h>
- edit the .project file in the project directory (current_project in the above example) and replace the absolute paths with the EXT_ROOT__current_project macro. Replace the <location> tag
<linkedResources>
<link>
<name>dm2c6747.cmd</name>
<type>1</type>
<location>d:/work/ccs_projects/dmodule/dm2c6747.cmd</location>
</link>
</linkedResources>
with
<location>EXT_ROOT__current_project/dmodule/dm2c6747.cmd</location>
- Use ${EXT_ROOT__current_project} in the Build Properties to add include paths and/or call programs for post-build steps:
Build Properties - Tool Settings - C6000 Compiler - Include Options = ${EXT_ROOT__current_project}
${EXT_ROOT__current_project}/utils/makehex ${BuildArtifactFileBaseName}
Additional Tags
http://www.dsignt.de/support/doc/portable_ccs_projects/html/index.html