1 | #!python
|
---|
2 | # -*- coding: utf-8 -*-
|
---|
3 | #
|
---|
4 | # TOPPERS ATK2
|
---|
5 | # Toyohashi Open Platform for Embedded Real-Time Systems
|
---|
6 | # Automotive Kernel Version 2
|
---|
7 | #
|
---|
8 | # Copyright (C) 2013-2014 by Center for Embedded Computing Systems
|
---|
9 | # Graduate School of Information Science, Nagoya Univ., JAPAN
|
---|
10 | # Copyright (C) 2013-2014 by FUJI SOFT INCORPORATED, JAPAN
|
---|
11 | # Copyright (C) 2013-2014 by Panasonic Advanced Technology Development Co., Ltd., JAPAN
|
---|
12 | # Copyright (C) 2013-2014 by Renesas Electronics Corporation, JAPAN
|
---|
13 | # Copyright (C) 2013-2014 by Sunny Giken Inc., JAPAN
|
---|
14 | # Copyright (C) 2013-2014 by TOSHIBA CORPORATION, JAPAN
|
---|
15 | # Copyright (C) 2013-2014 by Witz Corporation, JAPAN
|
---|
16 | #
|
---|
17 | # ä¸è¨èä½æ¨©è
|
---|
18 | ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
|
---|
19 | # ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ã使ç¨ã»è¤è£½ã»æ¹
|
---|
20 | # å¤ã»åé
|
---|
21 | å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
|
---|
22 | # (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
|
---|
23 | # 権表示ï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
|
---|
24 | # ã¹ã³ã¼ãä¸ã«å«ã¾ãã¦ãããã¨ï¼
|
---|
25 | # (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
|
---|
26 | # ç¨ã§ããå½¢ã§åé
|
---|
27 | å¸ããå ´åã«ã¯ï¼åé
|
---|
28 | å¸ã«ä¼´ãããã¥ã¡ã³ãï¼å©ç¨
|
---|
29 | # è
|
---|
30 | ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
|
---|
31 | # ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
|
---|
32 | # (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
|
---|
33 | # ç¨ã§ããªãå½¢ã§åé
|
---|
34 | å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
|
---|
35 | # ã¨ï¼
|
---|
36 | # (a) åé
|
---|
37 | å¸ã«ä¼´ãããã¥ã¡ã³ãï¼å©ç¨è
|
---|
38 | ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
|
---|
39 | # ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
|
---|
40 | # (b) åé
|
---|
41 | å¸ã®å½¢æ
|
---|
42 | ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSããã¸ã§ã¯ãã«
|
---|
43 | # å ±åãããã¨ï¼
|
---|
44 | # (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
|
---|
45 | # 害ãããï¼ä¸è¨èä½æ¨©è
|
---|
46 | ããã³TOPPERSããã¸ã§ã¯ããå
|
---|
47 | 責ãããã¨ï¼
|
---|
48 | # ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
|
---|
49 | # ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
|
---|
50 | ããã³TOPPERSããã¸ã§ã¯ãã
|
---|
51 | # å
|
---|
52 | 責ãããã¨ï¼
|
---|
53 | #
|
---|
54 | # æ¬ã½ããã¦ã§ã¢ã¯ï¼AUTOSARï¼AUTomotive Open System ARchitectureï¼ä»
|
---|
55 | # æ§ã«åºã¥ãã¦ããï¼ä¸è¨ã®è¨±è«¾ã¯ï¼AUTOSARã®ç¥ç財ç£æ¨©ã許諾ãããã®ã§
|
---|
56 | # ã¯ãªãï¼AUTOSARã¯ï¼AUTOSARä»æ§ã«åºã¥ããã½ããã¦ã§ã¢ãåç¨ç®çã§å©
|
---|
57 | # ç¨ããè
|
---|
58 | ã«å¯¾ãã¦ï¼AUTOSARãã¼ããã¼ã«ãªããã¨ãæ±ãã¦ããï¼
|
---|
59 | #
|
---|
60 | # æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
|
---|
61 | ã
|
---|
62 | # ãã³TOPPERSããã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
|
---|
63 | # ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
|
---|
64 | # ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ害ã«é¢ãã¦ãï¼ã
|
---|
65 | # ã®è²¬ä»»ãè² ããªãï¼
|
---|
66 | #
|
---|
67 | # $Id: pre_cfg.py 164 2015-06-03 01:22:29Z t_ishikawa $
|
---|
68 | #
|
---|
69 |
|
---|
70 | import subprocess
|
---|
71 | import os
|
---|
72 | import sys
|
---|
73 |
|
---|
74 | # set relative path from top proj
|
---|
75 | proj_rel_dir = "../"
|
---|
76 |
|
---|
77 | # call definition file
|
---|
78 | common.Source(proj_rel_dir + "def.py")
|
---|
79 |
|
---|
80 | # path
|
---|
81 | src_abs_path = os.path.abspath(proj_rel_dir + SRCDIR)
|
---|
82 |
|
---|
83 | # call common file
|
---|
84 | common.Source(src_abs_path + "/arch/ccrh/common.py")
|
---|
85 |
|
---|
86 | #
|
---|
87 | # make command
|
---|
88 | #
|
---|
89 | cfg_command = cfg + " --pass 1 " + "--kernel " + CFG_KERNEL
|
---|
90 | cfg_command += " --api-table " + cfg_api_table
|
---|
91 | cfg_command += " " + cfg_cfg1_def_tables + cfg_includes
|
---|
92 | cfg_command += " --ini-file " + cfg_ini_file
|
---|
93 | cfg_command += " " + cfg_input_str
|
---|
94 |
|
---|
95 | print cfg_command
|
---|
96 |
|
---|
97 | #
|
---|
98 | # Execute cfg path 1
|
---|
99 | #
|
---|
100 | try:
|
---|
101 | output = subprocess.check_output(cfg_command, stderr=subprocess.STDOUT,)
|
---|
102 | except subprocess.CalledProcessError, e:
|
---|
103 | print "ERROR!! : ", e.output
|
---|
104 |
|
---|
105 | print output
|
---|