You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!)
Activity
igrr commentedon Jan 11, 2023
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 commentedon Jan 11, 2023
hehe, no worries. I appreciate the input!
igrr commentedon Jan 11, 2023
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 commentedon Jan 11, 2023
me 2. thanks!
everslick commentedon Jan 11, 2023
so we should simply replace:
#define LFS_DEBUG(...) LFS_DEBUG_(__VA_ARGS__, "")
with:
#define LFS_DEBUG(...) ESP_LOGD("LFS", __VA_ARGS__)
correct?
BrianPugh commentedon May 3, 2023
hey guys, sorry for the slow response; implementing this now.
BrianPugh commentedon May 3, 2023
will be included in esp_littlefs 1.5.4, which should be released later today.
BrianPugh commentedon May 3, 2023
implemented in the newly released esp_littlefs v1.5.4.
If everyone is happy with it, we can then close this issue.