Print flash address

This commit is contained in:
Ben V. Brown 2023-08-01 17:50:55 +10:00
parent 342a43b071
commit 6724a9c682
3 changed files with 5 additions and 6 deletions

View File

@ -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);

View File

@ -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;
}

View File

@ -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,