Close

Using the Bus Pirate to program a Pro Mini

david-h-bronkeDavid H. Bronke wrote 02/24/2019 at 04:14 • 2 min read • Like

I had ordered a few Pro Mini knockoff boards (based on SparkFun's Pro Mini) and found that I didn't have an actual Arduino programmer around; I had been using an Arduino Nano and a DigiSpark, both of which are programmable via their built-in USB ports. I did, however, have a Bus Pirate! (and Linux, so the Avrdude Command and Udev Rule sections may not be that useful elsewhere)

Connections

Pro Mini  |  Bus Pirate
----------+------------
     GND  |  GND
     VCC  |  +5V
     RST  |  CS
 MOSI 11  |  MOSI
 MISO 12  |  MISO
  SCK 13  |  CLK

Udev Rule

# Bus pirate v3
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", GROUP="users", MODE="0666", SYMLINK+="buspirate"
# Bus pirate v4
SUBSYSTEM=="tty", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="fb00", GROUP="users", MODE="0666", SYMLINK+="buspirate"

Avrdude Command

avrdude -v -c buspirate -P /dev/buspirate -p m168p -Uflash:w:/path/to/file.hex:i

Note: If you do this through the Arduino IDE, it disables auto erase for flash memory (adding -D to the command line) which causes the write to fail, at least on my device. Removing that flag fixed the issue.


There may be some other missing pieces here, but this should hopefully be enough for me to pick this up again in the future. Now, on to using my Bus Pirate to fix the programming on my new Pro Micro! (since I accidentally flashed a hex file that was compiled for the wrong chip)

References

Like

Discussions