Ensure that you have Docker installed. You can follow Docker's installation instructions.
Clone this repository:
git clone https://github.com/trezor/trezor-mcu.git` cd trezor-mcu
build.sh command to build the images.
./build.sh bl1.6.0 v1.7.0
./build.sh EMU v1.7.0
Build results are stored in the
build/ directory. File
trezor-<tag>.bin is the firmware image, and
is the emulator executable.
You can use
TREZOR_OLED_SCALE environment variable to make emulator screen bigger.
wget -O trezor.signed.bin https://wallet.trezor.io/data/firmware/1/trezor-1.6.1.bin
tail -c +257 trezor.signed.bin | sha256sum
Step 3 should produce the same sha256 fingerprint like your local build (for the same version tag). Firmware has a special header (of length 256 bytes) holding signatures themselves, which must be avoided while calculating the fingerprint, that's why tail command has to be used.
WARNING: This will erase the recovery seed stored on the device! You should never do this on TREZOR that contains coins!
pip install trezor(more info)
trezorctl firmware_update -f build/trezor-TAG.bin
export EMULATOR=1 TREZOR_TRANSPORT_V1=1
export DEBUG_LINK=1. Use this if you want to run the device tests.
script/setupto clean the repository
pipenv run script/cibuild
If you are building device firmware, the firmware will be in
You can launch the emulator using
firmware/trezor.elf. To use
trezorctl with the emulator, use
trezorctl -p udp (for example,
trezorctl -p udp get_features).