2727MBED_OS_REFERENCE_FILE_NAME = "mbed-os.lib"
2828MBED_OS_DIR_NAME = "mbed-os"
2929TARGETS_JSON_FILE_PATH = Path ("targets" , "targets.json" )
30+ CUSTOM_TARGETS_JSON_FILE_NAME = "custom_targets.json"
3031
3132# Information written to mbed-os.lib
3233MBED_OS_REFERENCE_URL = "https://github.com/ARMmbed/mbed-os"
@@ -59,6 +60,7 @@ class MbedProgramFiles:
5960 cmakelists_file : Path
6061 cmake_config_file : Path
6162 cmake_build_dir : Path
63+ custom_targets_json : Path
6264
6365 @classmethod
6466 def from_new (cls , root_path : Path ) -> "MbedProgramFiles" :
@@ -79,6 +81,7 @@ def from_new(cls, root_path: Path) -> "MbedProgramFiles":
7981 gitignore = root_path / ".gitignore"
8082 cmake_config = root_path / CMAKE_CONFIG_FILE_PATH
8183 cmake_build_dir = root_path / CMAKE_BUILD_DIR
84+ custom_targets_json = root_path / CUSTOM_TARGETS_JSON_FILE_NAME
8285
8386 if mbed_os_ref .exists ():
8487 raise ValueError (f"Program already exists at path { root_path } ." )
@@ -94,6 +97,7 @@ def from_new(cls, root_path: Path) -> "MbedProgramFiles":
9497 cmakelists_file = cmakelists_file ,
9598 cmake_config_file = cmake_config ,
9699 cmake_build_dir = cmake_build_dir ,
100+ custom_targets_json = custom_targets_json ,
97101 )
98102
99103 @classmethod
@@ -109,6 +113,7 @@ def from_existing(cls, root_path: Path) -> "MbedProgramFiles":
109113 logger .info ("This program does not contain an mbed_app.json config file." )
110114 app_config = None
111115
116+ custom_targets_json = root_path / CUSTOM_TARGETS_JSON_FILE_NAME
112117 mbed_os_file = root_path / MBED_OS_REFERENCE_FILE_NAME
113118
114119 cmakelists_file = root_path / CMAKELISTS_FILE_NAME
@@ -121,6 +126,7 @@ def from_existing(cls, root_path: Path) -> "MbedProgramFiles":
121126 cmakelists_file = cmakelists_file ,
122127 cmake_config_file = root_path / CMAKE_CONFIG_FILE_PATH ,
123128 cmake_build_dir = root_path / CMAKE_BUILD_DIR ,
129+ custom_targets_json = custom_targets_json ,
124130 )
125131
126132
0 commit comments