(YA) No serial ports products that simply work & attempt to inspire easier dbug

My question: Leonardo programmes well repeatedly, then suddenly disappears from serial ports on win7-64 & does not come back after working many times previously. Suggestions? Does this suggest a corrupted leonardo? Other possibilities? Any suggestions of fixes?
.
Thanks in advance.
.
I find so many questions, pages & so, so many views for "can't see arduino" or ""port is grey/gray".
So many different answers. So many - reload, reinstall, so much trial & error, superstition & just plain witchcraft/black arts. I know, with random systems or chaotic systems, coincidence naturally leads to superstition, but these are deterministic, right?
.
I so pine for systems that JUST WORK & keep working. For those of you who know these (arduino/drivers &c) systems I would so motivate you to just fix it.
.
Maybe, some definitive (shared?) chart of what to check & how to check, sans superstition. And as a bonus, actual simple, methods to check, preferred over long sequences of try restoring windows to the last restore point before the update & well, just see it it helps. Arh, to have infinite time.
.
My situation: any advice welcomed.
.
Win 7, 64 bit, older machine.
Adafruit HELLA - contains a leonardo.
Works fine through arduino & visual studio (community)+visual micro.
programming simple stuff, a few classes (no serial port programming)
.
then it stops responding. cannot upload - cannot find leonardo on com9
unplug arduino - usb cable - & replug - no change
[Green & orange LEDS light & stay on.] - no flashing.
.
Reset the leonardo - no change
.
arduino - IDE shows grey (gray) "Port"
.
All those just select the right port answers - no chance.
Reload IDE - no change
load newest IDE - no change
.
Control panel - system - device manager ..... no ports .. all those look under XXXX answers - no chance
There is not "ports" No comm & lpt
no other
Nothing under USB - there are no serial ports, virtual or otherwise.
.
Reload the FDTI? 4-letters - CDM_v2.12.00_WHQL_Certified.exe no change
find CDM v2.12.04 WHQL Certified.exe
install - no change
.
new USB cable - no change.
.
reboot/restart PC - no change.
.
Last time it happened, I spent hours & concluded that I'd (I?) killed the boot loader. Read up on re-loading? the loader - seemed complicated [also leonardo is inside the HELLA]
.
But, just leave it a while - like days?
.
try it again - all fine.
.
I remind myself that these are deterministic systems.
.
shutdown - PC.
power off.

restart
.
This has happened before. Each time - I just walk off in disgust & some days later - try it & it just works.
This - time - no idea.
.
Plug in a fresh UNO, straight from the sealed packet, different usb cable, of course as it's got the B connector.
Now I have Ports (COM & LPT)
. USB-SERIAL CH340(COM11)
.
plug the leonardo in - no extras appear
.
I'll try the spare Leonardo later, but no time now.
.
Web search yields many negative comments about "leonardo" as different - all of them incomprehensible.
.
The random/Google search for solutions is chaotic. So many 1,000s of hours collectively lost to trying solutions that are useless to their issue.
.
(1) a clear, suggested path, chart of a sequence or sequences of debugging tests
(2) Good tools to determine the problem & indicate a fix
(3) Stuff that just works?
.
My question: Leonardo programmes well repeatedly, then suddenly disappears from serial ports on win7-64 & does not come back after working many times previously. Suggestions? Does this suggest a corrupted leonardo? Other possibilities? Any suggestions of fixes?

So, I find that I can get it back - communication - upload - &c. - if I follow the leonardo suggestions for being
.
Press & hold reset, until the IDE is ready to upload - wait till after compile, till is explains memory use & such, ......
Then release
Windows suddenly sees the device again & all things work, blink, &c.
.
Uploading & running my last/most recent programme (script?) will again render it incommunicado, break it.
The IDE will then not bring it back without the carefully-timed manual reset assist.
.
(Manually pressing reset is less than easy when it's built into a device :frowning: )
.
Anyone know what it is that's happening?
Anyone shed light on what I am looking for in my nearly-trivial programme that's causing the problem?
.
Any suggestions/insights welcomed.

I think Leonardo is a beautiful machine, but it does have caveats. A seemingly trivial sketch can still do things which jeopardize the USB communications, perhaps disabling interrupts, or running out of memory, or something like that. Or using MIDI, mouse, or keyboard stuff is often disruptive.

Uno, Mega, Pro Mini, and other Arduinos which don't have ATmega32U4 processors, offload the USB-to-serial work to another chip or processor. Even during a main processor reset or sketch malfunction, USB and serial is still available for stuff like uploading sketches and serial monitor debugging.

Now I don't have HELLA experience, so I am going to try offering what little insight I can. It appears from what I read on the Adafruit website the whole point of a HELLA is to do MIDI over USB. So I speculate that your MIDI activities on that Leonardo are probably causing your USB-serial debug and upload disruption.

You could probably upload sketches using an ISP programmer to completely bypass the USB issue, and do your debug/serial monitor activities through Serial1 which is the RX and TX pins on the Leonardo. Connect to them with an FTDI or bluetooth adapter. That would offload the USB-to-serial work which may make it more reliable and it would be more of an UNO-like experience. Meanwhile you would still be able to use the Leo USB port to do the MIDI stuff.

If that ends up improving your experience, you could try changing your bootloader to Optiboot, and upload your sketches through the FTDI interface. You would have 2 USB ports, the Leo onboard one for MIDI and the FTDI one for sketch upload and serial monitor.

dmjlambert Many thanks for your insight.
As I said, I have not serial use in the programme.
I have no use of usb, serial port, midi, or other things that one would expect might upset the connection to the PC.
.
I know. HELLA was demo-ed as MIDI. It never worked. Something between 1,?.? & 1.6.? & the teensy library :frowning:
Am now just using it as a really interesting UI for clock &c. &c..
.
The only common threads, I've seen are .
(1) People mention using too much ram -
(2) Yet another new guy asking "no serial ports are listed"? - oh, wait, it started working again. (?)
.
I was interested to determine things can ACTUALLY cause such an issue. Many thanks, I will look into ram use.
.
It seems that the new revolution of arduino, pi, beaglebone &c. &c & so many modules on easy-to-use I2C has fueled a new interest/capability in electronics & controllers. More & more people come with enthusiasm to the frustrating swamp of speculation, guesswork & superstition. I suggest that the community would benefit from more like yourself helping to drain the swamp.
.
I totally understand the motivation is to move on as soon as things work.
.
Perhaps, I'll try a start & hope that people better suited take up putting it right.
Many thanks to those who help/share expertise on the forum.
.
Info so far
Serial comes & goes
(1) Is it a leonardo? [They are different] - try the 8-second thing: reset till the IDE is uploading. (Google it)
(2) Check ran use [ref to how?] Memory allocation inside loop()?

nanren888:
dmjlambert
Perhaps, I'll try a start & hope that people better suited take up putting it right.
Many thanks to those who help/share expertise on the forum.
.
Info so far
Serial comes & goes
(1) Is it a leonardo? [They are different] - try the 8-second thing: reset till the IDE is uploading. (Google it)
(2) Check ran use [ref to how?] Memory allocation inside loop()?

I followed some advise on adafruit site - Device manager - View menu option - show hidden devices. Spent countless hours farting around to no avail. I have a better idea what's happening but no way to fix it! And I seem to have USB matters worse!

Perhaps, I'll try a start & hope that people better suited take up putting it right.
Many thanks to those who help/share expertise on the forum.

Seems like Arduino is rapidly increasing in prominence hopefully they will fix it
.