Hello ESP_ANGUS.
I'm using a 2 steps make
- first one to create a template. This is done with ESP-IDF only
- second one to for Espruino(the project) which uses .o-files from template
Toolchain is the most actual (xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar)
I got this information by adding ESP_EARLY_LOGI(... in do_global_ctors and searching in .lst file
In .map file, thanks for the hint, is this
Code: Select all
0x000000003f425760 __init_array_start = ABSOLUTE (.)
*crtbegin.o(.ctors)
*(EXCLUDE_FILE(*crtend.o) .ctors)
.ctors 0x000000003f425760 0x4 /home/esp32/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/lib/libstdc++.a(eh_alloc.o)
.ctors 0x000000003f425764 0x4 /home/esp32/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/lib/libstdc++.a(eh_globals.o)
*(SORT(.ctors.*))
*(.ctors)
0x000000003f425768 __init_array_end = ABSOLUTE (.)
Compared this with .map in templates, and could not find 2nd entry there.
After enabling
Enable C++ Exceptions in
Compiler options 2nd entry appears, so it depends on this flag.
Comparing
my CFLAGS/LDFLAGS with
template CFLAGS/LDFLAGS found these missing
Code: Select all
-u __cxa_guard_dummy
-u __cxx_fatal_exception
-fno-exceptions
Bad news, after adding them to my make, problem is still the same.
So there is still the question, how do I get rid of this, or at least tell it to use less memory