diff --git a/legacy/Makefile b/legacy/Makefile index 4f433f5fc..2f6f9eb50 100644 --- a/legacy/Makefile +++ b/legacy/Makefile @@ -30,7 +30,8 @@ libtrezor.a: @printf " AR $@\n" $(Q)$(AR) rcs $@ $^ -.PHONY: vendor build_unix test_emu test_emu_ui test_emu_ui_record +.PHONY: vendor build_unix test_emu test_emu_ui test_emu_ui_record \ + flash_firmware_jlink flash_bootloader_jlink vendor: git submodule update --init --recursive @@ -47,3 +48,10 @@ test_emu_ui: ## run ui integration tests test_emu_ui_record: ## record and hash screens for ui integration tests ./script/test --ui=record --ui-check-missing $(TESTOPTS) + +flash_firmware_jlink: + JLinkExe -nogui 1 -commanderscript firmware/firmware_flash.jlink + +flash_bootloader_jlink: + JLinkExe -nogui 1 -commanderscript bootloader/bootloader_flash.jlink + diff --git a/legacy/bootloader/bootloader_flash.jlink b/legacy/bootloader/bootloader_flash.jlink new file mode 100644 index 000000000..e305be76b --- /dev/null +++ b/legacy/bootloader/bootloader_flash.jlink @@ -0,0 +1,7 @@ +device stm32f205rg +if swd +speed auto +loadbin bootloader/bootloader.bin 0x8000000 +r +g +exit diff --git a/legacy/firmware/firmware_flash.jlink b/legacy/firmware/firmware_flash.jlink new file mode 100644 index 000000000..068b3cf3a --- /dev/null +++ b/legacy/firmware/firmware_flash.jlink @@ -0,0 +1,7 @@ +device stm32f205rg +if swd +speed auto +loadbin firmware/trezor.bin 0x08010000 +r +g +exit