1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-13 19:18:56 +00:00

makefile: add debugging targets for reading/erasing storage sectors

This commit is contained in:
Pavol Rusnak 2019-01-25 15:59:21 +01:00
parent 8541c4265b
commit 40325f4069
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -175,6 +175,12 @@ flash_combine: $(PRODTEST_BUILD_DIR)/combined.bin ## flash combined using OpenOC
flash_erase: ## erase all sectors in flash bank 0
$(OPENOCD) -c "init; reset halt; flash info 0; flash erase_sector 0 0 last; flash erase_check 0; exit"
flash_read_storage: ## read storage sectors from flash
$(OPENOCD) -c "init; flash read_bank 0 storage1.data 0x10000 65536; flash read_bank 0 storage2.data 0x110000 65536; exit"
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 debug commands:
openocd: ## start openocd which connects to the device