google / OpenSK

OpenSK is an open-source implementation for security keys written in Rust that supports both FIDO U2F and FIDO2 standards.
Apache License 2.0
3k stars 289 forks source link

App object has no attribute get_binary #79

Closed mweinelt closed 4 years ago

mweinelt commented 4 years ago

Expected Behavior

deploy.py should build the image to be flashed.

Actual Behavior

It fails with an AttributeError, because there is no function defintion for get_binary(). Looks to me like the issue was introduced in #78

% ./deploy.py --board=nrf52840_mdk_dfu --opensk --programmer=none
info: Updating rust toolchain to nightly-2020-02-03
info: syncing channel updates for 'nightly-2020-02-03-x86_64-unknown-linux-gnu'
info: component 'rust-std' for target 'thumbv7em-none-eabi' is up to date
info: Rust toolchain up-to-date
info: Building Tock OS for board nrf52840_mdk_dfu
    Finished release [optimized + debuginfo] target(s) in 0.49s
info: Building OpenSK application
    Finished release [optimized] target(s) in 0.64s
info: Generating Tock TAB file for application/example ctap2
Traceback (most recent call last):
  File "./deploy.py", line 772, in <module>
    main(main_parser.parse_args())
  File "./deploy.py", line 645, in main
    OpenSKInstaller(args).run()
  File "./deploy.py", line 595, in run
    self.create_hex_file(dest_file)
  File "./deploy.py", line 508, in create_hex_file
    app_tab.extract_app(board_props.arch).get_binary(),
AttributeError: 'App' object has no attribute 'get_binary'

Steps to Reproduce the Problem

  1. ./setup.sh
  2. ./deploy.py --board=nrf52540_mdk_dfu --opensk --programmer=none

Specifications

jmichelp commented 4 years ago

This is due to tockloader project. The last version available on PyPI is v1.3 and we need v1.4 which isn't released yet. Brad mentioned he's working on releasing v1.4

diegobes commented 4 years ago

As a workaround: 1- uninstall tockloader: pip3 uninstall tockloader 2- clone tockloader repository 3- from the tockloader repository root: python3 setup.py install This will install the latest version from master with App.get_binary support