scripts: west_commands: runners: Fix default value for --dt-flash

The '--dt-flash' parameter accepts a string like "y", "yes", "no", etc,
and is supposed to be converted into a boolean value. This is only the
theory as in practice, the default value is set to 'n' and is never
converted to False afterwards.

Set the default value to False.

Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
This commit is contained in:
Miguel Gazquez 2025-02-06 17:04:17 +01:00 committed by Benjamin Cabé
commit 8c6a290d4a

View file

@ -560,7 +560,7 @@ class ZephyrBinaryRunner(abc.ABC):
parser.add_argument('-i', '--dev-id', help=argparse.SUPPRESS) parser.add_argument('-i', '--dev-id', help=argparse.SUPPRESS)
if caps.flash_addr: if caps.flash_addr:
parser.add_argument('--dt-flash', default='n', choices=_YN_CHOICES, parser.add_argument('--dt-flash', default=False, choices=_YN_CHOICES,
action=_DTFlashAction, action=_DTFlashAction,
help='''If 'yes', try to use flash address help='''If 'yes', try to use flash address
information from devicetree when flash information from devicetree when flash