I've sold more than 20 units of SAMD21G18A driven board, including ULTRA Zero, ULTRA Zero Color, and recently ULTIMA. I received a few experience of customer having "programming port recognition on OS disappear" problem. I've thought this is hardware problem (bad soldering or... related one) but it seems not hardware problem but "A phenomenon by Atmel SMART's nature", and could find the way for recovery.
I encountered this problem with this wrong programming source (please don't try to upload..
Yeah, internal loop function is something wrong. j=0; j<8; i++ is something wrong but it does not end just wrong program but "PROGRAMMING PORT DISAPPEARED" after uploading Arduino sketch containing this code.....!!!!
It seems, MCU becomes busy for executing wrong code and does not offer USB service and as a result no way for upload sketch again!
(REMEDY 1) Plug in USB cable to board (ULTRA Zero xx) and immediately double click reset button
This procedure prevent execute code in flash and the board will wait for new code upload.
So again Port will appear. (You may notice OLED is blank if you did some OLED related graphic program). Select newly recognised port and upload "correct (non-bug) program" through USB... Of course if same program (contains some bug or wrong point) is upload again, board will lost its connection to your computer again. Please don't do the same thing twice and re-write your program or cool-down your brain by uploading LED blink...
This procedure does not require any additional equipment. Just double click immediately after plug-in USB.
(REMEDY 2) BURNING NEW bootloader by Atmel ICE
Atmel ICE is a "must-have" item for Atmel MCU programming more deeper than Arduino environment. Just connect Atmel ICE and Ultra Zero XX board as
Please check the direction of JTAG on board. Just connect and
Select "Burn Bootloader". This is all what you will need to burn "new bootloader" to ULTRA Zero XX. After selecting and waiting around 10 secs, you will see
IF "shutdown command invoked" appears, the board is now starting with newly-burned bootloader and you will see the recognised USB port. Also in this case, "program with something wrong" uploading to board will reproduce the phenomena of "programming port lost". Please check and re-write program ..!
One optional thing to do is
change the value of "NVMCTRL_BOOTPROT" from 0x07 to 0x02. But the case is not related to this value and this modification is just optional (you don't need to do it).
Indeed, MCU board with on-board debugger such as Zero Pro by Arduino.cc can avoid this problem because in any case we can upload binary through debugger port. Also, I guess, this is why Arduino.cc release only board with debugger. (.org did release non-debugger board but )