in versions/master/build.py [0:0]
def find_BSPs():
bsp_dir = path.join(cwd, '../mynewt-core', BSP_DIR)
if not path.isdir(bsp_dir):
raise Exception("The directory %s does not exist".format(bsp_dir))
bsps = []
for bsp in listdir(bsp_dir):
with open(path.join(bsp_dir, bsp, "bsp.yml"), 'r') as f:
data = yaml.full_load(f)
for k in ['bsp.name', 'bsp.url', 'bsp.maker', 'bsp.arch']:
# XXX might also skip bsp.arch that starts with 'sim'?
if k not in data:
print("{} is missing metadata".format(bsp))
break
else:
bsp = BSP(name=data['bsp.name'], url=data['bsp.url'],
maker=data['bsp.maker'], arch=data['bsp.arch'])
bsps.append(bsp)
return bsps