From 1348f9127442f3f8923ab8846c7def6f904d4d2c Mon Sep 17 00:00:00 2001 From: Tomasz Chyrowicz Date: Wed, 19 Sep 2018 15:56:05 +0200 Subject: [PATCH] Add a warning about overwriting nRF DFU settings backup page --- nordicsemi/__main__.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/nordicsemi/__main__.py b/nordicsemi/__main__.py index c10e9ef..8bbacb4 100644 --- a/nordicsemi/__main__.py +++ b/nordicsemi/__main__.py @@ -121,6 +121,25 @@ def display_debug_warning(): """ click.echo("{}".format(debug_warning)) +def display_settings_backup_warning(): + debug_warning = """ +|===============================================================| +|## ## ### ######## ## ## #### ## ## ###### | +|## ## ## ## ## ## ## ### ## ## ### ## ## ## | +|## ## ## ## ## ## ## #### ## ## #### ## ## | +|## ## ## ## ## ######## ## ## ## ## ## ## ## ## ####| +|## ## ## ######### ## ## ## #### ## ## #### ## ## | +|## ## ## ## ## ## ## ## ### ## ## ### ## ## | +| ### ### ## ## ## ## ## ## #### ## ## ###### | +|===============================================================| +|You are generating a DFU settings page with backup page | +|included. This is only required for bootloaders from nRF SDK | +|15.1 and newer. If you want to skip backup page genetation, | +|use --no-backup option. | +|===============================================================| +""" + click.echo("{}".format(debug_warning)) + def int_as_text_to_int(value): try: if value[:2].lower() == '0x': @@ -297,6 +316,9 @@ def generate(hex_file, if no_backup is None: no_backup = False + if no_backup == False: + display_settings_backup_warning() + if (start_address is not None) and (backup_address is None): click.echo("WARNING: Using default offset in order to calculate bootloader settings backup page")