Skip to content

Commit

Permalink
add option --jlink-remote to app
Browse files Browse the repository at this point in the history
  • Loading branch information
blavka committed Jan 13, 2024
1 parent b085356 commit 94669db
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/hardwario/chester/cli/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@

@click.group(name='app')
@click.option('--nrfjprog-log', is_flag=True, help='Enable nrfjprog logging.')
@click.option('--jlink-sn', '-n', type=int, metavar='SERIAL_NUMBER', help='Specify J-Link serial number.')
@click.option('--jlink-speed', type=int, metavar="SPEED", help='Specify J-Link clock speed in kHz.', default=DEFAULT_JLINK_SPEED_KHZ, show_default=True)
@click.option('--jlink-remote', type=str, metavar='REMOTE_HOST', help='Use remote J-Link connection.')
@click.pass_context
def cli(ctx, nrfjprog_log):
def cli(ctx, nrfjprog_log, jlink_sn, jlink_speed, jlink_remote):
'''Application SoC commands.'''
ctx.obj['prog'] = NRFJProg('app', log=nrfjprog_log)
ctx.obj['prog'] = NRFJProg('app', jlink_sn=jlink_sn, jlink_speed=jlink_speed, log=nrfjprog_log)
ctx.obj['prog'].set_remote(jlink_remote)


def validate_hex_file(ctx, param, value):
Expand Down Expand Up @@ -337,12 +341,12 @@ def command_fw_info(ctx, id, show_all):
click.echo(f'Build Manifest: {json.dumps(fw["manifest"])}')


@cli.command('build')
# @click.option('--halt', is_flag=True, help='Halt program.')
# @click.argument('hex_file', metavar='HEX_FILE', type=click.Path(exists=True))
@click.pass_context
def command_build(ctx):
build('.')
# @cli.command('build')
# # @click.option('--halt', is_flag=True, help='Halt program.')
# # @click.argument('hex_file', metavar='HEX_FILE', type=click.Path(exists=True))
# @click.pass_context
# def command_build(ctx):
# build('.')


def main():
Expand Down

0 comments on commit 94669db

Please sign in to comment.