From 06444789bb1145679dd966fa2d3240cf806b2eac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=82=E3=81=8F?= Date: Wed, 13 Oct 2021 20:33:09 +0300 Subject: [PATCH] Makefile: optimize space usage. (#761) --- applications/gui/canvas.c | 4 ++-- core/furi/check.h | 6 +++--- make/toolchain.mk | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/applications/gui/canvas.c b/applications/gui/canvas.c index dec5e4d8..c9481f86 100644 --- a/applications/gui/canvas.c +++ b/applications/gui/canvas.c @@ -110,11 +110,11 @@ void canvas_set_font(Canvas* canvas, Font font) { furi_assert(canvas); u8g2_SetFontMode(&canvas->fb, 1); if(font == FontPrimary) { - u8g2_SetFont(&canvas->fb, u8g2_font_helvB08_tf); + u8g2_SetFont(&canvas->fb, u8g2_font_helvB08_tr); } else if(font == FontSecondary) { u8g2_SetFont(&canvas->fb, u8g2_font_haxrcorp4089_tr); } else if(font == FontKeyboard) { - u8g2_SetFont(&canvas->fb, u8g2_font_profont11_mf); + u8g2_SetFont(&canvas->fb, u8g2_font_profont11_mr); } else if(font == FontBigNumbers) { u8g2_SetFont(&canvas->fb, u8g2_font_profont22_tn); } else { diff --git a/core/furi/check.h b/core/furi/check.h index 5115fda3..7f555d1b 100644 --- a/core/furi/check.h +++ b/core/furi/check.h @@ -8,10 +8,10 @@ extern "C" { #define furi_check(__e) ((__e) ? (void)0 : furi_crash("fury_check failed\r\n")) /** Only in debug build: Assert condition and crash if assert failed */ -#ifdef NDEBUG -#define furi_assert(__e) ((void)0) -#else +#ifdef FURI_DEBUG #define furi_assert(__e) ((__e) ? (void)0 : furi_crash("furi_assert failed\r\n")) +#else +#define furi_assert(__e) ((void)0) #endif /** Crash system */ diff --git a/make/toolchain.mk b/make/toolchain.mk index ab6da9bd..9b4f6f8e 100644 --- a/make/toolchain.mk +++ b/make/toolchain.mk @@ -18,11 +18,11 @@ BIN = $(CP) -O binary -S DEBUG ?= 1 COMPACT ?= 0 ifeq ($(DEBUG), 1) -CFLAGS += -DDEBUG -Og -g +CFLAGS += -DFURI_DEBUG -DNDEBUG -DLFS_NO_ASSERT -Og -g else ifeq ($(COMPACT), 1) -CFLAGS += -DNDEBUG -DLFS_NO_ASSERT -Os +CFLAGS += -DFURI_NDEBUG -DNDEBUG -DLFS_NO_ASSERT -Os else -CFLAGS += -DNDEBUG -DLFS_NO_ASSERT -Og +CFLAGS += -DFURI_NDEBUG -DNDEBUG -DLFS_NO_ASSERT -Og endif CFLAGS += -fdata-sections -ffunction-sections -fno-math-errno -fstack-usage -MMD -MP -MF"$(@:%.o=%.d)"