2. Follow the [install instructions](https://launchpadlibrarian.net/287100883/readme.txt)
3. To install OpenOCD, run `brew install open-ocd`
4. Run `pipenv run make vendor build_boardloader build_bootloader build_firmware`
## Building
```sh
pipenv run make vendor build_boardloader build_bootloader build_firmware
```
## Uploading
Use `make upload` to upload the firmware to a production device. Do not forget to [enter bootloader](https://wiki.trezor.io/User_manual-Updating_the_Trezor_device_firmware__TT) on the device beforehand.
## Flashing
For flashing firmware to blank device (without bootloader) use `make flash`,
or `make flash STLINK_VER=v2-1` if using a ST-LINK/V2.1 interface.
You can then use `screen` to enter the device's console. Do not forget to add your user to the `dialout` group or use `sudo`. Note that both the group and the tty name can differ, use `ls -l` to find out proper names on your machine.