Skip to content

Commit f495ea4

Browse files
committed
Don't use reset reason to skip writing boot_out.txt
As @Neradoc and @anecdata noted, we can't depend on the reset reason. Instead, just rely on the existing safe mode logic (the write already is skipped anytime boot.py was skipped), and otherwise potentially write boot_out.txt anytime it differs from the version on disk (or if the file doesn't exist in the first place) Testing performed: On qtpy m0 haxpress, removed boot_out.txt and clicked reset button. verified boot_out.txt was recreated. Closes #5588
1 parent 387a8a4 commit f495ea4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ STATIC void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) {
678678
FATFS *fs = &vfs->fatfs;
679679

680680
boot_output = NULL;
681-
bool write_boot_output = (common_hal_mcu_processor_get_reset_reason() == RESET_REASON_POWER_ON);
681+
bool write_boot_output = true;
682682
FIL boot_output_file;
683683
if (f_open(fs, &boot_output_file, CIRCUITPY_BOOT_OUTPUT_FILE, FA_READ) == FR_OK) {
684684
char *file_contents = m_new(char, boot_text.alloc);

0 commit comments

Comments
 (0)