I continue doing modifications to my printrbot, which has almost no original parts left. Occasionally, I need to make changes to the source code running on the board to flip y axis, force z axis power etc. This post is some notes to walk you through this process on OSX. As of writing this post I compiled it on iMac with High Sierra 10.13.6.
Download and install Arduino IDE. In my case I was using version 1.8.9.
You will also need to install Teensyduino.
Clone Marlin repository for printrbot:
git clone https://github.com/Printrbot/Marlin
Open source in Arduino IDE and compile Marlin by clicking "Verify".

You should see a Teensy helper window pop up. Find compiled binary Marlin.ino.hex by navigating through the window.

To flash you will need to build and compile dfu-programmer from this repository https://github.com/Printrbot/FirmwareUpdatr. After running build you should have dfu-programmer executable. Now you are ready to flash the board.
Set boot jumper as described in this link and on the image below. The picture is for Revision D of the printrboard. Note that after you set this jumper serial port is no longer visible. Power the board, connect USB and press reset button.

To erase and flash run two commands show below. If you do no

If you see an error message “dfu-programmer: no device present.” make sure your device is connected and try to press reset button.
If flash succeeded you should be good to go. Remove the jumper and reconnect the power. G-codes can be found here https://reprap.org/wiki/G-code
Download and install Arduino IDE. In my case I was using version 1.8.9.
You will also need to install Teensyduino.
Clone Marlin repository for printrbot:
git clone https://github.com/Printrbot/Marlin
Open source in Arduino IDE and compile Marlin by clicking "Verify".
You should see a Teensy helper window pop up. Find compiled binary Marlin.ino.hex by navigating through the window.
To flash you will need to build and compile dfu-programmer from this repository https://github.com/Printrbot/FirmwareUpdatr. After running build you should have dfu-programmer executable. Now you are ready to flash the board.
To erase and flash run two commands show below. If you do no
If you see an error message “dfu-programmer: no device present.” make sure your device is connected and try to press reset button.
If flash succeeded you should be good to go. Remove the jumper and reconnect the power. G-codes can be found here https://reprap.org/wiki/G-code