diff --git a/app/Makefile b/app/Makefile index 9c3a510e..2fa2dadb 100755 --- a/app/Makefile +++ b/app/Makefile @@ -86,26 +86,6 @@ else APP_STACK_MIN_SIZE := 2000 endif -# Enable app features depending on the target device -ifeq ($(TARGET_NAME), TARGET_NANOS) -RUST_TARGET := thumbv6m-none-eabi -endif - -ifeq ($(TARGET_NAME), TARGET_NANOX) -RUST_TARGET := thumbv6m-none-eabi -endif - -ifeq ($(TARGET_NAME), TARGET_NANOS2) -RUST_TARGET := thumbv6m-none-eabi -endif - -ifeq ($(TARGET_NAME), TARGET_STAX) -RUST_TARGET := thumbv6m-none-eabi -DEFINES += ICONGLYPH=C_icon_stax_64 -DEFINES += ICONBITMAP=C_icon_stax_64 -DEFINES += ICONGLYPH_SMALL=C_icon_stax_32 -endif - include $(CURDIR)/../deps/ledger-zxlib/makefiles/Makefile.platform INCLUDES_PATH += $(CURDIR)/src/common/ @@ -122,6 +102,8 @@ CFLAGS += -DAPPVERSION_M=$(APPVERSION_M) -DAPPVERSION_N=$(APPVERSION_N) -DAPPVER AS := $(GCCPATH)arm-none-eabi-gcc AFLAGS += +RUST_TARGET := thumbv6m-none-eabi + LD := $(GCCPATH)arm-none-eabi-gcc LDFLAGS += -z muldefs LDLIBS += -lm -lgcc -lc diff --git a/app/src/crypto.c b/app/src/crypto.c index c13f0522..ac56fa5a 100644 --- a/app/src/crypto.c +++ b/app/src/crypto.c @@ -32,7 +32,6 @@ bool isTestnet() { hdPath[1] == HDPATH_1_TESTNET; } -#if defined(TARGET_NANOS) || defined(TARGET_NANOX) || defined(TARGET_NANOS2) || defined(TARGET_STAX) #include "cx.h" bool ripemd160(uint8_t *in, uint16_t inLen, uint8_t *out) { @@ -180,6 +179,7 @@ bool crypto_extractPublicKeyHash(uint8_t *pubKeyHash, uint16_t pubKeyLen) { return false; } +#ifdef APP_TESTING { zemu_log("pubKey: ***"); char buffer[PK_LEN_SECP256K1 * 3]; @@ -187,6 +187,7 @@ bool crypto_extractPublicKeyHash(uint8_t *pubKeyHash, uint16_t pubKeyLen) { zemu_log(buffer); zemu_log("\n"); } +#endif // calculates the sha256 + ripemd160 address_temp_t address_temp; @@ -273,7 +274,3 @@ zxerr_t crypto_sign(uint8_t *buffer, uint16_t signatureMaxlen, const uint8_t *me return zxerr; } - -#endif - - diff --git a/tests_zemu/tests/common.ts b/tests_zemu/tests/common.ts index 9c09f363..af7d37c6 100644 --- a/tests_zemu/tests/common.ts +++ b/tests_zemu/tests/common.ts @@ -7,9 +7,11 @@ export const APP_SEED = 'equip will roof matter pink blind book anxiety banner e const APP_PATH_S = Resolve('../app/output/app_s.elf') const APP_PATH_X = Resolve('../app/output/app_x.elf') const APP_PATH_SP = Resolve('../app/output/app_s2.elf') +const APP_PATH_ST = Resolve('../app/output/app_stax.elf') export const models: IDeviceModel[] = [ { name: 'nanos', prefix: 'S', path: APP_PATH_S }, { name: 'nanox', prefix: 'X', path: APP_PATH_X }, { name: 'nanosp', prefix: 'SP', path: APP_PATH_SP }, + { name: 'stax', prefix: 'ST', path: APP_PATH_ST }, ]