@@ -268,10 +268,6 @@ class RunnerCaps:
268
268
connected to a single computer, in order to select which one will be used
269
269
with the command provided.
270
270
271
- - flash_addr: whether the runner supports flashing to an
272
- arbitrary address. Default is False. If true, the runner
273
- must honor the --dt-flash option.
274
-
275
271
- erase: whether the runner supports an --erase option, which
276
272
does a mass-erase of the entire addressable flash on the target
277
273
before flashing. On multi-core SoCs, this may only erase portions of
@@ -356,19 +352,6 @@ class RunnerConfig(NamedTuple):
356
352
openocd_search : list [str ] = [] # add these paths to the openocd search path
357
353
rtt_address : int | None = None # address of the rtt control block
358
354
359
-
360
- _YN_CHOICES = ['Y' , 'y' , 'N' , 'n' , 'yes' , 'no' , 'YES' , 'NO' ]
361
-
362
-
363
- class _DTFlashAction (argparse .Action ):
364
-
365
- def __call__ (self , parser , namespace , values , option_string = None ):
366
- if values .lower ().startswith ('y' ):
367
- namespace .dt_flash = True
368
- else :
369
- namespace .dt_flash = False
370
-
371
-
372
355
class _ToggleAction (argparse .Action ):
373
356
374
357
def __call__ (self , parser , args , ignored , option ):
@@ -527,10 +510,6 @@ def add_parser(cls, parser):
527
510
argparse module. For more details, refer to the documentation
528
511
for argparse.ArgumentParser.add_subparsers().
529
512
530
- The lone common optional argument is:
531
-
532
- * --dt-flash (if the runner capabilities includes flash_addr)
533
-
534
513
Runner-specific options are added through the do_add_parser()
535
514
hook.'''
536
515
# Unfortunately, the parser argument's type is not documented
@@ -549,15 +528,6 @@ def add_parser(cls, parser):
549
528
else :
550
529
parser .add_argument ('-i' , '--dev-id' , help = argparse .SUPPRESS )
551
530
552
- if caps .flash_addr :
553
- parser .add_argument ('--dt-flash' , default = False , choices = _YN_CHOICES ,
554
- action = _DTFlashAction ,
555
- help = '''If 'yes', try to use flash address
556
- information from devicetree when flash
557
- addresses are unknown (e.g. when flashing a .bin)''' )
558
- else :
559
- parser .add_argument ('--dt-flash' , help = argparse .SUPPRESS )
560
-
561
531
if caps .file :
562
532
parser .add_argument ('-f' , '--file' ,
563
533
dest = 'file' ,
@@ -650,8 +620,6 @@ def create(cls, cfg: RunnerConfig,
650
620
caps = cls .capabilities ()
651
621
if args .dev_id and not caps .dev_id :
652
622
_missing_cap (cls , '--dev-id' )
653
- if args .dt_flash and not caps .flash_addr :
654
- _missing_cap (cls , '--dt-flash' )
655
623
if args .erase and not caps .erase :
656
624
_missing_cap (cls , '--erase' )
657
625
if args .reset and not caps .reset :
@@ -682,22 +650,6 @@ def do_create(cls, cfg: RunnerConfig,
682
650
args : argparse .Namespace ) -> 'ZephyrBinaryRunner' :
683
651
'''Hook for instance creation from command line arguments.'''
684
652
685
- @staticmethod
686
- def get_flash_address (args : argparse .Namespace ,
687
- build_conf : BuildConfiguration ,
688
- default : int = 0x0 ) -> int :
689
- '''Helper method for extracting a flash address.
690
-
691
- If args.dt_flash is true, returns the address obtained from
692
- ZephyrBinaryRunner.flash_address_from_build_conf(build_conf).
693
-
694
- Otherwise (when args.dt_flash is False), the default value is
695
- returned.'''
696
- if args .dt_flash :
697
- return ZephyrBinaryRunner .flash_address_from_build_conf (build_conf )
698
- else :
699
- return default
700
-
701
653
@staticmethod
702
654
def flash_address_from_build_conf (build_conf : BuildConfiguration ):
703
655
'''If CONFIG_HAS_FLASH_LOAD_OFFSET is n in build_conf,
0 commit comments