Skip to content

Commit

Permalink
Fix intrinsics error
Browse files Browse the repository at this point in the history
  • Loading branch information
sosthene-nitrokey committed Apr 4, 2024
1 parent 724ddd1 commit 535490d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 32 deletions.
41 changes: 13 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ apdu-dispatch = { git = "https://github.com/Nitrokey/apdu-dispatch.git", tag = "
ctap-types = { git = "https://github.com/trussed-dev/ctap-types.git", rev = "a9f8003a1d9f05f9eea39e615b9159bc0613fcb5" }
ctaphid-dispatch = { git = "https://github.com/Nitrokey/ctaphid-dispatch.git", tag = "v0.1.1-nitrokey.3" }
littlefs2 = { git = "https://github.com/trussed-dev/littlefs2", rev = "ebd27e49ca321089d01d8c9b169c4aeb58ceeeca" }
littlefs2-sys = { git = "https://github.com/trussed-dev/littlefs2-sys.git", rev = "39626c0dbc2f6c38b74889a5bf9d5a200614f121" }
usbd-ctaphid = { git = "https://github.com/trussed-dev/usbd-ctaphid.git", rev = "1db2e014f28669bc484c81ab0406c54b16bba33c" }
usbd-ccid = { git = "https://github.com/Nitrokey/usbd-ccid", tag = "v0.2.0-nitrokey.1" }
p256-cortex-m4 = { git = "https://github.com/ycrypto/p256-cortex-m4.git", rev = "cdb31e12594b4dc1f045b860a885fdc94d96aee2" }
Expand Down
6 changes: 6 additions & 0 deletions runners/embedded/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ systick-monotonic = { version = "1.0.0", optional = true }
### Allocator
alloc-cortex-m = { version = "0.4.3", optional = true }

# littlefs2-sys for intrinsics feature
littlefs2-sys = { version = "0.1.7", optional = true }

[build-dependencies]
cargo-lock = "7"
memory-regions = "1"
Expand All @@ -60,6 +63,9 @@ provisioner = ["apps/nk3-provisioner", "boards/provisioner", "write-undefined-fl

no-delog = ["boards/no-delog", "delog/knock-it-off"]

# Disable littlefs use of compiler intrinsics
littlefs-software-intrinsics = ["dep:littlefs2-sys", "littlefs2-sys/software-intrinsics"]

# Do not use encryption for the filesystem
no-encrypted-storage = ["boards/no-encrypted-storage"]

Expand Down
6 changes: 2 additions & 4 deletions runners/embedded/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,13 @@ SHOULD_BUILD_STD=$(shell python3 -c "p = True if '$(BOARD)' == 'nk3xn' and 'test
ifeq ($(SHOULD_BUILD_STD), "True")
BUILD_STD='-Zbuild-std=core,alloc,panic_abort -Zbuild-std-features=panic_immediate_abort'
TOOLCHAIN='RUSTUP_TOOLCHAIN=nightly-2024-04-01'
else
BUILD_STD=''
TOOLCHAIN=''
LITTLEFS_INTRINSICS_FEATURE='littlefs-software-intrinsics'
endif

RAW_OUT = $(CARGO_TARGET_DIR)/$(TARGET)/$(CUSTOM_PROFILE)/$(SOC)_runner

# feature definition
BUILD_FEATURES := board-$(BOARD),$(FEATURES),$(NO_DELOG_FEATURE)
BUILD_FEATURES := board-$(BOARD),$(FEATURES),$(NO_DELOG_FEATURE),$(LITTLEFS_INTRINSICS_FEATURE)

.PHONY: list build build-all reset program check doc check-all clean clean-all check-env set-vars lint-all lint

Expand Down

0 comments on commit 535490d

Please sign in to comment.