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:
parent
025436db47
commit
634ed5aabc
@ -202,6 +202,14 @@ flash_read_storage: ## read 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"
|
||||
|
||||
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: ## start openocd which connects to the device
|
||||
|
7
core/embed/bootloader/bootloader_flash.jlink
Normal file
7
core/embed/bootloader/bootloader_flash.jlink
Normal file
@ -0,0 +1,7 @@
|
||||
device stm32f427vi
|
||||
if swd
|
||||
speed 50000
|
||||
loadbin build/bootloader/bootloader.bin 0x08020000
|
||||
r
|
||||
g
|
||||
exit
|
8
core/embed/firmware/firmware_flash.jlink
Normal file
8
core/embed/firmware/firmware_flash.jlink
Normal 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
|
Loading…
Reference in New Issue
Block a user