From 04a9564583dc75efb511661b9b9305b8aaacdfa2 Mon Sep 17 00:00:00 2001 From: Dual Tachyon Date: Fri, 1 Sep 2023 14:44:11 +0100 Subject: [PATCH] Fixed OpenOCD script to not trash the bootloader. --- dp32g030.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dp32g030.cfg b/dp32g030.cfg index 820d9f8..05e441c 100644 --- a/dp32g030.cfg +++ b/dp32g030.cfg @@ -91,7 +91,7 @@ proc write_image {filename address} { return } } - uv_clear_sectors [expr {2*($fs+$_SECTOR_SIZE-1)/$_SECTOR_SIZE}] + uv_clear_sectors [expr {(($fs+$_SECTOR_SIZE-1)&(0x10000000-$_SECTOR_SIZE))/($_SECTOR_SIZE/2)}] uv_flash_unlock set addr $address