[BREAKGLASS] ❄️ Firmware and simulator for Coldcard Hardware Wallet http://coldcard.com
Go to file
2018-07-25 13:01:55 -04:00
cli Making whole firmware public with single, signed commit. 2018-07-24 14:07:33 -04:00
docs Cleanup and robustness/memory usage 2018-07-25 12:44:40 -04:00
external Correct version 2018-07-24 14:30:19 -04:00
graphics Making whole firmware public with single, signed commit. 2018-07-24 14:07:33 -04:00
misc/obsolete-code Making whole firmware public with single, signed commit. 2018-07-24 14:07:33 -04:00
releases New release: 2018-07-25T1700-v1.0.0r1 2018-07-25 13:01:55 -04:00
shared Cleanup and robustness/memory usage 2018-07-25 12:44:40 -04:00
stm32 Remove distraction 2018-07-25 13:01:48 -04:00
testing Cleanup and robustness/memory usage 2018-07-25 12:44:40 -04:00
unix Cleanup and robustness/memory usage 2018-07-25 12:44:40 -04:00
.gitignore Making whole firmware public with single, signed commit. 2018-07-24 14:07:33 -04:00
.gitmodules Updated gitmodules, semi-manually 2018-07-24 14:32:18 -04:00
COPYING Making whole firmware public with single, signed commit. 2018-07-24 14:07:33 -04:00
LICENSE Making whole firmware public with single, signed commit. 2018-07-24 14:07:33 -04:00
README.md Add some more dependancies, thanks @jmcorgan 2018-07-25 13:00:05 -04:00
requirements.txt Add ckcc tool 2018-07-24 14:58:57 -04:00

Coldcard Wallet

Coldcard is a Cheap, Ultra-secure & Opensource Hardware Wallet for Bitcoin and other crypto-currencies. Get yours at ColdcardWallet.com

Follow @COLDCARDwallet on Twitter to keep up with the latest updates and security alerts.

coldcard logo

coldcard picture front coldcard picture back

Check-out and Setup

Do a checkout, recursively to get all the submodules:

git clone --recursive https://github.com/Coldcard/firmware.git

Then:

  • cd firmware
  • git submodule update --init (if needed?)
  • brew install autogen
  • virtualenv -p python3 ENV
  • source ENV/bin/activate (or source ENV/bin/activate.csh based on shell preference)
  • pip install -r requirements.txt

Setup and Run the Desktop-based Coldcard simulator:

  • cd unix; make setup && make; ./simulator.py

Building the firmware:

  • cd ../cli; pip install --editable .
  • cd ../stm32; make; make firmware-signed.dfu
  • The resulting file, firmware-signed.dfu can be loaded directly onto a Coldcard, using this command (already installed based on above)
  • ckcc upgrade firmware-signed.dfu

Which 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

MacOS

You'll probably need to install these at least these packages:

brew install sdl2 gcc-arm-embedded

Linux

You'll probably need to install these:

apt install libudev-dev python-sdl2

Code Organization

Top-level dirs:

shared

  • shared code between desktop test version and real-deal
  • expected to be largely in python, and higher-level

unix

  • unix (MacOS) version for testing/rapid dev
  • this is a simulator for the product

testing

  • test cases and associated data

stm32

  • embedded micro version, for actual product
  • final target is a binary file for loading onto hardware

external

  • code from other projects, ie. the dreaded submodules

stm32/bootloader

  • 32k of factory-set code that you cannot change
  • however, you can inspect what code is on your coldcard and compare to this.