Bin files still contain assert and code strings

Lucas.Hutchinson
Posts: 79
Joined: Tue Apr 26, 2016 5:10 am

Bin files still contain assert and code strings

Postby Lucas.Hutchinson » Tue Sep 25, 2018 2:11 am

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)

Lucas.Hutchinson
Posts: 79
Joined: Tue Apr 26, 2016 5:10 am

Re: Bin files still contain assert and code strings

Postby Lucas.Hutchinson » Thu Sep 27, 2018 2:29 am

Bump, @ESP_Angus, any thoughts on this?

It seems to be related to the

Code: Select all

ESP_ERROR_CHECK
macro

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Bin files still contain assert and code strings

Postby WiFive » Thu Sep 27, 2018 3:37 am

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

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Bin files still contain assert and code strings

Postby ESP_Angus » Thu Sep 27, 2018 4:32 am

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

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Bin files still contain assert and code strings

Postby ESP_Angus » Thu Oct 04, 2018 1:05 am

This should be fixed in master branch now, since commit 594dcd525. Thanks very much for reporting it.

Who is online

Users browsing this forum: DrMickeyLauer, mikecarlos and 115 guests