1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-28 00:58:09 +00:00

core: commands for flashing via JLink (#911)

This commit is contained in:
Ondrej Mikle 2020-03-23 10:40:06 +01:00 committed by GitHub
parent 025436db47
commit 634ed5aabc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 0 deletions

View File

@ -202,6 +202,14 @@ flash_read_storage: ## read storage sectors from flash
flash_erase_storage: ## erase storage sectors from flash flash_erase_storage: ## erase storage sectors from flash
$(OPENOCD) -c "init; flash erase_sector 0 4 4; flash erase_sector 0 16 16; exit" $(OPENOCD) -c "init; flash erase_sector 0 4 4; flash erase_sector 0 16 16; exit"
flash_bootloader_jlink: $(BOOTLOADER_BUILD_DIR)/bootloader.bin ## flash bootloader using JLink
JLinkExe -commanderscript embed/bootloader/bootloader_flash.jlink
flash_firmware_jlink: $(FIRMWARE_BUILD_DIR)/firmware.bin ## flash firmware using JLink. file names must end in .bin for JLink
cp -f $<.p1 $<.p1.bin
cp -f $<.p2 $<.p2.bin
JLinkExe -commanderscript embed/firmware/firmware_flash.jlink
## openocd debug commands: ## openocd debug commands:
openocd: ## start openocd which connects to the device openocd: ## start openocd which connects to the device

View File

@ -0,0 +1,7 @@
device stm32f427vi
if swd
speed 50000
loadbin build/bootloader/bootloader.bin 0x08020000
r
g
exit

View File

@ -0,0 +1,8 @@
device stm32f427vi
if swd
speed 50000
loadbin build/firmware/firmware.bin.p1.bin 0x08040000
loadbin build/firmware/firmware.bin.p2.bin 0x08120000
r
g
exit