Merge pull request #4271 from margguo/feature/update_rt_studio_py

Feature/update rt studio py
This commit is contained in:
Bernard Xiong 2021-01-27 20:36:39 +08:00 committed by GitHub
commit 9c03cc91f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -524,14 +524,13 @@ def TargetEclipse(env, reset=False, prj_name=None):
# generate projcfg.ini file
if not os.path.exists('.settings/projcfg.ini'):
# if search files with uvprojx or uvproj suffix
file = ""
items = os.listdir(".")
if len(items) > 0:
for item in items:
if item.endswith(".uvprojx") or item.endswith(".uvproj"):
file = os.path.abspath(item)
break
else:
file = ""
chip_name = rt_studio.get_mcu_info(file)
if rt_studio.gen_projcfg_ini_file(chip_name, prj_name, os.path.abspath(".settings/projcfg.ini")) is False:
print('Fail!')

View File

@ -5,6 +5,9 @@ from string import Template
import rtconfig
import shutil
# version
MODULE_VER_NUM = 1
cproject_temp = """<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">