mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-13 18:18:08 +00:00
make: update flash command to use openocd
This commit is contained in:
parent
3000a4ac8d
commit
1209e48dff
@ -23,8 +23,7 @@ OBJCOPY := $(PREFIX)objcopy
|
|||||||
OBJDUMP := $(PREFIX)objdump
|
OBJDUMP := $(PREFIX)objdump
|
||||||
AR := $(PREFIX)ar
|
AR := $(PREFIX)ar
|
||||||
AS := $(PREFIX)as
|
AS := $(PREFIX)as
|
||||||
FLASH := st-flash
|
OPENOCD := openocd -f interface/stlink-v2.cfg -c "transport select hla_swd" -f target/stm32f2x.cfg
|
||||||
OPENOCD := openocd
|
|
||||||
|
|
||||||
OPTFLAGS ?= -O3
|
OPTFLAGS ?= -O3
|
||||||
DBGFLAGS ?= -g -DNDEBUG
|
DBGFLAGS ?= -g -DNDEBUG
|
||||||
@ -137,16 +136,7 @@ endif
|
|||||||
all: $(NAME).bin
|
all: $(NAME).bin
|
||||||
|
|
||||||
flash: $(NAME).bin
|
flash: $(NAME).bin
|
||||||
$(FLASH) write $(NAME).bin 0x8000000
|
$(OPENOCD) -c "init; reset halt; flash write_image erase $(NAME).bin 0x8000000; exit"
|
||||||
|
|
||||||
flash2: $(NAME).hex
|
|
||||||
$(OPENOCD) -f board/stm32f4discovery.cfg \
|
|
||||||
-c "init" \
|
|
||||||
-c "reset init" \
|
|
||||||
-c "stm32f2x mass_erase 0" \
|
|
||||||
-c "flash write_image $(NAME).hex" \
|
|
||||||
-c "reset" \
|
|
||||||
-c "shutdown"
|
|
||||||
|
|
||||||
upload: sign
|
upload: sign
|
||||||
trezorctl firmware_update -f $(NAME).bin
|
trezorctl firmware_update -f $(NAME).bin
|
||||||
|
Loading…
Reference in New Issue
Block a user