Exemple #1
0
                cli_programmer, serial)
    else:
        report[STEP_CS_WRITE] = [
            STATUS_NOT_RUN, 'Feature not enabled in configuration'
        ]

    __print_report(report)


def parse_args():
    parser = ScriptArgumentsParser()
    parser.add_interface_args()
    parser.add_argument('--secure_cfg',
                        metavar='<file_path>',
                        dest='secure_cfg_file',
                        help='path to DA1469x-00 secure configuration file')
    parser.add_argument('--keys',
                        metavar='<file_path>',
                        dest='keys_file',
                        help='path to DA1469x-00 keys file')
    args = parser.parse_args()

    cli, serial = parser.get_interface_from_args(args)
    return args.secure_cfg_file, args.keys_file, cli, serial


if __name__ == '__main__':
    ui.print_header('PROGRAM PRODUCT KEYS AND CS (OTP)')
    run_script(secure_keys_prog, parse_args)
    ui.print_footer('FINISHED')
Exemple #2
0
                              metavar='<jlink_path>',
                              type=str,
                              help='path to jlink')

    security_group = parser.add_argument_group('security options')
    security_group.add_argument('--secure_config',
                                metavar='<security_cfg_path>',
                                dest='secure_config',
                                help='path to secure config')
    security_group.add_argument(
        '--keys',
        metavar='<keys_path>',
        dest='keys',
        help='path to keys to be written to OTP. This file is required '
        'also for secure image generation.')

    parser.add_argument('binary',
                        metavar='<app_binary>',
                        type=str,
                        help='path to binary to flash')
    parser.add_revision_args()
    args = parser.parse_args()
    return args.binary, args.bootloader, args.nobootloader, args.cfg, args.device_id, \
           args.jlink_path, args.secure_config, args.keys, args.prod_id


if __name__ == '__main__':
    ui.print_header('INITIAL FLASH')
    run_script(initial_flash, parse_args)
    ui.print_footer("FINISHED")