mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-24 15:28:10 +00:00
move various devel scripts into Makefile
This commit is contained in:
parent
14e792e346
commit
733b421580
19
Makefile
Normal file
19
Makefile
Normal file
@ -0,0 +1,19 @@
|
||||
STMHAL_BUILD_DIR=vendor/micropython/stmhal/build-TREZORV2
|
||||
|
||||
help: ## show this help
|
||||
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36mmake %-10s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
|
||||
|
||||
build: ## build stmhal and unix micropython ports
|
||||
make -C vendor/micropython/stmhal
|
||||
make -C vendor/micropython/unix
|
||||
|
||||
flash: ## flash firmware using st-flash
|
||||
st-flash write $(STMHAL_BUILD_DIR)/firmware0.bin 0x8000000
|
||||
sleep 0.1
|
||||
st-flash write $(STMHAL_BUILD_DIR)/firmware1.bin 0x8020000
|
||||
|
||||
openocd: ## start openocd which connects to the device
|
||||
openocd -f interface/stlink-v2.cfg -f target/stm32f4x_stlink.cfg
|
||||
|
||||
gdb: ## start remote gdb session which connects to the openocd
|
||||
gdb $(STMHAL_BUILD_DIR)/firmware.elf -ex 'target remote localhost:3333'
|
8
flash.sh
8
flash.sh
@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
BUILD_DIR=vendor/micropython/stmhal/build-TREZORV2
|
||||
|
||||
st-flash write $BUILD_DIR/firmware0.bin 0x8000000
|
||||
sleep 0.1
|
||||
st-flash write $BUILD_DIR/firmware1.bin 0x8020000
|
4
gdb.sh
4
gdb.sh
@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
BUILD_DIR=vendor/micropython/stmhal/build-TREZORV2
|
||||
|
||||
gdb $BUILD_DIR/firmware.elf -ex 'target remote localhost:3333'
|
@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
openocd -f interface/stlink-v2.cfg -f target/stm32f4x_stlink.cfg
|
Loading…
Reference in New Issue
Block a user