Skip to content

Commit f3b72aa

Browse files
ErikChanHubErikChan
andauthored
update the template for projcfg.ini in rt-studio (#5630)
* update the template for projcfg.ini in rt-studio * update the template for projcfg.ini in rt-studio Co-authored-by: ErikChan <“[email protected]>
1 parent ee10516 commit f3b72aa

File tree

1 file changed

+22
-23
lines changed

1 file changed

+22
-23
lines changed

tools/rt_studio.py

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import rtconfig
66
import shutil
7+
import time
78

89
# version
910
MODULE_VER_NUM = 1
@@ -200,27 +201,25 @@
200201
</projectDescription>"""
201202

202203
projcfg_ini_temp = """#RT-Thread Studio Project Configuration
203-
#Sat Jan 16 15:18:32 CST 2021
204-
project_type=rtt
205-
chip_name=${chip_name}
206-
cpu_name=None
207-
target_freq=
208-
clock_source=
209-
dvendor_name=
210-
rx_pin_name=
211-
rtt_path=
212-
source_freq=
213-
csp_path=
214-
sub_series_name=
215-
selected_rtt_version=latest
204+
# $time
216205
cfg_version=v3.0
217-
tool_chain=gcc
218-
uart_name=
219-
tx_pin_name=
220-
rtt_nano_path=
221-
output_project_path=
222-
hardware_adapter=J-Link
223-
project_name=${project_name}"""
206+
207+
board_name=
208+
bsp_version=
209+
bsp_path=
210+
chip_name=
211+
project_base_rtt_bsp=true
212+
is_use_scons_build=true
213+
hardware_adapter=
214+
selected_rtt_version=latest
215+
board_base_nano_proj=false
216+
is_base_example_project=false
217+
example_name=
218+
project_type=rt-thread
219+
os_branch=master
220+
os_version=latest
221+
project_name=$project_name
222+
output_project_path=$output_project_path"""
224223

225224
eclipse_core_runtime_temp = """content-types/enabled=true
226225
content-types/org.eclipse.cdt.core.asmSource/file-extensions=s
@@ -338,9 +337,9 @@ def gen_project_file(output_file_path):
338337
def gen_projcfg_ini_file(chip_name, project_name, output_file_path):
339338
try:
340339
projcfg_file_tmp = Template(projcfg_ini_temp)
341-
w_str = projcfg_file_tmp.substitute(project_name=project_name,
342-
chip_name=(chip_name))
343-
340+
w_str = projcfg_file_tmp.substitute(time=time.strftime("%a %b %d %H:%M:%S %Y", time.localtime()),
341+
project_name=project_name,
342+
output_project_path=os.path.abspath(""))
344343
dir_name = os.path.dirname(output_file_path)
345344
if not os.path.exists(dir_name):
346345
os.makedirs(dir_name)

0 commit comments

Comments
 (0)