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.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi.tar.xz
sudo mkdir -p /opt/gcc-arm/
sudo tar xvf arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi.tar.xz -C /opt/gcc-arm/
vim ~/.bashrc
PATH=$PATH:/opt/gcc-arm/arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi/bin

安装rust工具 rustup:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
sudo apt install rustup
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

  • Python 44.5%
  • C 42.8%
  • Rust 10.1%
  • Nix 0.8%
  • C++ 0.5%
  • Assembly 0.4%
  • Other 0.9%