Coldcard is an Affordable, Ultra-secure & Verifiable Hardware Wallet for Bitcoin. Get yours at Coldcard.com
Follow @COLDCARDwallet on Twitter to keep up with the latest updates and security alerts.


To have confidence this source code tree is the same as the binary on your device, you can rebuild it from source and get exactly the same bytes. This process has been automated using Docker. Steps are as follows:
Checkout a specific version of the code, and start the process.
```shell git clone https://github.com/Coldcard/firmware.git cd firmware
git checkout 2026-03-05T2052-v5.5.0 cd stm32 make -f MK4-Makefile repro ```
At the end of the process a clear confirmation message is shown, or the differences.
firmware/stm32/built.make repro refer to docs/notes-on-repro.md
which breaks down the process.MK4-Makefile in last step to Q1-MakefileWe are now maintaining two branches: master and edge.
"Edge" will contain features that may not be ready for prime time, such as Taproot or Miniscript. Our standards for releasing new Edge versions are lower, so we can iterate faster and get these advancements out to other developers.
Q and Mk series share the same code base. Individual files that are added,
or removed, can be see in differences between shared/manifest_mk4.py
and shared/manifest_q1.py. Common files are in shared/manifest.py.
Firmware built for Mk5, supports the Mk4 without any functional differences.
NOTE This is the master branch and covers the latest hardware (Mk and Q).
See branch v4-legacy for firmware which supports only Mk3/Mk2 and earlier.
Do a checkout, recursively, to get all the submodules:
git clone --recursive https://github.com/Coldcard/firmware.git
Already checked-out and getting git errors? Do this:
git fetch
git reset --hard origin/master
Alternatively, to get the latest release, you checkout a tagged branch:
git clone https://github.com/Coldcard/firmware.git
cd firmware
git checkout $(git describe --match "20*" --abbrev=0)
git submodule update --init --recursive
Do not use a path with any spaces in it. The Makefiles do not handle that well and we're not planning to fix it.
Keep in mind that python requirements may change between versions, so at the top level, do this command:
pip install -r requirements.txt
Python 3.5 or higher and Homebrew is required.
If working on an ARM-based MacOS system, you may want to create a
new shell with arch -x86_64 bash before starting, or continuing
to work on this source tree.
You'll probably need to install at least these packages:
brew install sdl2 xterm swig
brew install --cask xquartz gcc-arm-embedded
Used to be these were needed as well:
brew tap PX4/px4
brew search px4/px4/gcc-arm-none-eabi
Then install the newest version, currently 83:
brew install px4/px4/gcc-arm-none-eabi-83
You may need to brew upgrade gcc-arm-embedded because we need 10.2 or higher.
Then:
brew install automake autogen virtualenv
virtualenv -p python3 ENV
source ENV/bin/activate (or source ENV/bin/activate.csh based on shell preference)
pip install -U pip
pip install -r requirements.txt
# Work around warnings in bundled MicroPython under current Apple Clang.
MPY_CFLAGS='-Wno-unused-but-set-variable -Wno-array-bounds -Wno-error=unknown-warning-option -Wno-error=deprecated-non-prototype -Wno-error=bitwise-instead-of-logical -Wno-unterminated-string-initialization -Wno-gnu-folding-constant'
make -C external/micropython/mpy-cross CFLAGS_EXTRA="$MPY_CFLAGS"
cd unix
make setup CFLAGS_EXTRA="$MPY_CFLAGS"
make ngu-setup
make CFLAGS_EXTRA="$MPY_CFLAGS"
./simulator.py
You may need to reboot to avoid a DISPLAY is not set error.
The next time you want to run the simulator, you can simply do
source ENV/bin/activate && cd unix && ./simulator.py
cd ../cli; pip install --editable .cd ../stm32; make setup && make; make firmware-signed.dfufirmware-signed.dfu can be loaded directly onto a Coldcard, using this
command (already installed based on above)ckcc upgrade firmware-signed.dfuWhich looks like this:
[ENV] [firmware/stm32 42] ckcc upgrade firmware-signed.dfu
675328 bytes (start @ 293) to send from 'firmware-signed.dfu'
Uploading [##########--------------------------] 29% 0d 00:01:04
defaults write org.python.python ApplePersistenceIgnoreState NO will suppress a warning about Python[22580:10101559] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to...
See https://bugs.python.org/issue32909
All steps you need to install and run the Coldcard simulator on Ubuntu 20.04:
# Install (system) requirements, tools and libraries
apt install build-essential git python3 python3-pip libudev-dev gcc-arm-none-eabi libffi-dev xterm swig libpcsclite-dev python-is-python3 autoconf libtool python3-venv
# Get sources, this takes a long time (because of external libraries), then open
git clone --recursive https://github.com/Coldcard/firmware.git
cd firmware
# Ubuntu 24.04 only; omit this assignment on earlier releases
MPY_CFLAGS='-Wno-error=dangling-pointer -Wno-error=enum-int-mismatch'
# Create Python virtual environment and activate it
python3 -m venv ENV # or virtualenv -p python3 ENV
source ENV/bin/activate
# Install dependencies
pip install -U pip setuptools
pip install -r requirements.txt #general requirements
pip install pysdl2-dll # Ubuntu needs this dependency
# Build the Coldcard simulator
make -C external/micropython/mpy-cross CFLAGS_EXTRA="$MPY_CFLAGS"
cd unix
make setup CFLAGS_EXTRA="$MPY_CFLAGS"
make ngu-setup
make CFLAGS_EXTRA="$MPY_CFLAGS"
# Run the simulator in the active virtualenv
./simulator.py
# Later, if you want to run it (after a reboot). This assumes you extracted the git repo in ~ (home)
cd ~/firmware
source ENV/bin/activate
cd unix
./simulator.py
Also make sure that you have your python3 symlinked to python.
Top-level dirs:
shared
manifest_mk4.py, and
to the Q will be listed in manifest_q1.pyunix
testing
stm32
external
graphics
stm32/bootloader
stm32/mk4-bootloader
stm32/q1-bootloader
hardware
unix/work/...
/MicroSD/* files on "simulated" microSD card
/VirtDisk/* simulated emulated virtual Disk files.
/settings/*.aes persistent settings for Simulator
Found a bug? Email: support@coinkite.com
| 日期 | 榜单 | 排名 | 周期新增 | 总 STAR |
|---|