@@ -89,7 +89,6 @@ def __init__(self,
89
89
self .enable_cli = enable_cli
90
90
self .enable_rpc = enable_rpc
91
91
self .enable_shell = enable_shell
92
-
93
92
self .ot_src_dir = os .path .join (os .getcwd (), 'third_party/openthread/ot-realtek' )
94
93
95
94
def CmakeBuildFlags (self ) -> str :
@@ -102,30 +101,25 @@ def CmakeBuildFlags(self) -> str:
102
101
f"-DOT_CMAKE_NINJA_TARGET={ self .app .TargetName } " ,
103
102
f"-DMATTER_EXAMPLE_PATH={ self .root } /examples/{ self .app .ExampleName } /realtek_bee"
104
103
]
105
-
106
104
if self .enable_cli :
107
105
flags .append ("-DENABLE_CLI=ON" )
108
106
else :
109
107
flags .append ("-DENABLE_CLI=OFF" )
110
-
111
108
if self .enable_rpc :
112
109
flags .append ("-DENABLE_PW_RPC=ON" )
113
110
else :
114
111
flags .append ("-DENABLE_PW_RPC=OFF" )
115
-
116
112
if self .enable_shell :
117
113
flags .append ("-DENABLE_SHELL=ON" )
118
114
else :
119
115
flags .append ("-DENABLE_SHELL=OFF" )
120
-
121
116
return " " .join (flags )
122
117
123
118
def generate (self ):
124
119
cmd = 'arm-none-eabi-gcc -D BUILD_BANK=0 -E -P -x c {ot_src_dir}/src/bee4/{board_name}/app.ld -o {ot_src_dir}/src/bee4/{board_name}/app.ld.gen' .format (
125
120
ot_src_dir = self .ot_src_dir ,
126
121
board_name = self .board .BoardName )
127
122
self ._Execute (['bash' , '-c' , cmd ])
128
-
129
123
cmd = 'cmake -GNinja -DOT_COMPILE_WARNING_AS_ERROR=ON {build_flags} {example_folder} -B{out_folder}' .format (
130
124
build_flags = self .CmakeBuildFlags (),
131
125
example_folder = self .ot_src_dir ,
@@ -134,17 +128,18 @@ def generate(self):
134
128
135
129
def _build (self ):
136
130
cmd = ['ninja' , '-C' , self .output_dir ]
137
-
138
131
if self .ninja_jobs is not None :
139
132
cmd .append ('-j' + str (self .ninja_jobs ))
140
-
141
133
cmd .append (self .app .TargetName )
142
-
143
134
self ._Execute (cmd , title = 'Building ' + self .identifier )
144
-
145
135
cleanup_cmd = ['rm' , '-rf' , f"{ self .root } /third_party/openthread/ot-realtek/src/bee4/{ self .board .BoardName } /*.gen" ]
146
-
147
136
self ._Execute (cleanup_cmd , title = 'Cleaning up generated files' )
148
137
149
138
def build_outputs (self ):
150
- logging .info ('build_outputs %s' , self .output_dir )
139
+ yield BuilderOutput (
140
+ os .path .join (self .output_dir , 'bin' , 'matter-cli-ftd' ),
141
+ self .app .AppNamePrefix )
142
+ if self .options .enable_link_map_file :
143
+ yield BuilderOutput (
144
+ os .path .join (self .output_dir , 'map.map' ),
145
+ self .app .AppNamePrefix + '.map' )
0 commit comments