File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,25 +18,28 @@ impl CommandInstall for TockloaderConnection {
1818 let app_attributes_list: Vec < AppAttributes > = self . list ( settings) . await . unwrap ( ) ;
1919 let mut tock_app_list = app_attributes_list
2020 . iter ( )
21- . map ( |app| TockApp :: from_app_attributes ( app , settings ) )
21+ . map ( TockApp :: from_app_attributes)
2222 . collect :: < Vec < TockApp > > ( ) ;
2323
2424 // obtain the binaries in a vector
2525 let mut app_binaries: Vec < Vec < u8 > > = Vec :: new ( ) ;
2626
27- for app in tock_app_list. iter ( ) {
28- app_binaries. push ( app. clone ( ) . read_binary ( self ) . await . unwrap ( ) )
27+ let mut address = settings. start_address ;
28+ for app in app_attributes_list. iter ( ) {
29+ app_binaries. push (
30+ self . read ( address, app. tbf_header . total_size ( ) as usize )
31+ . await
32+ . unwrap ( ) ,
33+ ) ;
34+ address += app. tbf_header . total_size ( ) as u64 ;
2935 }
3036
3137 let mut app = TockApp :: from_tab ( & tab, settings) . unwrap ( ) ;
3238
3339 app. replace_idx ( tock_app_list. len ( ) ) ;
3440 tock_app_list. push ( app. clone ( ) ) ;
3541
36- app_binaries. push (
37- tab. extract_binary ( settings. arch . as_ref ( ) . unwrap ( ) . as_str ( ) )
38- . unwrap ( ) ,
39- ) ;
42+ app_binaries. push ( tab. extract_binary ( settings. arch . clone ( ) . unwrap ( ) ) . unwrap ( ) ) ;
4043
4144 let configuration = reshuffle_apps ( settings, tock_app_list) . unwrap ( ) ;
4245
You can’t perform that action at this time.
0 commit comments