1 | #!python
|
---|
2 | import os
|
---|
3 |
|
---|
4 | #
|
---|
5 | # variable definition
|
---|
6 | #
|
---|
7 | INCLUDES = []
|
---|
8 | CFG1_DEF_TABLES = []
|
---|
9 |
|
---|
10 | os.chdir(os.path.dirname(project.Path))
|
---|
11 |
|
---|
12 | ADDITIONAL_INCLUDES = []
|
---|
13 |
|
---|
14 | # set relative path from top proj
|
---|
15 | proj_rel_dir = ""
|
---|
16 |
|
---|
17 | # call definition file
|
---|
18 | execfile("./def.py")
|
---|
19 |
|
---|
20 | # path
|
---|
21 | src_abs_path = os.path.abspath(SRCDIR)
|
---|
22 |
|
---|
23 | # call common file
|
---|
24 | execfile(src_abs_path + "/arch/ccrx/common.py")
|
---|
25 |
|
---|
26 | #
|
---|
27 | # Update asp.mtpj
|
---|
28 | #
|
---|
29 | inputstr = ReadFile('asp.mtpj')
|
---|
30 | inputstr = SetTargetFileRelativePath(inputstr, asp_files, SRCDIR)
|
---|
31 | inputstr = SetCcrxIncludes(inputstr, asp_rel_includes, INCLUDES, SRCDIR)
|
---|
32 | inputstr = SetPythonFileRelativePath(inputstr, asp_post_python_files, SRCDIR)
|
---|
33 | WriteFile('asp.mtpj', inputstr)
|
---|
34 |
|
---|
35 | #
|
---|
36 | # Update ./cfg/cfg.mtpj
|
---|
37 | #
|
---|
38 | inputstr = ReadFile('./cfg/cfg.mtsp')
|
---|
39 | inputstr = SetTargetFileRelativePath(inputstr, asp_files, SRCDIR + "../")
|
---|
40 | inputstr = SetCcrxIncludes(inputstr, cfg_rel_includes, INCLUDES, SRCDIR + "../")
|
---|
41 | inputstr = SetPythonFileRelativePath(inputstr, cfg_pre_python_files, SRCDIR + "../")
|
---|
42 | inputstr = SetPythonFileRelativePath(inputstr, cfg_post_python_files, SRCDIR + "../")
|
---|
43 | WriteFile('./cfg/cfg.mtsp', inputstr)
|
---|
44 |
|
---|
45 |
|
---|
46 | #
|
---|
47 | # make ccrx include path for kernel
|
---|
48 | #
|
---|
49 | inputstr = ReadFile('./kernel/kernel.mtsp')
|
---|
50 | inputstr = SetTargetFileRelativePath(inputstr, kernel_files, SRCDIR + "../")
|
---|
51 | inputstr = SetCcrxIncludes(inputstr, kernel_rel_includes, INCLUDES, SRCDIR + "../")
|
---|
52 | WriteFile('./kernel/kernel.mtsp', inputstr)
|
---|