Page 1 of 1

Bin files still contain assert and code strings

Posted: Tue Sep 25, 2018 2:11 am
by Lucas.Hutchinson
Hey All,

Trying to get small build binaries, and ultimately byte identical build repeat-ability on different computers, however i am running into some issues.
I have tried to disable all logging, as well as more importantly removing the assert prints using the silent assert mode( and even with assets disabled), However there always still seems to be user readable strings in the built binary.
Eg; the following string can be found in the first 1k of flash in my binaries no matter what options i enable or disable.

Code: Select all

esp_task_wdt_init(CONFIG_TASK_WDT_TIMEOUT_S,.true)./home/lucas/esp32.core/lib/esp-idf/components/esp32/./cpu_start.c
As you can see there is still visible user strings in the binary, and more to the point user strings that change depending on where the code is compiled.
Is this a known issue?
Are there any other things that can be done to remove this sort of stuff from the resulting binary?

(Using IDF V3.1)

Re: Bin files still contain assert and code strings

Posted: Thu Sep 27, 2018 2:29 am
by Lucas.Hutchinson
Bump, @ESP_Angus, any thoughts on this?

It seems to be related to the

Code: Select all

ESP_ERROR_CHECK
macro

Re: Bin files still contain assert and code strings

Posted: Thu Sep 27, 2018 3:37 am
by WiFive
https://github.com/espressif/esp-idf/bl ... #L100-L104

https://github.com/espressif/esp-idf/bl ... #L327-L329

If you have assertions disabled it should not embed these references but it doesn't seem to remove them in silent mode

Re: Bin files still contain assert and code strings

Posted: Thu Sep 27, 2018 4:32 am
by ESP_Angus
Hi Lucas,

You're right, the ESP_ERROR_CHECK macro isn't correctly written for "silent" asserts, so these strings still end up in the binary. Will fix.


Angus

Re: Bin files still contain assert and code strings

Posted: Thu Oct 04, 2018 1:05 am
by ESP_Angus
This should be fixed in master branch now, since commit 594dcd525. Thanks very much for reporting it.