1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 22:38:08 +00:00

make: update flash command to use openocd

This commit is contained in:
Pavol Rusnak 2018-02-13 15:15:52 +01:00
parent 3000a4ac8d
commit 1209e48dff
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -23,8 +23,7 @@ OBJCOPY := $(PREFIX)objcopy
OBJDUMP := $(PREFIX)objdump
AR := $(PREFIX)ar
AS := $(PREFIX)as
FLASH := st-flash
OPENOCD := openocd
OPENOCD := openocd -f interface/stlink-v2.cfg -c "transport select hla_swd" -f target/stm32f2x.cfg
OPTFLAGS ?= -O3
DBGFLAGS ?= -g -DNDEBUG
@ -137,16 +136,7 @@ endif
all: $(NAME).bin
flash: $(NAME).bin
$(FLASH) write $(NAME).bin 0x8000000
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"
$(OPENOCD) -c "init; reset halt; flash write_image erase $(NAME).bin 0x8000000; exit"
upload: sign
trezorctl firmware_update -f $(NAME).bin