diff --git a/flasher/gdb_flasher.jlink b/flasher/gdb_flasher.jlink index 21222e9..2eb169c 100644 --- a/flasher/gdb_flasher.jlink +++ b/flasher/gdb_flasher.jlink @@ -139,7 +139,7 @@ set $Image1LoadAddr = {int}($rambuffer+0x14) set $Image2Addr = {short}($rambuffer+0x18) * 1024 if $Image1Size != 0 && $Image1Size < 0x1000000 if $Image2Addr == 0 - set $Image2Addr = $Image1Size + 32 + set $Image2Addr = $Image1Size end printf "Image1Size = %d\n", $Image1Size printf "Image1LoadAddr = 0x%08x\n", $Image1LoadAddr @@ -149,7 +149,7 @@ if $Image1Size != 0 && $Image1Size < 0x1000000 restore $arg0 binary $parms1 $Image2Addr $parms3 set $Image2Size = {int}($rambuffer) set $Image2LoadAddr = {int}($rambuffer+0x4) - if $Image2Size != 0xFFFFFFFF || $Image2Size != 0 + if $Image2Size != 0xFFFFFFFF && $Image2Size != 0 set $Image2Size = $Image2Size + 16 printf "Image2Size = %d\n", $Image2Size printf "Image2LoadAddr = 0x%08x\n", $Image2LoadAddr