Skip to content

Conversation

@iabdalkader
Copy link
Contributor

This change helps detect if the filesystem is invalid and reformat the FAT if needed.

Fixes #15779

@github-actions
Copy link

github-actions bot commented Sep 4, 2024

Code size report:

   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
     mimxrt:    +0 +0.000% TEENSY40
        rp2:    +0 +0.000% RPI_PICO_W
       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS

This change helps detect if the filesystem is invalid, by also including
the first mount attempt within the try-except.  Then the FAT is reformatted
if needed.

Fixes issue micropython#15779.

Signed-off-by: iabdalkader <[email protected]>
@dpgeorge dpgeorge merged commit 451ba1c into micropython:master Sep 19, 2024
@dpgeorge
Copy link
Member

Thanks for updating. Now merged.

@iabdalkader iabdalkader deleted the rp2_boot_fat_fix branch September 19, 2024 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rp2: FatFS filesystem is not recreated after erasing the flash.

2 participants