Page 1 of 2

Latest ESP-IDF compilation error

Posted: Thu Oct 03, 2019 7:35 am
by jerome
Dear all, I just updated esp-idf and now I'm facing a compilation error :
esp-idf/components/bt/controller/bt.c:963:15: error: 'mem_start' may be used uninitialized in this function [-Werror=maybe-uninitialized]
Any workaround for the above issue ?
Thanks

Re: Latest ESP-IDF compilation error

Posted: Thu Oct 03, 2019 10:12 am
by jerome
I solved the above issue by initializing men_start = 0;

Now new issues appear :
'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
line 133, external location: /esp-idf/components/bt/esp_ble_mesh/api/core/esp_ble_mesh_provisioning_api.c C/C++ Problem

'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
line 454, external location: /esp-idf/components/bt/esp_ble_mesh/btc/btc_ble_mesh_prov.c C/C++ Problem
Am'I alone having those issues ?

Re: Latest ESP-IDF compilation error

Posted: Thu Oct 03, 2019 11:53 am
by jerome
Ok, the compilation error occurs only when compiling with option "Optimize for speed".
When "Optimize for size" is selected, no error...

Re: Latest ESP-IDF compilation error

Posted: Fri Oct 18, 2019 8:01 am
by jerome
Nobody here trying to compile a project optimized for performance, using bluetooth ?

I'd like to favor speed, not binary size, using bluetooth..
Thanks

Re: Latest ESP-IDF compilation error

Posted: Mon Nov 18, 2019 3:18 am
by solution-ice
Hi I have the same errors...

esp-idf/components/bt/controller/bt.c:964:15: error: 'mem_start' may be used uninitialized in this function [-Werror=maybe-uninitialized]
int ret = heap_caps_add_region(start, end);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Re: Latest ESP-IDF compilation error

Posted: Tue Nov 19, 2019 3:26 pm
by opcode
Same here. Blocking development for my team. Any solution? For me changing the optimization flag didn't help

Re: Latest ESP-IDF compilation error

Posted: Wed Jan 22, 2020 3:00 am
by Elektrik
This issue still persists

Re: Latest ESP-IDF compilation error

Posted: Wed Jan 22, 2020 3:19 am
by ESP_Angus
Hi Elektrik,

What ESP-IDF version are you using? Do you get any warnings from the build system about the toolchain not being the version that is expected?

Thanks,

Angus

Re: Latest ESP-IDF compilation error

Posted: Sat Mar 07, 2020 4:45 pm
by mattcaron
I am having the same issue. ESP-IDF is at sha 5dbabae9dc32da3e639a0531b5337848a9e3317a. sdkconfig is attached.

Re: Latest ESP-IDF compilation error

Posted: Thu Apr 02, 2020 8:08 am
by esp_liu
Hi mattcaron,

Sorry for the late response. Will fix the compile issue when -O2 option is chosen.