diff --git a/runners/embedded/Makefile b/runners/embedded/Makefile index 7a6b3116..6865c753 100644 --- a/runners/embedded/Makefile +++ b/runners/embedded/Makefile @@ -32,10 +32,10 @@ CUSTOM_PROFILE=$(shell python3 -c "p = 'release-thin-lto' if '$(BOARD)' == 'nk3a NO_DELOG_FEATURE=$(shell python3 -c "print('no-delog') if 'no-delog' not in '$(FEATURES)'.split(',') and 'log-semihosting' not in '$(FEATURES)'.split(',') and 'log-rtt' not in '$(FEATURES)'.split(',') else None; ") SHOULD_BUILD_STD=$(shell python3 -c "p = True if '$(BOARD)' == 'nk3xn' and 'test' in '$(FEATURES)'.split(',') else False; print(p)") -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' - LITTLEFS_INTRINSICS_FEATURE='littlefs-software-intrinsics' +ifeq ($(SHOULD_BUILD_STD), True) + BUILD_STD=-Zbuild-std=core,alloc,panic_abort -Zbuild-std-features=panic_immediate_abort + export RUSTUP_TOOLCHAIN=nightly-2024-04-01 + LITTLEFS_INTRINSICS_FEATURE=littlefs-software-intrinsics endif RAW_OUT = $(CARGO_TARGET_DIR)/$(TARGET)/$(CUSTOM_PROFILE)/$(SOC)_runner @@ -113,7 +113,7 @@ build: build-banner check-var-BOARD check-var-SOC cargo --version # NRF52/test -> "release-thin-lto", use "release" otherwise - $(TOOLCHAIN) cargo build --target $(TARGET) \ + cargo build --target $(TARGET) \ --features $(BUILD_FEATURES) \ $(BUILD_STD) \ --quiet --profile $(CUSTOM_PROFILE)