修改pg的rom下载关键字

This commit is contained in:
ranchuan
2025-02-19 19:15:26 +08:00
parent e2649fd66e
commit e86adb63c9

View File

@@ -29,7 +29,7 @@ def init_send(s_port:serial.Serial, send_str:str):
send_str=send_str.encode('utf-8')
key_words={
b"WQKL":b"Recieving RAM-IMAGE in xmodem : C",
b"HZPG":b"waiting recieve image: C"
b"HZPG":b"waiting receive image: C"
}
while True:
s_port.write(send_str)
@@ -364,19 +364,21 @@ def global_def():
if(args.flash_file is not None):
iot_flash_file=args.flash_file
log_file=iot_flash_file
if(args.ram_file is not None):
ram_file=ram_file_redirect(args.ram_file)
if(os.path.exists(iot_flash_file)):
function_type='download'
iot_flash_file=bin_file_decrypt(iot_flash_file)
if args.kunlun_version is None:
args.kunlun_version=check_bin_type(iot_flash_file)
if ram_file is None:
ram_file=f'kl{args.kunlun_version}_ram_build.bin'
ram_file=ram_file_redirect(ram_file)
else:
function_type='upload'
if ram_file is None:
ram_file=f'bootram_kl{args.kunlun_version}.bin'
ram_file=ram_file_redirect(ram_file)
if(args.ram_file is not None):
ram_file=ram_file_redirect(args.ram_file)
if(args.kunlun_version is None):
print("请指定参数 -k")
sys.exit(-1)