Skip to content

LittleFS should be built with -DLFS_NO_DEBUG -DLFS_NO_WARN -DLFS_NO_ERROR #103

Open
@everslick

Description

@everslick

Otherwise it will pollute the serial output.

espressif/arduino-esp32#7700

Activity

igrr

igrr commented on Jan 11, 2023

@igrr
Member

I would instead suggest adding Kconfig options for LittleFS debug level in https://github.com/joltwallet/esp_littlefs/blob/master/Kconfig, and applying target_compile_definitions(${COMPONENT_LIB} PRIVATE LFS_NO_DEBUG) etc. in https://github.com/joltwallet/esp_littlefs/blob/master/CMakeLists.txt.

Adding compiler macros for littlefs internals seems a bit wrong at arduino-lib-builder level. This is something that should be handled by the component itself.

(Sorry for redirecting you to another repository, again!)

everslick

everslick commented on Jan 11, 2023

@everslick
Author

Sorry for redirecting you to another repository, again!

hehe, no worries. I appreciate the input!

igrr

igrr commented on Jan 11, 2023

@igrr
Member

As an alternative, https://github.com/joltwallet/esp_littlefs/blob/f2a949fbb303b93a0ae1cd47f078c49de96a59a7/src/lfs_config.h#L44 could be modified to call ESP_LOGV instead of printf, then the log level can be controlled same way as all other IDF logs are.

(similar for other LFS_* macros: ESP_LOGD, ESP_LOGW, ESP_LOGI)

(I think I like this option more than keeping printfs and custom Kconfig options.)

everslick

everslick commented on Jan 11, 2023

@everslick
Author

I think I like this option more than keeping printfs and custom Kconfig options.

me 2. thanks!

everslick

everslick commented on Jan 11, 2023

@everslick
Author

so we should simply replace:
#define LFS_DEBUG(...) LFS_DEBUG_(__VA_ARGS__, "")
with:
#define LFS_DEBUG(...) ESP_LOGD("LFS", __VA_ARGS__)
correct?

BrianPugh

BrianPugh commented on May 3, 2023

@BrianPugh

hey guys, sorry for the slow response; implementing this now.

BrianPugh

BrianPugh commented on May 3, 2023

@BrianPugh

will be included in esp_littlefs 1.5.4, which should be released later today.

BrianPugh

BrianPugh commented on May 3, 2023

@BrianPugh

implemented in the newly released esp_littlefs v1.5.4.

If everyone is happy with it, we can then close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @everslick@igrr@BrianPugh

        Issue actions

          LittleFS should be built with -DLFS_NO_DEBUG -DLFS_NO_WARN -DLFS_NO_ERROR · Issue #103 · espressif/esp32-arduino-lib-builder