Skip to content

Commit 6b1daf8

Browse files
committed
Changes from google#580
1 parent 645c1ba commit 6b1daf8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+3914
-4642
lines changed

.github/workflows/cargo_bloat.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Set up OpenSK
2626
run: ./setup.sh
2727
- name: Run bloat on the PR
28-
run: RUSTFLAGS="-C link-arg=-icf=all -C force-frame-pointers=no" cargo bloat --release --target=thumbv7em-none-eabi --features=with_ctap1,vendor_hid --crates >> .github/workflows/bloat_output_new.txt
28+
run: RUSTFLAGS="-C link-arg=-icf=all -C force-frame-pointers=no -C link-arg=-Tnrf52840_layout.ld" cargo bloat --release --target=thumbv7em-none-eabi --features=with_ctap1,vendor_hid --crates >> .github/workflows/bloat_output_new.txt
2929

3030
# Second run: PR
3131
- uses: actions/checkout@v2
@@ -41,7 +41,7 @@ jobs:
4141
run: ./setup.sh
4242
- name: Run bloat on base
4343
working-directory: ./OpenSK_base
44-
run: RUSTFLAGS="-C link-arg=-icf=all -C force-frame-pointers=no" cargo bloat --release --target=thumbv7em-none-eabi --features=with_ctap1,vendor_hid --crates >> "$GITHUB_WORKSPACE/.github/workflows/bloat_output_old.txt"
44+
run: RUSTFLAGS="-C link-arg=-icf=all -C force-frame-pointers=no -C link-arg=-Tnrf52840_layout.ld" cargo bloat --release --target=thumbv7em-none-eabi --features=with_ctap1,vendor_hid --crates >> "$GITHUB_WORKSPACE/.github/workflows/bloat_output_old.txt"
4545

4646
- name: Run output formatter to echo workflow command
4747
run: ./.github/workflows/bloat_formatter.sh bloat_output_new.txt bloat_output_old.txt bloat_comment.md

.github/workflows/cargo_clippy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
- uses: actions-rs/clippy-check@v1
2626
with:
2727
token: ${{ secrets.GITHUB_TOKEN }}
28-
args: --all-targets --features std
28+
args: --features std
2929
- name: Deny Clippy warnings (std)
30-
run: cargo clippy --all-targets --features std -- -A clippy::new_without_default -D warnings
30+
run: cargo clippy --features std -- -D warnings
3131
- name: Deny Clippy warnings (all)
32-
run: cargo clippy --all-targets --features std,with_ctap1,ed25519,vendor_hid -- -A clippy::new_without_default -D warnings
32+
run: cargo clippy --features std,with_ctap1,ed25519,vendor_hid -- -D warnings
3333
- name: Deny Clippy warnings (all, nfc)
34-
run: cargo clippy --all-targets --features std,with_ctap1,with_nfc,ed25519,vendor_hid -- -A clippy::new_without_default -D warnings
34+
run: cargo clippy --features std,with_ctap1,with_nfc,ed25519,vendor_hid -- -D warnings

Cargo.lock

Lines changed: 70 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,23 @@ authors = [
1010
license = "Apache-2.0"
1111
edition = "2018"
1212

13+
[target.'cfg(any(target_arch = "arm", target_arch = "riscv32"))'.dependencies.libtock_runtime]
14+
path = "third_party/libtock-rs/runtime"
15+
default-features = false
16+
features = ["no_auto_layout", "no_debug_memop"]
17+
1318
[dependencies]
14-
libtock_core = { path = "third_party/libtock-rs/core" }
19+
libtock_buttons = { path = "third_party/libtock-rs/apis/buttons" }
20+
libtock_platform = { path = "third_party/libtock-rs/platform" }
1521
libtock_drivers = { path = "third_party/libtock-drivers" }
22+
libtock_console = { path = "third_party/libtock-rs/apis/console" }
23+
libtock_leds = { path = "third_party/libtock-rs/apis/leds" }
1624
lang_items = { path = "third_party/lang-items" }
1725
opensk = { path = "libraries/opensk" }
1826
sk-cbor = { path = "libraries/cbor" }
1927
crypto = { path = "libraries/crypto" }
2028
persistent_store = { path = "libraries/persistent_store" }
29+
libtock_unittest = { path = "third_party/libtock-rs/unittest", optional = true }
2130
byteorder = { version = "1", default-features = false }
2231
arrayref = "0.3.6"
2332
rand_core = "0.6.4"
@@ -27,7 +36,7 @@ ed25519-compact = { version = "1", default-features = false, optional = true }
2736
debug_allocations = ["lang_items/debug_allocations"]
2837
debug_ctap = ["libtock_drivers/debug_ctap", "opensk/debug_ctap"]
2938
panic_console = ["lang_items/panic_console"]
30-
std = ["crypto/std", "lang_items/std", "persistent_store/std", "opensk/std"]
39+
std = ["crypto/std", "lang_items/std", "persistent_store/std", "opensk/std", "libtock_unittest"]
3140
verbose = ["debug_ctap", "libtock_drivers/verbose_usb"]
3241
with_ctap1 = ["crypto/with_ctap1", "opensk/with_ctap1"]
3342
with_nfc = ["libtock_drivers/with_nfc"]

boards/nordic/nrf52840_dongle_opensk/src/io.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ use kernel::hil::led;
77
use kernel::hil::uart::{self, Configure};
88
use nrf52840::gpio::Pin;
99

10-
use crate::CHIP;
11-
use crate::PROCESSES;
10+
use crate::{CHIP, PROCESSES, PROCESS_PRINTER};
1211

1312
struct Writer {
1413
initialized: bool,
@@ -31,7 +30,7 @@ impl IoWrite for Writer {
3130
let uart = nrf52840::uart::Uarte::new();
3231
if !self.initialized {
3332
self.initialized = true;
34-
uart.configure(uart::Parameters {
33+
let _ = uart.configure(uart::Parameters {
3534
baud_rate: 115200,
3635
stop_bits: uart::StopBits::One,
3736
parity: uart::Parity::None,
@@ -64,5 +63,6 @@ pub unsafe extern "C" fn panic_fmt(pi: &PanicInfo) -> ! {
6463
&cortexm4::support::nop,
6564
&PROCESSES,
6665
&CHIP,
66+
&PROCESS_PRINTER,
6767
)
6868
}

0 commit comments

Comments
 (0)