Skip to content

Commit 0fc5f25

Browse files
committed
[tool][rt_studio]:Support custom project naming
1 parent 6d61514 commit 0fc5f25

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/targets/rt_studio.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,16 +328,18 @@ def gen_cproject_file(output_file_path):
328328
return False
329329

330330

331-
def gen_project_file(output_file_path):
331+
def gen_project_file(output_file_path, project_name):
332332
try:
333-
w_str = project_temp
333+
w_str = project_temp.replace('__project_name_flag__', project_name)
334+
334335
dir_name = os.path.dirname(output_file_path)
335336
if not os.path.exists(dir_name):
336337
os.makedirs(dir_name)
337338
with open(output_file_path, 'w') as f:
338339
f.write(w_str)
339340
return True
340341
except Exception as e:
342+
print(e)
341343
return False
342344

343345

0 commit comments

Comments
 (0)