Skip to content

Commit c637aa2

Browse files
sandeepmistryfacchinm
authored andcommitted
[bootloader] fail fast if JTAG init fails
1 parent e58f0eb commit c637aa2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bootloaders/zero/sam_ba_monitor.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,11 @@ static void sam_ba_monitor_loop(void)
443443
#ifdef ENABLE_JTAG_LOAD
444444

445445
if ((uint32_t)dst_addr == 0x40000) {
446-
jtagInit();
446+
if (jtagInit() != 0) {
447+
// fail!
448+
sam_ba_putdata( ptr_monitor_if, "y\n\r", 3);
449+
return;
450+
}
447451

448452
// content of the first flash page:
449453
// offset (32) : length(32) : sha256sum(256) : type (32) : force (32) = 48 bytes

0 commit comments

Comments
 (0)