# Using bootloader # To enter bootloader, connect the board to the computer and connect briefly the GND and RST pins. # Some boards may require this connection to be done twice. # When the bootloader is running, a virtual serial connection is created and so we can read/write to the device # Checking connection and fuses avrdude -c avr109 -p m32u4 -P /dev/ttyACM0 -n # It should write something like the example below # Connecting to programmer: . # Found programmer: Id = "CATERIN"; type = S # Software Version = 1.0; No Hardware Version given. # Programmer supports auto addr increment. # Programmer supports buffered memory access with buffersize=128 bytes. # Programmer supports the following devices: # Device code: 0x44 # avrdude: AVR device initialized and ready to accept instructions # Reading | ################################################## | 100% 0.00s # avrdude: Device signature = 0x1e9587 (probably m32u4) # avrdude: safemode: Fuses OK (E:FB, H:D8, L:FF) # avrdude done. Thank you. # Explaining the command: # -c avr109 set the programer as avr109. It's the protocol which will be used # -p m32u4 set the target, which is an atmega32u4 # -P /dev/ttyACM0 set the serial port. On Windows it would be something like COM1, COM7, etc... # -n disables any writes, it's safe option # I don't know if my clone Pro Micro had a issue of I bricked it somehow, but I couldn't write to it by just using the reset to bootloader # So another solution was flashing it using a ISP programmer. I have a Uno R3 and after some research I discovered that I could use it as ISP. # Arduino UNO R3 as ISP # You can find more details about wiring and flashing the ISP here: https://docs.arduino.cc/built-in-examples/arduino-isp/ArduinoISP/#use-arduino-as-isp # To flash the Pro Micro through the Uno R3 ISP, use this command. caterina.hex is the binary you want to flash. avrdude -v -p m32u4 -P /dev/ttyUSB0 -c stk500v1 -b 19200 -U flash:w:caterina.hex:i -U lfuse:w:0xff:m -U hfuse:w:0xd8:m -U efuse:w:0xfb:m # Arduino UNO R3 has an autoreset feature which resets the device when a serial connection is opened, so avrdude will fail because Arduino will be reseting and not ready. # To prevent this, one option to use a capacitor in some pins (google it, dont remember) or cut some traces on the board. # In Linux there's a simple option. It's possible to use the following command stty -F /dev/ttyUSB0 -hupcl # It will prevent the autoreset by not sending the hangup (something like that, I dont understand much about serial connections). # After this command you can use the avrdude command above.