Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ftheirs committed Jun 28, 2024
1 parent 8eaab22 commit f4eeac0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 25 deletions.
22 changes: 2 additions & 20 deletions app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand All @@ -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
Expand Down
7 changes: 2 additions & 5 deletions app/src/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -180,13 +179,15 @@ bool crypto_extractPublicKeyHash(uint8_t *pubKeyHash, uint16_t pubKeyLen) {
return false;
}

#ifdef APP_TESTING
{
zemu_log("pubKey: ***");
char buffer[PK_LEN_SECP256K1 * 3];
array_to_hexstr(buffer, PK_LEN_SECP256K1 * 3, publicKey, PK_LEN_SECP256K1 );
zemu_log(buffer);
zemu_log("\n");
}
#endif

// calculates the sha256 + ripemd160
address_temp_t address_temp;
Expand Down Expand Up @@ -273,7 +274,3 @@ zxerr_t crypto_sign(uint8_t *buffer, uint16_t signatureMaxlen, const uint8_t *me

return zxerr;
}

#endif


2 changes: 2 additions & 0 deletions tests_zemu/tests/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
]

0 comments on commit f4eeac0

Please sign in to comment.