Difference between revisions of "Portable Projects"
From DSignT Support Database
WikiImporter (talk | contribs) (Pushed from DSignT Issue Database.) |
WikiImporter (talk | contribs) (Pushed from DSignT Issue Database.) |
||
Line 1: | Line 1: | ||
− | + | == Problem == | |
CCS4 projects store absolute paths. Moving a project to a different directory or another computer is not possible. | CCS4 projects store absolute paths. Moving a project to a different directory or another computer is not possible. | ||
− | + | ||
+ | {{pagetop}} | ||
+ | == Solution == | ||
This example assumes the following directory structure: | This example assumes the following directory structure: | ||
CCS_projects | CCS_projects | ||
Line 17: | Line 19: | ||
− | * create a file macros.ini in the project directory (current_project in the above example). This file must contain an entry | + | * 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 = ../../ <br /> 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: | * make sure all source files include header files with a relative path, or add the include path in the project settings: | ||
Line 33: | Line 35: | ||
</linkedResources> | </linkedResources> | ||
with | with | ||
− | <location> | + | <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 == | ||
+ | [[Migrating C2000 Projects from CCSv3.3 to CCSv4|Migrating old projects]] | ||
− | + | [[CCS4 open old CCS3 DSP/BIOS project]] | |
− | |||
− | |||
+ | [[Import old CCS project]] | ||
[[category:CCS4 Usage]] | [[category:CCS4 Usage]] |
Revision as of 10:36, 6 June 2012
1 Problem
CCS4 projects store absolute paths. Moving a project to a different directory or another computer is not possible.
2 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 SWROOT 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}