|
2 | 2 |
|
3 | 3 | ## Compiling the code yourself |
4 | 4 |
|
5 | | -We use this build as a platform for Specter: https://github.com/diybitcoinhardware/f469-disco |
| 5 | +See the [build documentation](build.md) for instructions on how to compile the code. |
6 | 6 |
|
7 | | -To compile the firmware you will need `arm-none-eabi-gcc` compiler. |
8 | | - |
9 | | -On MacOS install it using brew: `brew install arm-none-eabi-gcc` |
10 | | - |
11 | | -On Debian: `sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi gdb-arm-none-eabi openocd` |
12 | | - |
13 | | -On Arch Linux: `sudo pacman -S arm-none-eabi-gcc arm-none-eabi-binutils arm-none-eabi-gdb arm-none-eabi-newlib openocd` |
| 7 | +## Enabling developer mode |
14 | 8 |
|
15 | | -Run `make disco` to get the binary or `make unix` to compile the simulator. They will be in the `bin` folder. |
| 9 | +By default developer mode and USB communication are turned off. This means that when you connect the board to the computer it will NOT mount the `PYBFLASH` anymore and there will be no way to connect to debug shell. |
16 | 10 |
|
17 | | -`specter-diy.bin` file is the firmware that you need to copy to the device. |
18 | 11 |
|
19 | | -The easiest way to start developing is to use a [simulator](./simulator.md), and when you are done - try it on a real hardware. |
| 12 | +~~To turn on the developer mode get to the main screen (enter PIN code, generate recovery phrase, enter password), and then go to **Settings - Security - turn on Developer mode - Save**.~~ |
| 13 | +(Currently deactivated for securtiy reasons) |
20 | 14 |
|
21 | | -## Enabling developer mode |
| 15 | +~~Now the board will restart and get mounted to the computer as before. You can also connect to the board over miniUSB and get to interactive console (baudrate 115200). You can use `screen` or `putty` or `minicom` for that, i.e. `screen /dev/tty.usbmodem14403 115200`.~~ |
22 | 16 |
|
23 | | -By default developer mode and USB communication are turned off. This means that when you connect the board to the computer it will NOT mount the `PYBFLASH` anymore and there will be no way to connect to debug shell. |
| 17 | +In order to connect to the board, modify those lines in [boot.py](https://github.com/cryptoadvance/specter-diy/blob/2f51e152bcdb184cf719792e6c5f972214e3dd36/boot/main/boot.py#L33-L40) like this: |
| 18 | +```python |
| 19 | +# configure usb from start if you want, |
| 20 | +# otherwise will be configured after PIN |
| 21 | +pyb.usb_mode("VCP+MSC") # debug mode with USB and mounted storages from start |
| 22 | +#pyb.usb_mode("VCP") # debug mode with USB from start |
| 23 | +# disable at start |
| 24 | +# pyb.usb_mode(None) |
| 25 | +``` |
24 | 26 |
|
25 | | -To turn on the developer mode get to the main screen (enter PIN code, generate recovery phrase, enter password), and then go to **Settings - Security - turn on Developer mode - Save**. |
| 27 | +and after flashing, you can connect with something like: |
| 28 | +``` |
| 29 | +# Linux |
| 30 | +screen /dev/ttyACM0 115200 # or maybe ttyACM1 or ttyACM2 |
| 31 | +# Mac |
| 32 | +screen /dev/tty.usbmodem14403 115200`. |
| 33 | +``` |
26 | 34 |
|
27 | | -Now the board will restart and get mounted to the computer as before. You can also connect to the board over miniUSB and get to interactive console (baudrate 115200). You can use `screen` or `putty` or `minicom` for that, i.e. `screen /dev/tty.usbmodem14403 115200`. |
28 | 35 |
|
29 | 36 | ## Writing a simple app |
30 | 37 |
|
|
0 commit comments