halt on an unknown board before current_board is used (#2500)

This commit is contained in:
Daniel Koepping
2026-11-28 11:50:18 -06:00
committed by firestar5683
parent b3095eaaff
commit 18ce6dbe3f
2 changed files with 3 additions and 4 deletions
-3
View File
@@ -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);
+3 -1
View File
@@ -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");
}