diff --git a/.gitignore b/.gitignore index ff18f1b..e99b25d 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,8 @@ bin/ debug/ dep/ obj/ +tests/elfs/ +build/ # Editors .idea/ diff --git a/Makefile b/Makefile index e691f89..8cea97c 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,6 @@ endif include $(BOLOS_SDK)/Makefile.defines -# EDIT THIS: Put your plugin name APPNAME = "Kiln" ifeq ($(ETHEREUM_PLUGIN_SDK),) @@ -37,7 +36,6 @@ APPVERSION_N = 1 APPVERSION_P = 1 APPVERSION = "$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)" -# EDIT THIS: Change the name of the gif, and generate you own GIFs! ifeq ($(TARGET_NAME), TARGET_NANOS) ICONNAME=icons/nanos_app_kiln.gif else @@ -54,14 +52,15 @@ all: default ############ DEFINES += OS_IO_SEPROXYHAL -DEFINES += HAVE_BAGL HAVE_SPRINTF +DEFINES += HAVE_SPRINTF DEFINES += LEDGER_MAJOR_VERSION=$(APPVERSION_M) LEDGER_MINOR_VERSION=$(APPVERSION_N) LEDGER_PATCH_VERSION=$(APPVERSION_P) DEFINES += IO_HID_EP_LENGTH=64 DEFINES += UNUSED\(x\)=\(void\)x DEFINES += APPVERSION=\"$(APPVERSION)\" +CFLAGS += -DAPPNAME=\"$(APPNAME)\" -ifeq ($(TARGET_NAME),TARGET_NANOX) +ifneq (,$(filter $(TARGET_NAME),TARGET_NANOX TARGET_STAX)) DEFINES += HAVE_BLE BLE_COMMAND_TIMEOUT_MS=2000 DEFINES += HAVE_BLE_APDU # basic ledger apdu transport over BLE endif @@ -70,6 +69,11 @@ ifeq ($(TARGET_NAME),TARGET_NANOS) DEFINES += IO_SEPROXYHAL_BUFFER_SIZE_B=128 else DEFINES += IO_SEPROXYHAL_BUFFER_SIZE_B=300 +endif + +ifneq ($(TARGET_NAME),TARGET_STAX) +DEFINES += HAVE_BAGL +ifneq ($(TARGET_NAME),TARGET_NANOS) DEFINES += HAVE_GLO096 DEFINES += HAVE_BAGL BAGL_WIDTH=128 BAGL_HEIGHT=64 DEFINES += HAVE_BAGL_ELLIPSIS # long label truncation feature @@ -78,10 +82,9 @@ DEFINES += HAVE_BAGL_FONT_OPEN_SANS_EXTRABOLD_11PX DEFINES += HAVE_BAGL_FONT_OPEN_SANS_LIGHT_16PX DEFINES += HAVE_UX_FLOW endif - +endif # Enabling debug PRINTF -DEBUG:= 0 ifneq ($(DEBUG),0) DEFINES += HAVE_SEMIHOSTED_PRINTF PRINTF=semihosted_printf CFLAGS += -include src/dbg/debug.h @@ -108,12 +111,11 @@ endif CC := $(CLANGPATH)clang -CFLAGS += -Oz -Wno-format-invalid-specifier -Wno-format-extra-args +CFLAGS += -Wno-format-invalid-specifier -Wno-format-extra-args AS := $(GCCPATH)arm-none-eabi-gcc LD := $(GCCPATH)arm-none-eabi-gcc -LDFLAGS += -O3 -Os LDLIBS += -lm -lgcc -lc # import rules to compile glyphs(/pone) @@ -121,14 +123,13 @@ include $(BOLOS_SDK)/Makefile.glyphs ### variables processed by the common makefile.rules of the SDK to grab source files and include dirs APP_SOURCE_PATH += src $(ETHEREUM_PLUGIN_SDK) +ifneq ($(TARGET_NAME), TARGET_STAX) SDK_SOURCE_PATH += lib_ux +endif ifneq (,$(findstring HAVE_BLE,$(DEFINES))) SDK_SOURCE_PATH += lib_blewbxx lib_blewbxx_impl endif -# remove UX warnings from SDK even though the plugin doesn't use it -DEFINES += HAVE_UX_FLOW - ### initialize plugin SDK submodule if needed ifneq ($(shell git submodule status | grep '^[-+]'),) $(info INFO: Need to reinitialize git submodules) @@ -149,5 +150,4 @@ include $(BOLOS_SDK)/Makefile.rules dep/%.d: %.c Makefile listvariants: - # EDIT THIS: replace `boilerplate` by the lowercase name of your plugin @echo VARIANTS NONE kiln