Due appears as COM6 port but gives error "No device found on COM6" on upload

SOLVED

You need to do three very simple things after connecting the Programming port with the computer/laptop :

  1. Press the erase button for about 3 seconds.
    2.Press the reset button.
  2. Upload the code.

You need to do this every time you want to upload a sketch. Everything else will hopefully work fine after that.

P.s : I think the problem is the board is not erasing the data pre-written or something.
And it is all done. Tried , tested , worked. Cheers !
--Rishi