stm32/boards: Allow OpenOCD stm_flash procedure to accept single FW img.
To support deplop-openocd on target boards that use TEXT0_ADDR only and have their firmware in a single binary image.
This commit is contained in:
parent
d4d4bc5827
commit
59f409a787
@ -17,7 +17,7 @@ source [find target/stm32f4x.cfg]
|
||||
reset_config srst_only
|
||||
init
|
||||
|
||||
proc stm_flash { BIN0 ADDR0 BIN1 ADDR1 } {
|
||||
proc stm_flash { BIN0 ADDR0 {BIN1 ""} {ADDR1 ""} } {
|
||||
reset halt
|
||||
sleep 100
|
||||
wait_halt 2
|
||||
@ -25,10 +25,12 @@ proc stm_flash { BIN0 ADDR0 BIN1 ADDR1 } {
|
||||
sleep 100
|
||||
verify_image $BIN0 $ADDR0
|
||||
sleep 100
|
||||
flash write_image erase $BIN1 $ADDR1
|
||||
sleep 100
|
||||
verify_image $BIN1 $ADDR1
|
||||
sleep 100
|
||||
if {$BIN1 ne ""} {
|
||||
flash write_image erase $BIN1 $ADDR1
|
||||
sleep 100
|
||||
verify_image $BIN1 $ADDR1
|
||||
sleep 100
|
||||
}
|
||||
reset run
|
||||
shutdown
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ source [find target/stm32f7x.cfg]
|
||||
reset_config srst_only
|
||||
init
|
||||
|
||||
proc stm_flash { BIN0 ADDR0 BIN1 ADDR1 } {
|
||||
proc stm_flash { BIN0 ADDR0 {BIN1 ""} {ADDR1 ""} } {
|
||||
reset halt
|
||||
sleep 100
|
||||
wait_halt 2
|
||||
@ -25,10 +25,12 @@ proc stm_flash { BIN0 ADDR0 BIN1 ADDR1 } {
|
||||
sleep 100
|
||||
verify_image $BIN0 $ADDR0
|
||||
sleep 100
|
||||
flash write_image erase $BIN1 $ADDR1
|
||||
sleep 100
|
||||
verify_image $BIN1 $ADDR1
|
||||
sleep 100
|
||||
if {$BIN1 ne ""} {
|
||||
flash write_image erase $BIN1 $ADDR1
|
||||
sleep 100
|
||||
verify_image $BIN1 $ADDR1
|
||||
sleep 100
|
||||
}
|
||||
reset run
|
||||
shutdown
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ source [find target/stm32l4x.cfg]
|
||||
reset_config srst_only
|
||||
init
|
||||
|
||||
proc stm_flash { BIN0 ADDR0 BIN1 ADDR1 } {
|
||||
proc stm_flash { BIN0 ADDR0 {BIN1 ""} {ADDR1 ""} } {
|
||||
reset halt
|
||||
sleep 100
|
||||
wait_halt 2
|
||||
@ -25,10 +25,12 @@ proc stm_flash { BIN0 ADDR0 BIN1 ADDR1 } {
|
||||
sleep 100
|
||||
verify_image $BIN0 $ADDR0
|
||||
sleep 100
|
||||
flash write_image erase $BIN1 $ADDR1
|
||||
sleep 100
|
||||
verify_image $BIN1 $ADDR1
|
||||
sleep 100
|
||||
if {$BIN1 ne ""} {
|
||||
flash write_image erase $BIN1 $ADDR1
|
||||
sleep 100
|
||||
verify_image $BIN1 $ADDR1
|
||||
sleep 100
|
||||
}
|
||||
reset run
|
||||
shutdown
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user