Skip to content

Commit

Permalink
Fixed the output file name in log output for ESP32 factory partition …
Browse files Browse the repository at this point in the history
…script
  • Loading branch information
shripad621git committed Apr 25, 2024
1 parent 72eab93 commit b510714
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/tools/generate_esp32_chip_factory_bin.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,13 +412,13 @@ def generate_nvs_bin(encrypt, size, csv_filename, bin_filename, output_dir):
nvs_partition_gen.generate(nvs_args)


def print_flashing_help(encrypt, bin_filename):
def print_flashing_help(encrypt, output_dir, bin_filename):
logging.info('Run below command to flash {}'.format(bin_filename))
logging.info('esptool.py -p (PORT) write_flash (FACTORY_PARTITION_ADDR) {}'.format(os.path.join(os.getcwd(), bin_filename)))
logging.info('esptool.py -p (PORT) write_flash (FACTORY_PARTITION_ADDR) {}'.format(os.path.join(os.getcwd(), output_dir, bin_filename)))
if (encrypt):
logging.info('Run below command to flash {}'.format(NVS_KEY_PARTITION_BIN))
logging.info('esptool.py -p (PORT) write_flash --encrypt (NVS_KEY_PARTITION_ADDR) {}'.format(
os.path.join(os.getcwd(), 'keys', NVS_KEY_PARTITION_BIN)))
os.path.join(os.getcwd(), output_dir, 'keys', NVS_KEY_PARTITION_BIN)))


def clean_up():
Expand Down Expand Up @@ -478,7 +478,7 @@ def any_base_int(s): return int(s, 0)
help='Encrypt the factory parititon NVS binary')
parser.add_argument('--no-bin', action='store_false', dest='generate_bin',
help='Do not generate the factory partition binary')
parser.add_argument('--output_dir', type=str, default='bin', help='Created image output file path')
parser.add_argument('--output_dir', type=str, default='out', help='Created image output file path')

parser.add_argument('-cf', '--commissioning-flow', type=any_base_int, default=0,
help='Device commissioning flow, 0:Standard, 1:User-Intent, 2:Custom. \
Expand Down Expand Up @@ -509,7 +509,7 @@ def generate_factory_partiton_binary(args):
generate_nvs_csv(FACTORY_PARTITION_CSV)
if args.generate_bin:
generate_nvs_bin(args.encrypt, args.size, FACTORY_PARTITION_CSV, FACTORY_PARTITION_BIN, args.output_dir)
print_flashing_help(args.encrypt, FACTORY_PARTITION_BIN)
print_flashing_help(args.encrypt, args.output_dir, FACTORY_PARTITION_BIN)
clean_up()


Expand Down

0 comments on commit b510714

Please sign in to comment.