Skip to content

Commit e9b3080

Browse files
committed
fix: add error handling for wrong tbf file
Signed-off-by: addrian-77 <lunguadrian30@gmail.com>
1 parent 13a99f5 commit e9b3080

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tockloader-lib/src/command_impl/probers/reshuffle_apps.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,10 @@ fn reconstruct_app(tab: &Option<Tab>, settings: &BoardSettings) -> Option<AppAtt
409409
// log::info!("escaped loop?");
410410
return Some(AppAttributes::new(
411411
if let Some(addr) = header.get_fixed_address_flash() {
412+
if addr < settings.start_address as u32 {
413+
// this rust app should not be here
414+
panic!("This rust app starts at {addr:#x}, while the board's start_address is {:#x}", settings.start_address)
415+
}
412416
addr as u64
413417
} else {
414418
settings.start_address

0 commit comments

Comments
 (0)