File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ def parse_port_config(contents, chip_keyword=None):
50
50
if check_ifeq :
51
51
ifeq_found = True
52
52
chip_fam = check_ifeq .group (1 )
53
- print ("found chip:" , chip_fam )
53
+ # print("found chip:", chip_fam)
54
54
else :
55
55
ifeq_found = False
56
56
chip_fam = "all"
@@ -217,17 +217,28 @@ def support_matrix_by_board():
217
217
if not entry .is_dir ():
218
218
continue
219
219
board_modules = []
220
+
221
+ board_name = entry .name
222
+ board_contents = ""
223
+ with open (os .path .join (entry .path , "mpconfigboard.h" )) as get_name :
224
+ board_contents = get_name .read ()
225
+ board_name_re = re .search ("(?<=MICROPY_HW_BOARD_NAME)\s+(.+)" ,
226
+ board_contents )
227
+ if board_name_re :
228
+ board_name = board_name_re .group (1 ).strip ('"' )
229
+
220
230
for module in base_with_exclusions .keys ():
221
231
#print(module)
222
232
board_has_module = True
223
233
if base_with_exclusions [module ]["excluded" ]:
224
234
for port in base_with_exclusions [module ]["excluded" ].values ():
225
235
#print(port)
226
- if entry . name in port :
236
+ if board_name in port :
227
237
board_has_module = False
228
238
229
239
if board_has_module :
230
240
board_modules .append (base_with_exclusions [module ]["name" ])
231
- boards [entry . name ] = sorted (board_modules )
241
+ boards [board_name ] = sorted (board_modules )
232
242
243
+ #print(json.dumps(boards, indent=2))
233
244
return boards
You can’t perform that action at this time.
0 commit comments