Skip to content

Commit

Permalink
fix: build for lns+
Browse files Browse the repository at this point in the history
  • Loading branch information
Edouard Merle committed Mar 2, 2022
1 parent 06d0795 commit eb6e377
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ DEFINES += MAJOR_VERSION=$(APPVERSION_M) MINOR_VERSION=$(APPVERSION_N) PATCH_VER

ifeq ($(TARGET_NAME),TARGET_NANOS)
ICONNAME=nanos_icon_password_manager.gif
else ifeq ($(TARGET_NAME),TARGET_NANOX)
else
ICONNAME=nanox_icon_password_manager.gif
endif

Expand Down Expand Up @@ -67,7 +67,7 @@ ifneq ($(TARGET_NAME), TARGET_BLUE)
DEFINES += HAVE_UX_FLOW
endif

ifeq ($(TARGET_NAME),TARGET_NANOX)
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
Expand All @@ -82,10 +82,10 @@ endif
DEBUG:=0
ifneq ($(DEBUG),0)
DEFINES += HAVE_STACK_OVERFLOW_CHECK
ifeq ($(TARGET_NAME),TARGET_NANOX)
DEFINES += HAVE_PRINTF PRINTF=mcu_usb_printf
else
ifeq ($(TARGET_NAME),TARGET_NANOS)
DEFINES += HAVE_PRINTF PRINTF=screen_printf
else
DEFINES += HAVE_PRINTF PRINTF=mcu_usb_printf
endif
else
DEFINES += PRINTF\(...\)=
Expand All @@ -108,15 +108,15 @@ ifeq ($(GCCPATH),)
$(info GCCPATH is not set: arm-none-eabi-* will be used from PATH)
endif

CC := $(CLANGPATH)clang
CC := $(CLANGPATH)clang

#CFLAGS += -O0
CFLAGS += -O3 -Os
AS := $(GCCPATH)arm-none-eabi-gcc

LD := $(GCCPATH)arm-none-eabi-gcc
LDFLAGS += -O3 -Os
LDLIBS += -lm -lgcc -lc
LDLIBS += -lm -lgcc -lc

# import rules to compile glyphs(/pone)
include $(BOLOS_SDK)/Makefile.glyphs
Expand Down
2 changes: 1 addition & 1 deletion src/keyboards/bolos_ux_nanox_keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "glyphs.h"

#ifdef TARGET_NANOX
#if defined(TARGET_NANOX) || defined(TARGET_NANOS2)

const bagl_element_t screen_common_keyboard_elements[] = {

Expand Down
2 changes: 1 addition & 1 deletion src/keyboards/keyboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ typedef struct keyboard_ctx {

char words_buffer[25];

#ifdef TARGET_NANOX
#if defined(TARGET_NANOX) || defined(TARGET_NANOS2)
char title[20];
#endif

Expand Down
4 changes: 2 additions & 2 deletions src/keyboards/text_keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const bagl_icon_details_t* const screen_keyboard_classes_icons[] = {
&C_icon_backspace,
&C_icon_validate,
&C_icon_classes,
#if defined(TARGET_NANOX)
#if defined(TARGET_NANOX) || defined(TARGET_NANOS2)
&C_icon_lowercase_invert,
&C_icon_uppercase_invert,
&C_icon_digits_invert,
Expand All @@ -48,7 +48,7 @@ void screen_keyboard_render_icon(unsigned int value) {
#if defined(TARGET_NANOS)
icon = (bagl_icon_details_t*) PIC(screen_keyboard_classes_icons[value]);
G_ux.tmp_element.component.y = 5;
#elif defined(TARGET_NANOX)
#elif defined(TARGET_NANOX) || defined(TARGET_NANOS2)
uint8_t inverted = G_ux.tmp_element.component.userid == 0x02;
icon = (bagl_icon_details_t*) PIC(screen_keyboard_classes_icons[value + (inverted ? 6 : 0)]);
G_ux.tmp_element.component.y -= 7;
Expand Down
6 changes: 3 additions & 3 deletions src/password_ui_flows.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ new_password_approve_step,
pb,
#if defined(TARGET_NANOS)
display_nickname_explanation(),
#elif defined(TARGET_NANOX)
#elif defined(TARGET_NANOX) || defined(TARGET_NANOS2)
enter_password_nickname(),
#endif
{
Expand Down Expand Up @@ -340,7 +340,7 @@ void create_password_entry() {
}

void enter_password_nickname() {
#if defined(TARGET_NANOX)
#if defined(TARGET_NANOX) || defined(TARGET_NANOS2)
strcpy(G_keyboard_ctx.title, "Enter nickname");
#endif
os_memset(G_keyboard_ctx.words_buffer, 0, sizeof(G_keyboard_ctx.words_buffer));
Expand Down Expand Up @@ -471,7 +471,7 @@ enter_keyboard_setting(1, HID_MAPPING_QWERTY_INTL),
&is_selected_icon,
#if defined(TARGET_NANOS)
"Qwerty Intl",
#elif defined(TARGET_NANOX)
#elif defined(TARGET_NANOX) || defined(TARGET_NANOS2)
"Qwerty International",
#endif
});
Expand Down

0 comments on commit eb6e377

Please sign in to comment.