Skip to content

签名模块

License

Unknown, GPL-3.0 licenses found

Licenses found

Unknown
LICENSE.md
GPL-3.0
COPYING
Notifications You must be signed in to change notification settings

stops-top/firmware

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Firmware

Trezor Firmware

使用方式

sudo apt install -y scons llvm-dev libclang-dev clang protobuf-compiler python3-pip python3-poetry
ln -s /usr/bin/python3 /usr/bin/python
pip3 install poetry trezor mako munch protobuf
sudo apt install -y scons libsdl2-dev libsdl2-image-dev llvm-dev libclang-dev clang

可选 poetry Python虚拟环境和依赖管理的工具,poetry和pipenv类似,另外还提供了打包和发布的功能。

git submodule update --init --recursive --force
# poetry install
# poetry install --sync
# poetry shell

安装编译器

apt install -y gcc-arm-none-eabi libnewlib-arm-none-eabi openocd

在ubuntu20等早起版本,直接安装的gcc版本过低,需要下载配置特定版本 arm-gnu-toolchain

wget https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz
sudo mkdir -p /opt/gcc-arm/
sudo tar xvf arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz -C /opt/gcc-arm/
vim ~/.bashrc
PATH=$PATH:/opt/gcc-arm/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi/bin

安装工具 rustup:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

rustup target add thumbv7em-none-eabihf  # for TT
rustup target add thumbv7m-none-eabi     # for T1

rustup default nightly
rustup update
rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu

开始编译

cd core
make vendor build

flashing

For flashing firmware to blank device (without bootloader) use make flash.

You need to have OpenOCD installed.

sudo openocd -f /usr/share/openocd/scripts/interface/stlink-v2-1.cfg -f /usr/share/openocd/scripts/target/stm32f4x.cfg

About

签名模块

Topics

Resources

License

Unknown, GPL-3.0 licenses found

Licenses found

Unknown
LICENSE.md
GPL-3.0
COPYING

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages

  • C 44.7%
  • Python 37.8%
  • Rust 14.9%
  • Nix 0.7%
  • Assembly 0.5%
  • C++ 0.4%
  • Other 1.0%