From 95658063af3223e5a1f197084b87822d8c01484e Mon Sep 17 00:00:00 2001 From: hedger Date: Tue, 2 Jul 2024 15:17:05 +0300 Subject: [PATCH] updater: slightly smaller image (#3740) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: あく --- lib/print/SConscript | 3 +++ targets/f7/furi_hal/furi_hal_flash.c | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/print/SConscript b/lib/print/SConscript index 819e60bf0..07be8d890 100644 --- a/lib/print/SConscript +++ b/lib/print/SConscript @@ -107,6 +107,9 @@ env.Append( libenv = env.Clone(FW_LIB_NAME="print") libenv.ApplyLibFlags() +if env["RAM_EXEC"]: + libenv.AppendUnique(CPPDEFINES=["PRINTF_DISABLE_SUPPORT_FLOAT"]) + libenv.Append(CCFLAGS=["-Wno-double-promotion"]) sources = libenv.GlobRecursive("*.c*", ".") diff --git a/targets/f7/furi_hal/furi_hal_flash.c b/targets/f7/furi_hal/furi_hal_flash.c index 8999edaed..e9f2e532e 100644 --- a/targets/f7/furi_hal/furi_hal_flash.c +++ b/targets/f7/furi_hal/furi_hal_flash.c @@ -319,9 +319,9 @@ void furi_hal_flash_erase(uint8_t page) { op_stat = DWT->CYCCNT - op_stat; FURI_LOG_T( TAG, - "erase took %lu clocks or %fus", + "erase took %lu clocks or %luus", op_stat, - (double)((float)op_stat / (float)furi_hal_cortex_instructions_per_microsecond())); + op_stat / furi_hal_cortex_instructions_per_microsecond()); } static inline void furi_hal_flash_write_dword_internal_nowait(size_t address, uint64_t* data) { @@ -448,9 +448,9 @@ void furi_hal_flash_program_page(const uint8_t page, const uint8_t* data, uint16 op_stat = DWT->CYCCNT - op_stat; FURI_LOG_T( TAG, - "program_page took %lu clocks or %fus", + "program_page took %lu clocks or %luus", op_stat, - (double)((float)op_stat / (float)furi_hal_cortex_instructions_per_microsecond())); + op_stat / furi_hal_cortex_instructions_per_microsecond()); } int16_t furi_hal_flash_get_page_number(size_t address) {