Please bear with me …
Initially … because I didn’t want to deal with having to program a bootloader (believing that to be the most convenient option) on a ATMEGA32U4, I purchased a Sparkfun ProMicro and uploaded my sketch via the USB port … everything worked fine. I then de-soldered the IC and re-soldered it onto on own board (because I wanted a smaller form-factor), complete with an LED that flashed (which was part of the original code), to see if everything was OK with the build process on my new board … LED flashed just fine (so far so good). Then I figured I could upload a modified version of the sketch … but the Port was grayed out.
One explanation for this is a “bricked” IC (per Sparkfun website) so assuming that this was the case I followed the “double reset” process discussed on the Sparkfun site … i.e. activate reset once and the code starts executing 750ms after releasing the reset … activate reset twice in quick succession and pause the code execution for 8 seconds … during which time the Port should be available (i.e. you have 8 seconds to upload the sketch across the USB) … however, the Port was still grayed out during this 8 second period. I know that I was successful at executing the double reset procedure because after the double reset it would take about 8 seconds before my LED started blinking … after a single reset, about 1 second.
I think the build was good, my LED was blinking as expected (for starters) and I used a stainless stencil to put down the paste for the ATMEGA32U4, which on the Pro Micro is a QFN package … I mention that is case some of you were wondering if I had tried to hand solder the part (beyond me, at least).
Still … not trusting myself, I programmed another Pro Micro, as before … sketch working, de-soldered part, re-soldered on new board, LED flashing … Port grayed out … double reset, Port still grayed out … Arrgh.
Wondering whether the act of reflowing the ProMicro’s IC on my board had somehow bricked the part (totally grasping at straws, but it seemed like the only viable variable) … I abandoned re-purposing another off the shelf ProMicro and instead designed another version of my own board … this time breaking out MISO, MOSI, SCLK RST, VCC and GND to a header so that I could build my board with a blank ATMEGA32U4 (Digikey) and then burn the Leonardo bootloader using an Arduino R3 as the ISP (apparently, the stock Leonardo bootloader has that 8 second delay, by default … not an issue for my application).
To my delight, with my board only connected to the R3, I was able to successfully program the Leonardo bootloader … at least the Arduino IDE said that the bootloader had been programmed successfully. I disconnected the R3 and then plugged my bootloaded board into the USB … the Port icon was gray. I reset the part hoping that the Port would come alive for those 8 seconds, but no.
Any thoughts from the community would be appreciated.
I’ve attached the schematic of my second board in case anyone can see any issues with it.