Skip to content

Commit

Permalink
remove local debug config
Browse files Browse the repository at this point in the history
  • Loading branch information
Z4karia authored Apr 11, 2024
1 parent 6acedde commit 2806bdd
Showing 1 changed file with 1 addition and 26 deletions.
27 changes: 1 addition & 26 deletions app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,35 +66,10 @@ endif
include $(CURDIR)/../deps/ledger-zxlib/makefiles/Makefile.platform
DEFINES += HAVE_HASH HAVE_BLAKE2 HAVE_SHA256 HAVE_SHA512
CFLAGS += -I$(MY_DIR)/../deps/tinycbor/src
CFLAGS += -g3 -ggdb3 -Og
CFLAGS += -g3 -ggdb3 -O3
APP_SOURCE_PATH += $(MY_DIR)/../deps/tinycbor-ledger
APP_SOURCE_PATH += $(MY_DIR)/../deps/jsmn/src

#DEBUG = 10

# Enabling debug PRINTF_S
ifneq ($(DEBUG),0)
$(warning DEBUG enabled)
DEFINES += OS_IO_SEPROXYHAL HAVE_BAGL HAVE_SPRINTF
DEFINES += HAVE_STACK_OVERFLOW_CHECK
SDK_SOURCE_PATH += lib_stusb lib_stusb_impl lib_u2f
DEFINES += HAVE_IO_USB HAVE_L4_USBLIB IO_HID_EP_LENGTH=64 HAVE_USB_APDU

ifeq ($(DEBUG),10)
$(warning Using semihosted PRINTF_S. Only run with speculos!)
CFLAGS += -include src/dbg/debug.h
DEFINES += HAVE_PRINTF PRINTF_S=semihosted_printf
else
ifeq ($(TARGET_NAME),TARGET_NANOX)
DEFINES += HAVE_PRINTF PRINTF_S=mcu_usb_printf
else
DEFINES += HAVE_PRINTF PRINTF_S=screen_printf
endif

endif
else
DEFINES += PRINTF_S\(...\)=
endif

.PHONY: rust
rust:
Expand Down

0 comments on commit 2806bdd

Please sign in to comment.