From 18ce6dbe3f1233dae8effa39552d61728e59fb1b Mon Sep 17 00:00:00 2001 From: Daniel Koepping Date: Sat, 28 Nov 2026 11:50:18 -0600 Subject: [PATCH] halt on an unknown board before current_board is used (#2500) --- panda/board/main.c | 3 --- panda/board/stm32h7/board.h | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/panda/board/main.c b/panda/board/main.c index 975c97c2a6..a33d767467 100644 --- a/panda/board/main.c +++ b/panda/board/main.c @@ -376,9 +376,6 @@ int main(void) { // print hello print("\n\n\n************************ MAIN START ************************\n"); - // check for non-supported board types - assert_fatal(hw_type != HW_TYPE_UNKNOWN, "Unsupported board type"); - print("Config:\n"); print(" Board type: 0x"); puth(hw_type); print("\n"); print(" MCU UID: "); hexdump((const uint8_t *)UID_BASE, 12); diff --git a/panda/board/stm32h7/board.h b/panda/board/stm32h7/board.h index 953ae57faa..86491b4ff3 100644 --- a/panda/board/stm32h7/board.h +++ b/panda/board/stm32h7/board.h @@ -47,6 +47,8 @@ void detect_board_type(void) { current_board = &board_tres; } else { hw_type = HW_TYPE_UNKNOWN; - print("Hardware type is UNKNOWN!\n"); } + + // check for non-supported board types + assert_fatal(hw_type != HW_TYPE_UNKNOWN, "Unsupported board type\n"); }