Sometimes, when you have the error message "No device on COM port ", you can solve the issue this way:
1/ push the erase button for 3 seconds, then the reset button for 3 seconds, select the correct COM port and upload your sketch.
2/ If there is still the error message, go to:
Menu>File>preferences. At the bottom of the Preferences window, there is an URL C:\Users\yourname\AppData.... click on this URL then select :
packages > arduino>hardware>sam and delete the sam folder.
Then go back to the IDE window, and select Menu>Tools>Type of board>board manager
In Arduino Sam boards (32-bits ARM Cortex M3) select More info, and select and install the last Sam version.
Close the IDE window and reopen the IDE window. Now the error message should have disappeard, select the correct COM port and the arduino DUE board, upload your sketch.