diff --git a/tools/building.py b/tools/building.py index 9e12b81204..b05a4d5c67 100644 --- a/tools/building.py +++ b/tools/building.py @@ -884,6 +884,17 @@ def EndBuilding(target, program = None): from mkdist import MkDist project_path = GetOption('make-project-path') project_name = GetOption('make-project-name') + + if not isinstance(project_path, str) or len(project_path) == 0 : + print("\nwarning : --project-path=your_project_path parameter is required.") + print("\nstop!") + exit(0) + + if not isinstance(project_name, str) or len(project_name) == 0: + print("\nwarning : --project-name=your_project_name parameter is required.") + print("\nstop!") + exit(0) + rtt_ide = {'project_path' : project_path, 'project_name' : project_name} MkDist(program, BSP_ROOT, Rtt_Root, Env, rtt_ide) need_exit = True diff --git a/tools/mkdist.py b/tools/mkdist.py index 8784dac7c9..3b77739282 100644 --- a/tools/mkdist.py +++ b/tools/mkdist.py @@ -153,7 +153,8 @@ def bs_update_ide_project(bsp_root, rtt_root, rttide = None): 'vs2012':('msvc', 'cl'), 'cdk':('gcc', 'gcc')} else: - tgt_dict = {'eclipse':('gcc', 'gcc')} + item = 'eclipse --project-name=' + rttide['project_name'] + tgt_dict = {item:('gcc', 'gcc')} scons_env = os.environ.copy() scons_env['RTT_ROOT'] = rtt_root @@ -315,10 +316,6 @@ def MkDist(program, BSP_ROOT, RTT_ROOT, Env, rttide = None): dist_dir = os.path.join(BSP_ROOT, 'dist', dist_name) else: dist_dir = rttide['project_path'] - if not isinstance(dist_dir, str): - print("\n--project-path=your_project_path parameter is required.") - print("\nstop!") - return target_path = os.path.join(dist_dir, 'rt-thread')