mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 15:58:36 -07:00
We can haz debugger support!!!!! Begone -Og
This commit is contained in:
@@ -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)));
|
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) {
|
if(update_task->state.groups & UpdateTaskStageGroupResources) {
|
||||||
TarUnpackProgress progress = {
|
TarUnpackProgress progress = {
|
||||||
.update_task = update_task,
|
.update_task = update_task,
|
||||||
|
|||||||
@@ -344,13 +344,7 @@ int32_t update_task_worker_flash_writer(void* context) {
|
|||||||
furi_hal_rtc_set_boot_mode(FuriHalRtcBootModePostUpdate);
|
furi_hal_rtc_set_boot_mode(FuriHalRtcBootModePostUpdate);
|
||||||
// Format LFS before restoring backup on next boot
|
// Format LFS before restoring backup on next boot
|
||||||
furi_hal_rtc_set_flag(FuriHalRtcFlagStorageFormatInternal);
|
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);
|
update_task_set_progress(update_task, UpdateTaskStageCompleted, 100);
|
||||||
success = true;
|
success = true;
|
||||||
} while(false);
|
} while(false);
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ if ENV["DEBUG"] and ENV["IS_BASE_FIRMWARE"]:
|
|||||||
"NDEBUG",
|
"NDEBUG",
|
||||||
],
|
],
|
||||||
CCFLAGS=[
|
CCFLAGS=[
|
||||||
"-Og",
|
"-Os" if ENV["COMPACT"] else "-Og",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
elif ENV["COMPACT"]:
|
elif ENV["COMPACT"]:
|
||||||
|
|||||||
Reference in New Issue
Block a user