@@ -191,28 +191,28 @@ def EigenFwDownload(self):
191191 shutil .copytree (fdir1 , str (Path (tmp_path ) / "fw" ))
192192 shutil .copytree (str (EXES_PATH / "Eigen" ), str (Path (tmp_path ) / "Eigen" ))
193193
194+ extra = dict ()
194195 try :
195196 config = configparser .ConfigParser (interpolation = None )
196197 logger .info ('quec_download_config.ini path: {}' .format (str (Path (tmp_path ) / "fw/quec_download_config.ini" )))
197198 config .read (str (Path (tmp_path ) / "fw/quec_download_config.ini" ))
198199 File_Count = int (config .get ('File' , 'File_Count' ))
200+ extra ['File_Count' ] = File_Count
199201
200202 ap_application_addr = config .get ('File_1' , 'START_ADDR' )
201203 ap_application_max = config .get ('File_1' , 'MAX_SIZE' )
202204 flexfile2 = ap_application_addr + " " + ap_application_max
205+ extra ['flexfile2' ] = flexfile2
203206
204207 ap_updater_addr = config .get ('File_2' , 'START_ADDR' )
205208 ap_updater_max = config .get ('File_2' , 'MAX_SIZE' )
206209 flexfile3 = ap_updater_addr + " " + ap_updater_max
210+ extra ['flexfile3' ] = flexfile3
207211
208212 customer_fs_addr = config .get ('File_3' , 'START_ADDR' )
209213 customer_fs_max = config .get ('File_3' , 'MAX_SIZE' )
210214 flexfile4 = customer_fs_addr + " " + customer_fs_max
211-
212- if File_Count == 4 :
213- customer_backup_fs_addr = config .get ('File_4' , 'START_ADDR' )
214- customer_backup_fs_max = config .get ('File_4' , 'MAX_SIZE' )
215- flexfile5 = customer_backup_fs_addr + " " + customer_backup_fs_max
215+ extra ['flexfile4' ] = flexfile4
216216
217217 binpkg_config = configparser .ConfigParser (interpolation = None )
218218 binpkg_config_ini = str (Path (tmp_path ) / "Eigen/config.ini" )
@@ -233,7 +233,13 @@ def EigenFwDownload(self):
233233
234234 binpkg_config .set ('flexfile4' , 'filepath' , str (Path (tmp_path ) / "fw/customer_fs.bin" ))
235235 binpkg_config .set ('flexfile4' , 'burnaddr' , customer_fs_addr )
236+
236237 if File_Count == 4 :
238+ customer_backup_fs_addr = config .get ('File_4' , 'START_ADDR' )
239+ customer_backup_fs_max = config .get ('File_4' , 'MAX_SIZE' )
240+ flexfile5 = customer_backup_fs_addr + " " + customer_backup_fs_max
241+ extra ['flexfile5' ] = flexfile5
242+
237243 binpkg_config .set ('flexfile5' , 'filepath' ,
238244 str (Path (tmp_path ) / "fw/customer_backup_fs.bin" ))
239245 binpkg_config .set ('flexfile5' , 'burnaddr' , customer_backup_fs_addr )
@@ -247,15 +253,6 @@ def EigenFwDownload(self):
247253 with open (binpkg_config_ini , "w+" , encoding = 'utf-8' ) as f :
248254 binpkg_config .write (f )
249255
250- extra = dict (
251- File_Count = File_Count ,
252- flexfile2 = flexfile2 ,
253- flexfile3 = flexfile3 ,
254- flexfile4 = flexfile4 ,
255- )
256- if File_Count == 4 :
257- extra .update (dict (flexfile5 = flexfile5 ))
258-
259256 return self .fw_download (
260257 str (Path (tmp_path ) / "Eigen/flashtoolcli1.exe" ),
261258 str (Path (tmp_path ) / "fw" / self .fw_filepath .name ),
0 commit comments