Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By Necromant
#3970 You can get the same result as well by running
Code: Select all$(TOOLCHAIN)/bin/xtensa-lx106-elf-objcopy --rename-section .text=.irom0.text \
--rename-section .literal=.irom0.literal filename.o

before linking the ELF. This relocates all your code to irom.
And if you add required recipe to put iram0.text and iram0.literal in iram1_0_seg you can put all code into irom by default, and functions with __attribute__((section(".iram0.text)) will got to SRAM. This is the way I do in Frankenstein firmware.
User avatar
By jcmvbkbc
#8188
mobyfab wrote:Build script updated: https://gist.github.com/fpoussin/7ae55b5a5bd9a28ce21d
Now with C++

Hi Fabien, could you please add --disable-__cxa_atexit switch to gcc configuring commands in that toolchain build script?
atexit functionality is not needed anyway, and without this switch presence of global objects with destructors causes unneeded references to malloc.