From 900aeb81f7e2e66f39e0782bc36bcdc189d42a65 Mon Sep 17 00:00:00 2001 From: Jan Michel Date: Tue, 1 Nov 2022 15:58:49 +0100 Subject: [PATCH] add option to select flash page to flash_settings --- tools/flash_settings.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/flash_settings.pl b/tools/flash_settings.pl index 7b55466..dc446d2 100755 --- a/tools/flash_settings.pl +++ b/tools/flash_settings.pl @@ -14,6 +14,7 @@ my $yestoall=0; my $clear=0; my $info=0; my $noverify=0; +my $header_page_addr = 0x7000; Getopt::Long::Configure(qw(gnu_getopt)); GetOptions( @@ -23,15 +24,18 @@ GetOptions( 'clear|c' => \$clear, 'info|i' => \$info, 'noverify|v' => \$noverify, + 'page|p=s' => \$header_page_addr ); +if (my @a = $header_page_addr =~ /^0x(\w+)/) { + $header_page_addr = hex($a[0]); + } - my @pages; my $page; -my $header_page_addr = 0x7000; + my $trbflash = "trbflash"; @@ -263,6 +267,7 @@ options: --noverify|-v do not verify the written memory area --info|-i show information summary about settings in the flash + --page|-p specify starting flash page to use settings file format: -- 2.43.0