File tree Expand file tree Collapse file tree 3 files changed +4885
-6
lines changed Expand file tree Collapse file tree 3 files changed +4885
-6
lines changed Original file line number Diff line number Diff line change @@ -379,7 +379,7 @@ async function download(): Promise<void> {
379379 logWarning ( "Failed to clear status" ) ;
380380 }
381381
382- let process = webdfu . write ( transferSize , firmwareFile , manifestationTolerant ) ;
382+ const process = webdfu . write ( transferSize , firmwareFile , manifestationTolerant ) ;
383383
384384 // Erase
385385 process . events . on ( "erase/start" , ( ) => {
@@ -413,7 +413,9 @@ async function download(): Promise<void> {
413413 . then ( ( status ) => {
414414 logInfo ( `Final DFU status: state=${ status . state } , status=${ status . status } ` ) ;
415415 } )
416- . catch ( ( ) => { } ) ;
416+ . catch ( ( error ) => {
417+ logError ( error ) ;
418+ } ) ;
417419 } ) ;
418420
419421 process . events . on ( "error" , ( error ) => {
Original file line number Diff line number Diff line change @@ -746,7 +746,7 @@ export class WebDFU {
746746 }
747747
748748 this . log . warning ( "Using inferred start address 0x" + startAddress . toString ( 16 ) ) ;
749- } else if ( this . getDfuseSegment ( startAddress ) === null ) {
749+ } else if ( this . getDfuseSegment ( startAddress ) === null && data . byteLength !== 0 ) {
750750 throw new WebDFUError ( `Start address 0x${ startAddress . toString ( 16 ) } outside of memory map bounds` ) ;
751751 }
752752
You can’t perform that action at this time.
0 commit comments