Skip to content

Conversation

@networkfusion
Copy link
Member

@networkfusion networkfusion commented Apr 6, 2025

Description

Updates FatFS from R0.15 to R0.15a (pre-requsite before updating drivers).

Motivation and Context

FatFs fails to load the FsInfo in FAT32 volumes and the f_getfree function will always be forced a full FAT scan which takes a long time.

This is currently commented out in our drivers.

How Has This Been Tested?

Screenshots

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • Bug fix (non-breaking change which fixes an issue with code or algorithm)
  • New feature (non-breaking change which adds functionality to code)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Config and build (change in the configuration and build system, has no impact on code or features)
  • Dev Containers (changes related with Dev Containers, has no impact on code or features)
  • Dependencies/declarations (update dependencies or assembly declarations and changes associated, has no impact on code or features)
  • Documentation (changes or updates in the documentation, has no impact on code or features)

Checklist

  • My code follows the code style of this project (only if there are changes in source code).
  • My changes require an update to the documentation (there are changes that require the docs website to be updated).
  • I have updated the documentation accordingly (the changes require an update on the docs in this repo).
  • I have read the CONTRIBUTING document.
  • I have tested everything locally and all new and existing tests passed (only if there are changes in source code).

Summary by CodeRabbit

  • Chores

    • Updated the FatFs dependency branch and default version from "R0.15" to "R0.15a" across multiple environments.
    • Revised configuration constants to align with the latest FatFs revision.
  • Refactor

    • Removed legacy, non-functional code related to file system size calculations.
    • Reintroduced functionality for retrieving free cluster information and calculating total and free space on the volume.
  • Style

    • Normalized formatting in configuration files for improved readability and consistency.

FatFs fails to load the FsInfo in FAT32 volumes and the f_getfree function will always be forced
a full FAT scan which takes a long time.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 6, 2025

Walkthrough

This update modifies git commands in multiple Dockerfiles and scripts to clone or pull the fatfs repository using branch R0.15a instead of R0.15. Additionally, several FatFs configuration files across different targets update the revision identifier (FFCONF_DEF) from 80286 to 5380 and adjust the formatting of volume strings. Comments in certain system call files have been updated to indicate compatibility with R0.15a+, and commented-out logic in the GetSizeInfo methods has been removed. No changes were made to any exported or public entities.

Changes

File(s) Change Summary
.devcontainer/.../Dockerfile.*.SRC
.devcontainer/.../scripts/git-pull-repos.sh
Updated fatfs branch reference from R0.15 to R0.15a in git clone/pull commands.
targets/ChibiOS/CMakeLists.txt
targets/FreeRTOS/NXP/CMakeLists.txt
Updated default FATFS_VERSION_TAG from "R0.15" to "R0.15a" in CMake configurations.
targets/.../ffconf.h (AzureRTOS, ChibiOS, FreeRTOS) Updated FFCONF_DEF from 80286 to 5380 and normalized FF_VOLUME_STRS formatting.
targets/.../fatfs_syscall.c
targets/.../ffsystem.c
Modified comments to indicate compatibility with R0.15a+ instead of R0.15+.
targets/.../fatfs_FS_Driver.cpp Removed commented-out code in the GetSizeInfo method that previously computed filesystem size.

Suggested labels

Type: enhancement, Platform: ESP32

Suggested reviewers

  • josesimoes

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2913e9e and ea31b1b.

📒 Files selected for processing (7)
  • .devcontainer/All/Dockerfile.All (1 hunks)
  • .devcontainer/AzureRTOS/Dockerfile.AzureRTOS (1 hunks)
  • .devcontainer/ChibiOS/Dockerfile.ChibiOS (1 hunks)
  • .devcontainer/ESP32/Dockerfile.ESP32 (1 hunks)
  • .devcontainer/FreeRTOS-NXP/Dockerfile.FreeRTOS-NXP (1 hunks)
  • targets/ChibiOS/_FatFs/fatfs_FS_Driver.cpp (1 hunks)
  • targets/ESP32/_FatFs/fatfs_FS_Driver.cpp (1 hunks)
✅ Files skipped from review due to trivial changes (5)
  • .devcontainer/FreeRTOS-NXP/Dockerfile.FreeRTOS-NXP
  • .devcontainer/AzureRTOS/Dockerfile.AzureRTOS
  • .devcontainer/All/Dockerfile.All
  • .devcontainer/ESP32/Dockerfile.ESP32
  • .devcontainer/ChibiOS/Dockerfile.ChibiOS
🚧 Files skipped from review as they are similar to previous changes (1)
  • targets/ChibiOS/_FatFs/fatfs_FS_Driver.cpp
⏰ Context from checks skipped due to timeout of 90000ms (21)
  • GitHub Check: nf-interpreter (Nightly build) (Build_STM32_targets ST_NUCLEO64_F091RC)
  • GitHub Check: nf-interpreter (Nightly build) (Build_STM32_targets ORGPAL_PALX)
  • GitHub Check: nf-interpreter (Nightly build) (Build_STM32_targets ORGPAL_PALTHREE)
  • GitHub Check: nf-interpreter (Check_Code_Style)
  • GitHub Check: nf-interpreter (Nightly build) (Check_Build_Options)
  • GitHub Check: nf-interpreter (Check_Build_Options)
  • GitHub Check: build-target (TI_CC1352R1_LAUNCHXL, Debug, All, 915)
  • GitHub Check: build-target (TI_CC1352R1_LAUNCHXL, Debug, TI, 915)
  • GitHub Check: build-target (NXP_MIMXRT1060_EVK, Debug, All)
  • GitHub Check: build-target (NXP_MIMXRT1060_EVK, Debug, FreeRTOS-NXP)
  • GitHub Check: build-target (ESP32_H2_THREAD, Debug, ESP32)
  • GitHub Check: build-target (ESP32_C6_THREAD, Debug, ESP32)
  • GitHub Check: build-target (ESP32_C3, Debug, ESP32)
  • GitHub Check: build-target (ESP32_S3, Debug, ESP32)
  • GitHub Check: build-target (ESP32_S2_USB, Debug, ESP32)
  • GitHub Check: build-target (ESP_WROVER_KIT, Debug, ESP32)
  • GitHub Check: build-target (M5Core2, Debug, ESP32)
  • GitHub Check: build-target (ST_STM32F769I_DISCOVERY, Debug, All)
  • GitHub Check: build-target (ST_STM32F769I_DISCOVERY, Debug, ChibiOS)
  • GitHub Check: build-target (SL_STK3701A, Debug, All)
  • GitHub Check: build-target (SL_STK3701A, Debug, AzureRTOS)
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@networkfusion networkfusion added the Area: Common libs Everything related with common libraries label Apr 6, 2025
@nfbot nfbot added Area: Config-and-Build Area: Dev-Containers Type: dependencies Pull requests that update a dependency file(s) or version labels Apr 10, 2025
@networkfusion networkfusion marked this pull request as ready for review April 10, 2025 18:34
Copy link
Member

@josesimoes josesimoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@josesimoes josesimoes changed the title Update fatfs to R0.15a Update FatFS to R0.15a Apr 11, 2025
@josesimoes josesimoes merged commit ac009d5 into main Apr 11, 2025
36 checks passed
@josesimoes josesimoes deleted the networkfusion/fatfs-r0.15a branch April 11, 2025 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Common libs Everything related with common libraries Area: Config-and-Build Area: Dev-Containers Type: dependencies Pull requests that update a dependency file(s) or version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants