OpenBLT: startup: invalidate only DFU breadcumb from startup code

Same location (but different seed) is used for shared param's
signature in OpenBLT.
This commit is contained in:
Andrey Gusakov 2022-08-06 01:50:36 +03:00
parent a34a0e6c9c
commit 6b064714b9
2 changed files with 6 additions and 2 deletions

View File

@ -64,8 +64,10 @@ Reset_Handler:
LDR R0, =0x2001FFF0 // End of SRAM for your CPU
LDR R1, =0xDEADBEEF // magic value
LDR R2, [R0, #0]
STR R0, [R0, #0] // Invalidate
CMP R2, R1
ITT EQ
LDREQ R1, =0x00000000
STREQ R1, [R0, #0] // Invalidate
BEQ UseDFU
// DFU bootloader not needed, continue with OpenBLT

View File

@ -80,8 +80,10 @@ Reset_Handler:
LDR R0, =0x2001FFF0 // End of SRAM for your CPU
LDR R1, =0xDEADBEEF // magic value
LDR R2, [R0, #0]
STR R0, [R0, #0] // Invalidate
CMP R2, R1
ITT EQ
LDREQ R1, =0x00000000
STREQ R1, [R0, #0] // Invalidate
BEQ UseDFU
// DFU bootloader not needed, continue with OpenBLT