@@ -370,7 +370,7 @@ def _get_nrf_device_args(serial_number: str):
370370]
371371
372372
373- def get_zephyr_base (options : dict ):
373+ def get_zephyr_base (options : dict ) -> str :
374374 """Returns Zephyr base path"""
375375 zephyr_base = options .get ("zephyr_base" , ZEPHYR_BASE )
376376 assert zephyr_base , "'zephyr_base' option not passed and not found by default!"
@@ -470,7 +470,6 @@ def _create_prj_conf(
470470 API_SERVER_CRT_LIBS_TOKEN = "<API_SERVER_CRT_LIBS>"
471471 CMAKE_ARGS_TOKEN = "<CMAKE_ARGS>"
472472 QEMU_PIPE_TOKEN = "<QEMU_PIPE>"
473- CMSIS_PATH_TOKEN = "<CMSIS_PATH>"
474473
475474 CRT_LIBS_BY_PROJECT_TYPE = {
476475 "host_driven" : "microtvm_rpc_server microtvm_rpc_common aot_executor_module aot_executor common" ,
@@ -508,7 +507,14 @@ def _cmsis_required(self, project_path: Union[str, pathlib.Path]) -> bool:
508507 return False
509508
510509 def _generate_cmake_args (
511- self , mlf_extracted_path , board , use_fvp , west_cmd , zephyr_base , verbose , cmsis_path
510+ self ,
511+ mlf_extracted_path ,
512+ board : str ,
513+ use_fvp : bool ,
514+ west_cmd : str ,
515+ zephyr_base : str ,
516+ verbose : bool ,
517+ cmsis_path : pathlib .Path ,
512518 ) -> str :
513519 cmake_args = "\n # cmake args\n "
514520 if verbose :
@@ -530,10 +536,9 @@ def _generate_cmake_args(
530536
531537 cmake_args += f"set(BOARD { board } )\n "
532538
533- enable_cmsis = self ._cmsis_required (mlf_extracted_path )
534- if enable_cmsis :
539+ if self ._cmsis_required (mlf_extracted_path ):
535540 assert cmsis_path , CMSIS_PATH_ERROR
536- cmake_args += f"set(ENABLE_CMSIS { str (enable_cmsis ). upper ( )} )\n "
541+ cmake_args += f"set(CMSIS_PATH { str (cmsis_path )} )\n "
537542
538543 return cmake_args
539544
@@ -632,10 +637,6 @@ def generate_project(self, model_library_format_path, standalone_crt_dir, projec
632637 self .qemu_pipe_dir = pathlib .Path (tempfile .mkdtemp ())
633638 line = line .replace (self .QEMU_PIPE_TOKEN , str (self .qemu_pipe_dir / "fifo" ))
634639
635- if self .CMSIS_PATH_TOKEN in line and self ._cmsis_required (extract_path ):
636- assert cmsis_path , CMSIS_PATH_ERROR
637- line = line .replace (self .CMSIS_PATH_TOKEN , cmsis_path )
638-
639640 cmake_f .write (line )
640641
641642 heap_size = recommended_heap_size
0 commit comments