@@ -271,10 +271,6 @@ class RunnerCaps:
271
271
- mult_dev_ids: whether the runner supports multiple device identifiers
272
272
for a single operation, allowing for bulk flashing of devices.
273
273
274
- - flash_addr: whether the runner supports flashing to an
275
- arbitrary address. Default is False. If true, the runner
276
- must honor the --dt-flash option.
277
-
278
274
- erase: whether the runner supports an --erase option, which
279
275
does a mass-erase of the entire addressable flash on the target
280
276
before flashing. On multi-core SoCs, this may only erase portions of
@@ -309,7 +305,6 @@ class RunnerCaps:
309
305
commands : set [str ] = field (default_factory = lambda : set (_RUNNERCAPS_COMMANDS ))
310
306
dev_id : bool = False
311
307
mult_dev_ids : bool = False
312
- flash_addr : bool = False
313
308
erase : bool = False
314
309
reset : bool = False
315
310
extload : bool = False
@@ -362,19 +357,6 @@ class RunnerConfig(NamedTuple):
362
357
openocd_search : list [str ] = [] # add these paths to the openocd search path
363
358
rtt_address : int | None = None # address of the rtt control block
364
359
365
-
366
- _YN_CHOICES = ['Y' , 'y' , 'N' , 'n' , 'yes' , 'no' , 'YES' , 'NO' ]
367
-
368
-
369
- class _DTFlashAction (argparse .Action ):
370
-
371
- def __call__ (self , parser , namespace , values , option_string = None ):
372
- if values .lower ().startswith ('y' ):
373
- namespace .dt_flash = True
374
- else :
375
- namespace .dt_flash = False
376
-
377
-
378
360
class _ToggleAction (argparse .Action ):
379
361
380
362
def __call__ (self , parser , args , ignored , option ):
@@ -533,10 +515,6 @@ def add_parser(cls, parser):
533
515
argparse module. For more details, refer to the documentation
534
516
for argparse.ArgumentParser.add_subparsers().
535
517
536
- The lone common optional argument is:
537
-
538
- * --dt-flash (if the runner capabilities includes flash_addr)
539
-
540
518
Runner-specific options are added through the do_add_parser()
541
519
hook.'''
542
520
# Unfortunately, the parser argument's type is not documented
@@ -557,15 +535,6 @@ def add_parser(cls, parser):
557
535
else :
558
536
parser .add_argument ('-i' , '--dev-id' , help = argparse .SUPPRESS )
559
537
560
- if caps .flash_addr :
561
- parser .add_argument ('--dt-flash' , default = False , choices = _YN_CHOICES ,
562
- action = _DTFlashAction ,
563
- help = '''If 'yes', try to use flash address
564
- information from devicetree when flash
565
- addresses are unknown (e.g. when flashing a .bin)''' )
566
- else :
567
- parser .add_argument ('--dt-flash' , help = argparse .SUPPRESS )
568
-
569
538
if caps .file :
570
539
parser .add_argument ('-f' , '--file' ,
571
540
dest = 'file' ,
@@ -658,8 +627,6 @@ def create(cls, cfg: RunnerConfig,
658
627
caps = cls .capabilities ()
659
628
if args .dev_id and not caps .dev_id :
660
629
_missing_cap (cls , '--dev-id' )
661
- if args .dt_flash and not caps .flash_addr :
662
- _missing_cap (cls , '--dt-flash' )
663
630
if args .erase and not caps .erase :
664
631
_missing_cap (cls , '--erase' )
665
632
if args .reset and not caps .reset :
@@ -690,22 +657,6 @@ def do_create(cls, cfg: RunnerConfig,
690
657
args : argparse .Namespace ) -> 'ZephyrBinaryRunner' :
691
658
'''Hook for instance creation from command line arguments.'''
692
659
693
- @staticmethod
694
- def get_flash_address (args : argparse .Namespace ,
695
- build_conf : BuildConfiguration ,
696
- default : int = 0x0 ) -> int :
697
- '''Helper method for extracting a flash address.
698
-
699
- If args.dt_flash is true, returns the address obtained from
700
- ZephyrBinaryRunner.flash_address_from_build_conf(build_conf).
701
-
702
- Otherwise (when args.dt_flash is False), the default value is
703
- returned.'''
704
- if args .dt_flash :
705
- return ZephyrBinaryRunner .flash_address_from_build_conf (build_conf )
706
- else :
707
- return default
708
-
709
660
@staticmethod
710
661
def flash_address_from_build_conf (build_conf : BuildConfiguration ):
711
662
'''If CONFIG_HAS_FLASH_LOAD_OFFSET is n in build_conf,
0 commit comments