From ba48d53409808e413c4298b7902f28dcaf7ec431 Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Sat, 24 May 2025 07:50:51 +0200 Subject: [PATCH] main: added detect_flash in SPI Mode and with a manufacturer --- src/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 906d905..6e154b3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -305,7 +305,10 @@ int main(int argc, char **argv) } else if ((args.prg_type == Device::WR_FLASH || args.prg_type == Device::WR_SRAM) || !args.bit_file.empty() || !args.file_type.empty()) { - target->program(args.offset, args.unprotect_flash); + if (args.detect_flash) + target->detect_flash(); + else + target->program(args.offset, args.unprotect_flash); } if (args.unprotect_flash && args.bit_file.empty()) if (!target->unprotect_flash())