We can haz debugger support!!!!! Begone -Og

This commit is contained in:
Willy-JL
2024-02-10 03:20:37 +00:00
parent 27ce00b06f
commit 026eef7db9
3 changed files with 11 additions and 8 deletions

View File

@@ -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,

View File

@@ -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);