Burning a hex file to a Pro Micro without using the Arduino IDE

I am having trouble burning a hex file on to my Sprakfun Pro Micro. I am using Ubuntu 16.04. I used the Arduino IDE to find the command I need and copied and pasted that into my Linux terminal (Changing the path to file of course). The command starts running like how it would on the IDE, however things break down when it gets to the “Connecting to programmer:” part. I realize that I need to reset my pro micro to bootloader mode, otherwise the “programmer” that gets read is some jarbled mess of what the promicro is doing.

I hooked up a switch to the ground and reset pins. When I try to reset the avrdude command just stops completely the ttyACM port that the pro micro is registered as gets changed. Do I need to re-flash the bootloader? Is there an easier way to burn a hex file?

Hi Peaches.

You’d need a hardware programmer to re-flash the bootloader, USB isn’t going to work. That being said, I don’t think your bootloader is faulty, if it was, the board probably wouldn’t work at all or at least wouldn’t take code.

I’m not sure what magic goes on inside the Arduino IDE that senses this, but bootloader in the Pro Micro has it’s own COM port and when the board switches from running sketches to running the bootloader the IDE somehow finds the new COM port, uploads code over that port, and then switches the IDE back to the original COM port. I think what you’re going to want to try is to manually put the board in bootloader just before programming and then use the bootloader COM port.