Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Add a warning about overwriting nRF DFU settings backup page
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchy committed Sep 21, 2018
1 parent 8163c4b commit 1348f91
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions nordicsemi/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down Expand Up @@ -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")

Expand Down

0 comments on commit 1348f91

Please sign in to comment.