chg: flashing - test messages

This commit is contained in:
iceman1001 2019-07-30 19:22:24 +02:00
commit 6d1c996251

View file

@ -378,12 +378,12 @@ static int wait_for_ack(PacketResponseNG *ack) {
}
static void flash_suggest_update_bootloader(void) {
PrintAndLogEx(ERR, _RED_("It is recommended that you first update your bootloader alone,"));
PrintAndLogEx(ERR, _RED_("It is recommended that you first" _YELLOW_("update your bootloader") " alone,"));
PrintAndLogEx(ERR, _RED_("reboot the Proxmark3 then only update the main firmware") "\n");
}
static void flash_suggest_update_flasher(void) {
PrintAndLogEx(ERR, _RED_("It is recommended that you first update your flasher"));
PrintAndLogEx(ERR, _RED_("It is recommended that you first" _YELLOW_("update your flasher") ));
}
// Go into flashing mode
@ -413,18 +413,22 @@ int flash_start_flashing(int enable_bl_writes, char *serial_port_name, uint32_t
if ((BL_VERSION_MAJOR(version) < BL_VERSION_FIRST_MAJOR) || (BL_VERSION_MAJOR(version) > BL_VERSION_LAST_MAJOR)) {
// version info seems fishy
version = BL_VERSION_INVALID;
PrintAndLogEx(ERR, _RED_("====================== OBS ! ==========================="));
PrintAndLogEx(ERR, _RED_("Note: Your bootloader reported an invalid version number"));
flash_suggest_update_bootloader();
//
} else if (BL_VERSION_MAJOR(version) < BL_VERSION_MAJOR(FLASHER_VERSION)) {
PrintAndLogEx(ERR, _RED_("====================== OBS ! ==================================="));
PrintAndLogEx(ERR, _RED_("Note: Your bootloader reported a version older than this flasher"));
flash_suggest_update_bootloader();
} else if (BL_VERSION_MAJOR(version) > BL_VERSION_MAJOR(FLASHER_VERSION)) {
PrintAndLogEx(ERR, _RED_("====================== OBS ! ========================="));
PrintAndLogEx(ERR, _RED_("Note: Your bootloader is more recent than this flasher"));
flash_suggest_update_flasher();
}
} else {
PrintAndLogEx(ERR, _RED_("Note: Your bootloader does not understand the new CMD_BL_VERSION command"));
PrintAndLogEx(ERR, _RED_("====================== OBS ! ==========================================="));
PrintAndLogEx(ERR, _RED_("Note: Your bootloader does not understand the new" _YELLOW_("CMD_BL_VERSION") " command"));
flash_suggest_update_bootloader();
}
@ -436,6 +440,7 @@ int flash_start_flashing(int enable_bl_writes, char *serial_port_name, uint32_t
PrintAndLogEx(NORMAL, "Available memory on this board: %uK bytes\n", mem_avail);
if (mem_avail > 256) {
if (BL_VERSION_MAJOR(version) < BL_VERSION_MAJOR(BL_VERSION_1_0_0)) {
PrintAndLogEx(ERR, _RED_("====================== OBS ! ======================"));
PrintAndLogEx(ERR, _RED_("Your bootloader does not support writing above 256k"));
flash_suggest_update_bootloader();
} else {
@ -445,7 +450,8 @@ int flash_start_flashing(int enable_bl_writes, char *serial_port_name, uint32_t
}
} else {
PrintAndLogEx(NORMAL, "Available memory on this board: "_RED_("UNKNOWN")"\n");
PrintAndLogEx(ERR, _RED_("Note: Your bootloader does not understand the new CHIP_INFO command"));
PrintAndLogEx(ERR, _RED_("====================== OBS ! ======================================"));
PrintAndLogEx(ERR, _RED_("Note: Your bootloader does not understand the new" _YELLOW_("CHIP_INFO") " command"));
flash_suggest_update_bootloader();
}
@ -464,7 +470,8 @@ int flash_start_flashing(int enable_bl_writes, char *serial_port_name, uint32_t
}
return wait_for_ack(&resp);
} else {
PrintAndLogEx(ERR, _RED_("Note: Your bootloader does not understand the new START_FLASH command"));
PrintAndLogEx(ERR, _RED_("====================== OBS ! ========================================"));
PrintAndLogEx(ERR, _RED_("Note: Your bootloader does not understand the new" _YELLOW_("START_FLASH") " command"));
flash_suggest_update_bootloader();
}
return 0;