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

chore(core): make jlink flashing work together with FW integrity, but avoid erasing sectors unnecessarily

[no changelog]
This commit is contained in:
Ondrej Mikle 2024-01-15 14:29:42 +01:00
parent ed1785a985
commit 269d98d43e

View File

@ -311,6 +311,9 @@ flash_bootloader_ci_jlink: $(BOOTLOADER_CI_BUILD_DIR)/bootloader.bin ## flash CI
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
## pad 2nd part so that FW integrity works after flash
## read&compare in flashing will avoid erasing unmodified sectors
truncate -s $(FIRMWARE_P2_MAXSIZE) $<.p2.bin
JLinkExe -nogui 1 -commanderscript embed/firmware/firmware_flash.jlink
flash_firmware_t1_jlink: $(FIRMWARE_BUILD_DIR)/firmware.bin ## flash T1 core port via JLink