From 6724a9c6829bfcb12d3e5eef4c3d66e90acb07e3 Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Tue, 1 Aug 2023 17:50:55 +1000 Subject: [PATCH] Print flash address --- tools/blisp/src/cmd/write.c | 4 ++-- tools/blisp/src/file_parsers/get_file_contents.c | 3 +-- tools/blisp/src/file_parsers/parse_file.c | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tools/blisp/src/cmd/write.c b/tools/blisp/src/cmd/write.c index 1da75a3..9c3548b 100644 --- a/tools/blisp/src/cmd/write.c +++ b/tools/blisp/src/cmd/write.c @@ -192,7 +192,7 @@ blisp_return_t blisp_flash_firmware() { // Create a default boot header section in ram to be written out struct bfl_boot_header boot_header; fill_up_boot_header(&boot_header); - printf("Erasing flash to flash boot header\r\n"); + printf("Erasing flash to flash boot header\n"); ret = blisp_device_flash_erase(&device, 0x0000, sizeof(struct bfl_boot_header)); if (ret != BLISP_OK) { @@ -226,7 +226,7 @@ blisp_return_t blisp_flash_firmware() { goto exit2; } - printf("Flashing the firmware...\n"); + printf("Flashing the firmware @ 0x%08X...\n", parsed_file.payload_address); struct blisp_easy_transport data_transport = blisp_easy_transport_new_from_memory(parsed_file.payload, parsed_file.payload_length); diff --git a/tools/blisp/src/file_parsers/get_file_contents.c b/tools/blisp/src/file_parsers/get_file_contents.c index 349515b..14732bf 100644 --- a/tools/blisp/src/file_parsers/get_file_contents.c +++ b/tools/blisp/src/file_parsers/get_file_contents.c @@ -16,8 +16,7 @@ ssize_t get_file_contents(const char* file_path_on_disk, f = fopen(file_path_on_disk, "rb"); if (f <= 0) { - fprintf(stderr, "Could not open file %s for reading\r\n", - file_path_on_disk); + fprintf(stderr, "Could not open file %s for reading\n", file_path_on_disk); return -1; } diff --git a/tools/blisp/src/file_parsers/parse_file.c b/tools/blisp/src/file_parsers/parse_file.c index ab56bc9..65b881e 100644 --- a/tools/blisp/src/file_parsers/parse_file.c +++ b/tools/blisp/src/file_parsers/parse_file.c @@ -16,13 +16,13 @@ int parse_firmware_file(const char* file_path_on_disk, const char* ext = get_filename_ext(file_path_on_disk); int res = PARSED_ERROR_INVALID_FILETYPE; if (strncmp(ext, "dfu", 3) == 0 || strncmp(ext, "DFU", 3) == 0) { - printf("Input file identified as a .dfu file\r\n"); + printf("Input file identified as a .dfu file\n"); // Handle as a .dfu file res = dfu_file_parse(file_path_on_disk, &parsed_results->payload, &parsed_results->payload_length, &parsed_results->payload_address); } else if (strncmp(ext, "bin", 3) == 0 || strncmp(ext, "BIN", 3) == 0) { - printf("Input file identified as a .bin file\r\n"); + printf("Input file identified as a .bin file\n"); // Raw binary file res = bin_file_parse(file_path_on_disk, &parsed_results->payload, &parsed_results->payload_length,