Skip to content

Commit

Permalink
minor update for Nano X
Browse files Browse the repository at this point in the history
  • Loading branch information
TamtamHero committed Apr 23, 2019
1 parent 93d68ac commit cf5762e
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 7 deletions.
32 changes: 29 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,14 @@ show-app:
# Platform #
############

DEFINES += OS_IO_SEPROXYHAL IO_SEPROXYHAL_BUFFER_SIZE_B=128
DEFINES += OS_IO_SEPROXYHAL
DEFINES += HAVE_BAGL HAVE_PRINTF
DEFINES += HAVE_IO_USB HAVE_L4_USBLIB IO_USB_MAX_ENDPOINTS=6 IO_HID_EP_LENGTH=64 HAVE_USB_APDU
DEFINES += VERSION=\"$(APPVERSION)\" APPVERSION_M=$(APPVERSION_M)
DEFINES += COMMIT=\"$(COMMIT)\" APPVERSION_N=$(APPVERSION_N) APPVERSION_P=$(APPVERSION_P)

ifeq ($(TARGET_NAME),TARGET_NANOX)
DEFINES += IO_SEPROXYHAL_BUFFER_SIZE_B=300
DEFINES += HAVE_BLE BLE_COMMAND_TIMEOUT_MS=2000
DEFINES += HAVE_BLE_APDU # basic ledger apdu transport over BLE

Expand All @@ -78,15 +79,40 @@ DEFINES += HAVE_BAGL_FONT_OPEN_SANS_LIGHT_16PX

SDK_SOURCE_PATH += lib_blewbxx lib_blewbxx_impl
SDK_SOURCE_PATH += lib_ux
else
DEFINES += IO_SEPROXYHAL_BUFFER_SIZE_B=128
endif

# Enabling debug PRINTF
DEBUG = 0
ifneq ($(DEBUG),0)

ifeq ($(TARGET_NAME),TARGET_NANOX)
DEFINES += HAVE_PRINTF PRINTF=mcu_usb_printf
else
DEFINES += HAVE_PRINTF PRINTF=screen_printf
endif
else
DEFINES += PRINTF\(...\)=
endif



##############
# Compiler #
# Compiler #
##############
ifneq ($(BOLOS_ENV),)
GCCPATH := $(BOLOS_ENV)/gcc-arm-none-eabi-5_3-2016q1/bin/
$(info BOLOS_ENV=$(BOLOS_ENV))
CLANGPATH := $(BOLOS_ENV)/clang-arm-fropi/bin/
GCCPATH := $(BOLOS_ENV)/gcc-arm-none-eabi-5_3-2016q1/bin/
else
$(info BOLOS_ENV is not set: falling back to CLANGPATH and GCCPATH)
endif
ifeq ($(CLANGPATH),)
$(info CLANGPATH is not set: clang will be used from PATH)
endif
ifeq ($(GCCPATH),)
$(info GCCPATH is not set: arm-none-eabi-* will be used from PATH)
endif

CC := $(CLANGPATH)clang
Expand Down
Binary file added glyphs/icon_dashboard_x.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/globals.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void init_globals(void) {
# ifdef TARGET_NANOX
nvram_data const N_data_real;
# else
WIDE nvram_data N_data_real; // TODO: What does WIDE actually mean?
nvram_data N_data_real;
# endif

high_watermark_t *select_hwm_by_chain(chain_id_t const chain_id, nvram_data *const ram) {
Expand Down
4 changes: 2 additions & 2 deletions src/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ static inline void throw_stack_size() {
extern nvram_data const N_data_real;
# define N_data (*(volatile nvram_data *)PIC(&N_data_real))
# else
extern WIDE nvram_data N_data_real; // TODO: What does WIDE actually mean?
# define N_data (*(WIDE nvram_data*)PIC(&N_data_real))
extern nvram_data N_data_real;
# define N_data (*(nvram_data*)PIC(&N_data_real))
# endif

void update_baking_idle_screens(void);
Expand Down
2 changes: 1 addition & 1 deletion src/ui_nano_x.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ UX_STEP_CB(
pb,
exit_app(),
{
&C_icon_dashboard,
&C_icon_dashboard_x,
"Quit",
});

Expand Down

0 comments on commit cf5762e

Please sign in to comment.