From c81badaafa5a4099bea6d1a1cca4d7199ca08326 Mon Sep 17 00:00:00 2001 From: MCUdude Date: Tue, 26 May 2026 20:29:41 +0200 Subject: [PATCH 1/2] Tweak certain error messages for better formatting and cleaner output --- src/micronucleus.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/micronucleus.c b/src/micronucleus.c index 6a5162dc..3ad3440d 100644 --- a/src/micronucleus.c +++ b/src/micronucleus.c @@ -272,14 +272,14 @@ static int micronucleus_get_bootloader_info(struct pdata *pdata) { } static void micronucleus_dump_device_info(struct pdata *pdata) { - pmsg_notice("Bootloader version: %d.%d\n", pdata->major_version, pdata->minor_version); - imsg_notice("Available flash size: %u\n", pdata->flash_size); - imsg_notice("Page size: %u\n", pdata->page_size); - imsg_notice("Bootloader start: 0x%04X\n", pdata->bootloader_start); - imsg_notice("Write sleep: %ums\n", pdata->write_sleep); - imsg_notice("Erase sleep: %ums\n", pdata->erase_sleep); - imsg_notice("Signature1: 0x%02X\n", pdata->signature1); - imsg_notice("Signature2: 0x%02X\n", pdata->signature2); + pmsg_notice("Bootloader version : %d.%d\n", pdata->major_version, pdata->minor_version); + imsg_notice("Available flash size : %u\n", pdata->flash_size); + imsg_notice("Page size : %u\n", pdata->page_size); + imsg_notice("Bootloader start addr : 0x%04X\n", pdata->bootloader_start); + imsg_notice("Write sleep : %ums\n", pdata->write_sleep); + imsg_notice("Erase sleep : %ums\n", pdata->erase_sleep); + imsg_notice("Signature1 : 0x%02X\n", pdata->signature1); + imsg_notice("Signature2 : 0x%02X\n", pdata->signature2); } static int micronucleus_erase_device(struct pdata *pdata) { @@ -636,7 +636,7 @@ static int micronucleus_open(PROGRAMMER *pgm, const char *port) { if(!micronucleus_is_device_responsive(pdata, device)) { if(show_unresponsive_device_message) { - pmsg_warning("unresponsive Micronucleus device detected, please reconnect ...\n"); + msg_warning("\nUnresponsive Micronucleus device detected, please reconnect ...\n"); show_unresponsive_device_message = false; } @@ -669,12 +669,12 @@ static int micronucleus_open(PROGRAMMER *pgm, const char *port) { if(pdata->usb_handle == NULL && pdata->wait_until_device_present) { if(show_retry_message) { if(pdata->wait_timout < 0) { - pmsg_error("no device found, waiting for device to be plugged in ...\n"); + msg_info("No device found, waiting for device to be plugged in ...\n"); } else { - pmsg_error("no device found, waiting %d seconds for device to be plugged in ...\n", pdata->wait_timout); + msg_info("No device found, waiting %d seconds for device to be plugged in ...\n", pdata->wait_timout); } - pmsg_error("press CTRL-C to terminate\n"); + msg_info("Press CTRL-C to terminate\n\n"); show_retry_message = false; } @@ -719,7 +719,7 @@ static int micronucleus_read_byte(const PROGRAMMER *pgm, const AVRPART *p, const *value = 0xFF; return 0; } else { - pmsg_notice("reading not supported for %s memory\n", mem->desc); + pmsg_notice2("reading not supported for %s memory\n", mem->desc); return -1; } } From 9e87c7ac4556a5f88f9fbdce5f5263134b193a41 Mon Sep 17 00:00:00 2001 From: MCUdude Date: Fri, 12 Jun 2026 20:06:48 +0200 Subject: [PATCH 2/2] Replace capital letters with non-capital ones --- src/micronucleus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/micronucleus.c b/src/micronucleus.c index 3ad3440d..b2fc2c38 100644 --- a/src/micronucleus.c +++ b/src/micronucleus.c @@ -669,12 +669,12 @@ static int micronucleus_open(PROGRAMMER *pgm, const char *port) { if(pdata->usb_handle == NULL && pdata->wait_until_device_present) { if(show_retry_message) { if(pdata->wait_timout < 0) { - msg_info("No device found, waiting for device to be plugged in ...\n"); + pmsg_info("no device found, waiting for device to be plugged in ...\n"); } else { - msg_info("No device found, waiting %d seconds for device to be plugged in ...\n", pdata->wait_timout); + pmsg_info("no device found, waiting %d seconds for device to be plugged in ...\n", pdata->wait_timout); } - msg_info("Press CTRL-C to terminate\n\n"); + pmsg_info("press CTRL-C to terminate\n\n"); show_retry_message = false; }