File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ def parse_port_config(contents, chip_keyword=None):
5050 if check_ifeq :
5151 ifeq_found = True
5252 chip_fam = check_ifeq .group (1 )
53- print ("found chip:" , chip_fam )
53+ # print("found chip:", chip_fam)
5454 else :
5555 ifeq_found = False
5656 chip_fam = "all"
@@ -217,17 +217,28 @@ def support_matrix_by_board():
217217 if not entry .is_dir ():
218218 continue
219219 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+
220230 for module in base_with_exclusions .keys ():
221231 #print(module)
222232 board_has_module = True
223233 if base_with_exclusions [module ]["excluded" ]:
224234 for port in base_with_exclusions [module ]["excluded" ].values ():
225235 #print(port)
226- if entry . name in port :
236+ if board_name in port :
227237 board_has_module = False
228238
229239 if board_has_module :
230240 board_modules .append (base_with_exclusions [module ]["name" ])
231- boards [entry . name ] = sorted (board_modules )
241+ boards [board_name ] = sorted (board_modules )
232242
243+ #print(json.dumps(boards, indent=2))
233244 return boards
You can’t perform that action at this time.
0 commit comments