diff --git a/applications/system/updater/util/update_task_worker_backup.c b/applications/system/updater/util/update_task_worker_backup.c index 50d54cf14..636fc0064 100644 --- a/applications/system/updater/util/update_task_worker_backup.c +++ b/applications/system/updater/util/update_task_worker_backup.c @@ -165,6 +165,15 @@ static bool update_task_post_update(UpdateTask* update_task) { CHECK_RESULT(lfs_backup_unpack(update_task->storage, furi_string_get_cstr(file_path))); +#ifdef FURI_DEBUG + furi_hal_rtc_set_flag(FuriHalRtcFlagDebug); +#else + furi_hal_rtc_set_log_level(FuriLogLevelNone); + furi_hal_rtc_reset_flag(FuriHalRtcFlagDebug); + furi_hal_rtc_reset_flag(FuriHalRtcFlagLegacySleep); + furi_hal_rtc_set_heap_track_mode(FuriHalRtcHeapTrackModeNone); +#endif + if(update_task->state.groups & UpdateTaskStageGroupResources) { TarUnpackProgress progress = { .update_task = update_task, diff --git a/applications/system/updater/util/update_task_worker_flasher.c b/applications/system/updater/util/update_task_worker_flasher.c index 61b9edada..9e12757ce 100644 --- a/applications/system/updater/util/update_task_worker_flasher.c +++ b/applications/system/updater/util/update_task_worker_flasher.c @@ -344,13 +344,7 @@ int32_t update_task_worker_flash_writer(void* context) { furi_hal_rtc_set_boot_mode(FuriHalRtcBootModePostUpdate); // Format LFS before restoring backup on next boot furi_hal_rtc_set_flag(FuriHalRtcFlagStorageFormatInternal); -#ifdef FURI_NDEBUG - // Production - furi_hal_rtc_set_log_level(FuriLogLevelNone); - furi_hal_rtc_reset_flag(FuriHalRtcFlagDebug); - furi_hal_rtc_reset_flag(FuriHalRtcFlagLegacySleep); - furi_hal_rtc_set_heap_track_mode(FuriHalRtcHeapTrackModeNone); -#endif + update_task_set_progress(update_task, UpdateTaskStageCompleted, 100); success = true; } while(false); diff --git a/site_scons/firmwareopts.scons b/site_scons/firmwareopts.scons index 2e4a1ba22..4cbe0860f 100644 --- a/site_scons/firmwareopts.scons +++ b/site_scons/firmwareopts.scons @@ -8,7 +8,7 @@ if ENV["DEBUG"] and ENV["IS_BASE_FIRMWARE"]: "NDEBUG", ], CCFLAGS=[ - "-Og", + "-Os" if ENV["COMPACT"] else "-Og", ], ) elif ENV["COMPACT"]: