Skip to content

Commit

Permalink
Merge pull request #22 from cryptoadvance/micropython
Browse files Browse the repository at this point in the history
Micropython
  • Loading branch information
stepansnigirev authored Nov 19, 2019
2 parents 74f19a5 + ed7a8e6 commit 4a217b5
Show file tree
Hide file tree
Showing 57 changed files with 1,444 additions and 6,624 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "f469-disco"]
path = f469-disco
url = https://github.com/diybitcoinhardware/f469-disco
52 changes: 14 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,12 @@ We are also working on the kit that you could buy from us that will include a 3d
* When the board is done loading the bin the board will reset itself and begin running the Specter UI.
* The on-screen UI should prompt you to calibrate the screen and then will take you to the Specter UI's "What do you want to do?" startup screen.


## Dev plan

- [x] Single key functionality
- [x] Reckless storage
- [x] Multisig
- [ ] SD card support
- [ ] Dynamic SD card support
- [ ] Secure element integration
- [ ] Secure boot
- [ ] DIY kit
Expand All @@ -85,39 +84,16 @@ A few crappy pictures:
## Compiling the code yourself
_(This is an optional step for developers. Typical users can just run off the pre-compiled `specter-diy.bin` file referenced above)_

Create a virtualenv and once it's active install Mbed CLI via pip:
```
pip install mbed-cli
```

Make sure you're in the `specter-diy` root and initialize the project dir:
```
mbed config root .
```

Download `gcc-arm-none-eabi` from: https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads

And then decompress it:
```
tar xjf gcc-arm-none-eabi-8-2019-q3-update-mac.tar.bz2
```

Configure Mbed to use gcc-arm:
```
mbed config GCC_ARM_PATH /path/to/gcc-arm/bin
```

Fetch the libraries mbed will need:
```
mbed deploy
```

Set the default Mbed toolchain:
```
mbed toolchain GCC_ARM
```

Finally:
```
mbed compile
```
Micropython now. Ref: https://github.com/diybitcoinhardware/f469-disco

To compile the firmware you will need `arm-none-eabi-gcc` compiler.

On MacOS install it using brew: `brew install arm-none-eabi-gcc`

On Linux: `sudo apt-get install gcc-arm-none-eabi binutils-arm-none-eabi gdb-arm-none-eabi openocd`

Run `./build.sh` script, it may work. Or not. If not - please open an issue and we will try to figure out.

At the end you should get a `specter-diy.bin` file in the root that you can copy to the device.

Simulator: TBD.
10 changes: 10 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
# mpy cross-compiler
pushd f469-disco/micropython/mpy-cross
make
popd
# f469 board
pushd f469-disco/micropython/ports/stm32
make BOARD=STM32F469DISC USER_C_MODULES=../../../usermods FROZEN_MANIFEST=../../../../manifest.py
arm-none-eabi-objcopy -O binary build-STM32F469DISC/firmware.elf ../../../../specter-diy.bin
popd
37 changes: 0 additions & 37 deletions components/gui/alert/alert.cpp

This file was deleted.

30 changes: 0 additions & 30 deletions components/gui/alert/alert.h

This file was deleted.

62 changes: 0 additions & 62 deletions components/gui/alert/prompt.cpp

This file was deleted.

41 changes: 0 additions & 41 deletions components/gui/alert/qr_alert.cpp

This file was deleted.

Loading

0 comments on commit 4a217b5

Please sign in to comment.