diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 211bf644..09325387 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,10 +5,12 @@ lib_xua Change Log ----- * ADDED: Application note AN00246 + * CHANGE: xmosdfu emits warning if empty image read via upload * RESOLVED: Runtime exception issues when incorrect feedback calculated - (introduced in sc_xud 6.13) + (introduced in sc_usb_audio 6.13) * RESOLVED: Output sample counter reset on stream start. Caused playback issues on some Linux based hosts + 0.1.1 ----- diff --git a/host/xmosdfu/xmosdfu.cpp b/host/xmosdfu/xmosdfu.cpp index a0aca676..44093a0f 100644 --- a/host/xmosdfu/xmosdfu.cpp +++ b/host/xmosdfu/xmosdfu.cpp @@ -307,8 +307,15 @@ int read_dfu_image(char *file) { unsigned int numBytes = 0; numBytes = dfu_upload(0, block_count, 64, block_data); + /* Upload is completed when dfu_upload() returns an empty block */ if (numBytes == 0) { + /* If upload is complete, but no block has been read, + issue a warning about the upgrade image + */ + if (block_count==0) { + printf("... WARNING: Upgrade image size is 0: check if image is present in the flash\n"); + } break; } fwrite(block_data, 1, block_size, outFile); @@ -338,8 +345,8 @@ static void print_usage(const char *program_name, const char *error_msg) print_device_list(stderr, " "); fprintf(stderr, " And COMMAND is one of:\n"); - fprintf(stderr, " --download : install a new firmware\n"); - fprintf(stderr, " --upload : extract a firmware image\n"); + fprintf(stderr, " --download : write an upgrade image\n"); + fprintf(stderr, " --upload : read the upgrade image\n"); fprintf(stderr, " --revertfactory : revert to the factory image\n"); fprintf(stderr, " --savecustomstate : \n"); fprintf(stderr, " --restorecustomstate : \n");