Skip to content

Commit cdbda3a

Browse files
committed
fix Eigen Fw Download bug
1 parent cc5fdc9 commit cdbda3a

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

thonnycontrib/quecpython/fw/__init__.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,17 +201,17 @@ def EigenFwDownload(self):
201201

202202
ap_application_addr = config.get('File_1', 'START_ADDR')
203203
ap_application_max = config.get('File_1', 'MAX_SIZE')
204-
flexfile2 = ap_application_addr + " " + ap_application_max
204+
flexfile2 = [ap_application_addr, ap_application_max]
205205
extra['flexfile2'] = flexfile2
206206

207207
ap_updater_addr = config.get('File_2', 'START_ADDR')
208208
ap_updater_max = config.get('File_2', 'MAX_SIZE')
209-
flexfile3 = ap_updater_addr + " " + ap_updater_max
209+
flexfile3 = [ap_updater_addr, ap_updater_max]
210210
extra['flexfile3'] = flexfile3
211211

212212
customer_fs_addr = config.get('File_3', 'START_ADDR')
213213
customer_fs_max = config.get('File_3', 'MAX_SIZE')
214-
flexfile4 = customer_fs_addr + " " + customer_fs_max
214+
flexfile4 = [customer_fs_addr, customer_fs_max]
215215
extra['flexfile4'] = flexfile4
216216

217217
binpkg_config = configparser.ConfigParser(interpolation=None)
@@ -224,8 +224,7 @@ def EigenFwDownload(self):
224224
binpkg_config.set('system', 'syspath', str(Path(tmp_path) / "sysloadskip = 0"))
225225
binpkg_config.set('cp_system', 'cp_syspath', str(Path(tmp_path) / "cp_sysloadskip = 0"))
226226

227-
binpkg_config.set('flexfile2', 'filepath',
228-
str(Path(tmp_path) / "fw/ap_application.bin"))
227+
binpkg_config.set('flexfile2', 'filepath', str(Path(tmp_path) / "fw/ap_application.bin"))
229228
binpkg_config.set('flexfile2', 'burnaddr', ap_application_addr)
230229

231230
binpkg_config.set('flexfile3', 'filepath', str(Path(tmp_path) / "fw/ap_updater.bin"))
@@ -237,7 +236,7 @@ def EigenFwDownload(self):
237236
if File_Count == 4:
238237
customer_backup_fs_addr = config.get('File_4', 'START_ADDR')
239238
customer_backup_fs_max = config.get('File_4', 'MAX_SIZE')
240-
flexfile5 = customer_backup_fs_addr + " " + customer_backup_fs_max
239+
flexfile5 = [customer_backup_fs_addr, customer_backup_fs_max]
241240
extra['flexfile5'] = flexfile5
242241

243242
binpkg_config.set('flexfile5', 'filepath',

thonnycontrib/quecpython/fw/proc.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ def progress_rate(self):
291291
# 下载 ap_application.bin文件
292292
logger.info("---------- Download ap_application.bin flasherase ----------")
293293
flexfile2 = self.extra['flexfile2']
294-
cmd4 = self.cmd[:1] + ["--skipconnect", "1"] + self.cmd[1:] + ["flasherase"] + [flexfile2]
294+
cmd4 = self.cmd[:1] + ["--skipconnect", "1"] + self.cmd[1:] + ["flasherase"] + flexfile2
295295
logger.info('cmd4: {}'.format(cmd4))
296296
p = Process(cmd4)
297297
p.run()
@@ -314,7 +314,7 @@ def progress_rate(self):
314314
# 下载 ap_updater.bin文件
315315
logger.info("---------- Download ap_updater.bin flasherase ----------")
316316
flexfile3 = self.extra['flexfile3']
317-
cmd6 = self.cmd[:1] + ["--skipconnect", "1"] + self.cmd[1:] + ["flasherase"] + [flexfile3]
317+
cmd6 = self.cmd[:1] + ["--skipconnect", "1"] + self.cmd[1:] + ["flasherase"] + flexfile3
318318
logger.info('cmd6: {}'.format(cmd6))
319319
p = Process(cmd6)
320320
p.run()
@@ -337,7 +337,7 @@ def progress_rate(self):
337337
# 下载 customer_fs.bin文件
338338
logger.info("---------- Download customer_fs.bin flasherase ----------")
339339
flexfile4 = self.extra['flexfile4']
340-
cmd8 = self.cmd[:1] + ["--skipconnect", "1"] + self.cmd[1:] + ["flasherase"] + [flexfile4]
340+
cmd8 = self.cmd[:1] + ["--skipconnect", "1"] + self.cmd[1:] + ["flasherase"] + flexfile4
341341
logger.info('cmd8: {}'.format(cmd8))
342342
p = Process(cmd8)
343343
p.run()
@@ -361,7 +361,7 @@ def progress_rate(self):
361361
# 下载 customer_backup_fs.bin 文件
362362
logger.info("---------- Download customer_backup_fs.bin flasherase ----------")
363363
flexfile5 = self.extra['flexfile5']
364-
cmd10 = self.cmd[:1] + ["--skipconnect", "1"] + self.cmd[1:] + ["flasherase"] + [flexfile5]
364+
cmd10 = self.cmd[:1] + ["--skipconnect", "1"] + self.cmd[1:] + ["flasherase"] + flexfile5
365365
logger.info('cmd10: {}'.format(cmd10))
366366
p = Process(cmd10)
367367
p.run()
@@ -392,7 +392,7 @@ def progress_rate(self):
392392
logger.info(line)
393393
self.parse(line)
394394
yield line, self.progress
395-
yield line, 100
395+
yield 'download process finished.', 100
396396

397397
def parse(self, line):
398398
if "RtsConditionAssign" in line:

0 commit comments

Comments
 (0)