-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Full path of source files into application binaries (IDFGH-4477) #6306
Comments
Thanks for reporting. |
Hi @alezancomelit, Thanks for being patient while someone got back to you. The limitation of having the assert macro pass We have a configuration option for silent assertions instead. However unfortunately there are currently some issues with this as well, asserts in LWIP and FreeRTOS still include the file name. This is noted in #5873 as well.
It should only be necessary to set the second two options. Do you recall a case where explicitly setting NDEBUG in the CMakeLists.txt file was required? If you've found one then this is a bug. FWIW, we plan to remove the standalone option for FreeRTOS asserts in ESP-IDF V5.0 and have this controlled by the main assert setting (as this is a breaking change, we can't do it in a minor update.)
Thanks for pointing this out, will fix as well.
We'd really like to support this, but unfortunately it's quite hard to do with gcc and/or CMake. There's no good solution we're aware of, although some people have hacked this in for other projects it's not pretty.
Reproducible builds are something we would like to support as well, but as you've found there are a few blockers to this. #5873 mentions an additional one. |
You are right! I retry to compile with and without NDEBUG and it's same. But I found another problem that I have not seen before. If define only CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE and CONFIG_FREERTOS_ASSERT_DISABLE, into binary found this file full-path: Into rtc_io.c, I found a macro definition with this: So, to remove the full path I need to remove log output. |
Hi @alezancomelit, Thanks for the heads-up about the logging definition. I thought we removed all these some time ago, but seems like they've been added again. I'm working on this now, should hopefully have fixes in master soon. I'm unsure how much we'll be able to backport to earlier versions, hopefully enough to remove the most obvious places paths are injected by asserts. Will update once the work is done. |
Required so that bt asserts obey the same configuration settings as other asserts. Progress towards #6306
Allows assert to be disabled, made silent, etc. Progress towards #6306
Unless the option for "assert and keep running" is enabled. This means that silent asserts now work for FreeRTOS, and disabling asserts now also disables them in FreeRTOS without needing a separate config change. Related to #6306
Unless the option for "assert and keep running" is enabled. This means that silent asserts now work for FreeRTOS, and disabling asserts now also disables them in FreeRTOS without needing a separate config change. Related to #6306
Environment
Problem Description
The application binary include some strings of full path of source files in esp-idf repository or compiled project.
I understand that these paths are used by error, assert and other functions that include
__FILE__
macro.But, is it possible to remove full path and use a relative path or only file name?
It's very important for our applications to be portable: same project, at same commit, built on different machines by different users, need to create the same binary!! This permit a long support and debug of our products.
For now the unique solution that I found is:
But it's a big limit. And introduce a lot of compilation warnings, for components that not manage correctly assert call. An example:
The text was updated successfully, but these errors were encountered: