Arduino Due native port not recognized after a failed upload

I was uploading code on my custom arduino due board native port, on my most recent upload i accidentally yanked the usb cable on my computer mid way of the upload. now the windows does not recognize the usb port, how do i fix this issue?

Reset, Erase, and JTAG header are accessable if necessary.

Do this:

  • Plug the USB cable in to the Programming Port on your Due.
  • Tools > Board > Arduino Due (Programming Port)
  • Tools > Port > select the port of your Due
  • Sketch > Upload

After uploading a sketch via the Programming Port, you can go back to using the Native USB Port as normal.

The reason for this is that the Native USB Port is connected directly to the AT91SAM3X8E primary microcontroller on the Due. There is some code that runs in the background of the sketch that creates the USB CDC serial port. So if there is a bug in the sketch, something in the sketch prevents the USB code from running, or the program is corrupted (as was the case for you), then that USB code doesn't create the CDC serial port and you can't upload via the Native USB Port. The Programming Port is connected to an ATmega16U2 chip that acts as a dedicated USB to TTL serial adapter between your computer and the AT91SAM3X8E. So even if the program is completely broken on the AT91SAM3X8E, the Programming Port still gets a serial port and can still allow you to upload a working sketch.

pert:
Do this:

  • Plug the USB cable in to the Programming Port on your Due.

unfortunatly my custom pcb do not have a programming port, i did not include a progrramming port and its related circuits, although i could solder some wires and connect them to an arduino uno to replicate the programming port ( if that is even possible).

Is there any other way of resseting it? , i mean for sure the manufacturer of the chip surely made some way for it to be resset

Try this:

  • Plug your Due into your computer.
  • Hold the erase button for a few seconds (or if you don't have an erase button, connect PC0 to 3.3 V for a few seconds).

You should now see a new COM port in the Arduino IDE's Tools > Port menu, though it won't be labeled as "Arduino Due (Native USB Port) as normal (It will show up in Windows Device Manager as "Bossa Program Port". After you upload a sketch to that port, the board will start working normally again.

I do have the erase button.

Here is what happened:

I tried pressing the button for 10 seconds, it did not work, even before asking the question i tried pressing the erase button.
Maybe my button is soldered badly / or the leg of PC0 is soldered badly, So i check if voltage of the pin and it is 3.295 volts.
Maybe my multimeter is also crazy, so i got a wire and touch on end to 3.3v and on the other to PC0 still the computer could not recognize it.

and I was about to give up. i pressed the button one last time, IT WORKED! it worked? a ghost might be playing with me.

TLDR

Thank you good sir my problem is solved ! Although this might be troubling in the future if this happens again, it would not work that reliably. what is the requirement of erasing the chip does it only have to be HIGH ?

EDIT:
I have noticed after this that i have to manually reset the board, this might have to do that after the upload it is needed to be reset but the problem is that it will chance ports and arduino IDE cannot remotely reset it, although not a critical problem is there any way to repair this ?