Skip to content
Snippets Groups Projects
Commit a7efeb7e authored by Thibault Allenet's avatar Thibault Allenet
Browse files

Update export.py to include new F7 board, fix a typo & remove unecessary copy tree

parent a4dd7842
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,7 @@ BOARD_PATH : str = ROOT / "boards"
BOARDS_MAP: dict[str, Path] = {
"stm32h7" : BOARD_PATH / "stm32" / "H7",
"stm32f7" : BOARD_PATH / "stm32" / "F7",
}
def export(export_folder_name,
......@@ -37,7 +38,7 @@ def supported_boards() -> list[str]:
def gen_board_files(path:str, board:str)->None:
if board not in supported_boards():
raise ValueError(f"Board {board} is not supported, supported board are:\n\t-{'\n\t-'.join(supported_boards())}")
raise ValueError(f"Board {board} is not supported, supported board are:{supported_boards()}")
if isinstance(path, str): path = Path(path)
# Create dnn directory is not exist
......@@ -51,5 +52,4 @@ def gen_board_files(path:str, board:str)->None:
shutil.copytree(BOARDS_MAP[board], str(path), dirs_exist_ok=True)
# For N2D2 library, copy static folder to export/include
dnn_include_folder = dnn_folder / "include"
os.makedirs(str(dnn_include_folder), exist_ok=True)
shutil.copytree(str(ROOT / "_N2D2" / "static"), str(dnn_include_folder), dirs_exist_ok=True)
os.makedirs(str(dnn_include_folder), exist_ok=True)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment