-->
Page 38 of 55

Re: New Working GCC for ESP8266

PostPosted: Thu Dec 04, 2014 10:04 am
by Necromant
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.

Re: New Working GCC for ESP8266

PostPosted: Sun Jan 25, 2015 1:28 pm
by jcmvbkbc
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.

Re: New Working GCC for ESP8266

PostPosted: Sun Jan 25, 2015 2:11 pm
by mobyfab
Done :)

Re: New Working GCC for ESP8266

PostPosted: Sun Jan 25, 2015 2:17 pm
by jcmvbkbc
Thanks!