mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-12-02 03:45:55 +08:00
halt on an unknown board before current_board is used (#2500)
This commit is contained in:
committed by
firestar5683
parent
b3095eaaff
commit
18ce6dbe3f
@@ -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);
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user