Skip to content

Commit

Permalink
feat(legacy): Ability to flash bootloader and firmware via JLink
Browse files Browse the repository at this point in the history
[no changelog]
  • Loading branch information
hiviah committed Sep 19, 2022
1 parent 7c11dec commit 4bed278
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
10 changes: 9 additions & 1 deletion legacy/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

7 changes: 7 additions & 0 deletions legacy/bootloader/bootloader_flash.jlink
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
device stm32f205rg
if swd
speed auto
loadbin bootloader/bootloader.bin 0x8000000
r
g
exit
7 changes: 7 additions & 0 deletions legacy/firmware/firmware_flash.jlink
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
device stm32f205rg
if swd
speed auto
loadbin firmware/trezor.bin 0x08010000
r
g
exit

0 comments on commit 4bed278

Please sign in to comment.