Re: New Working GCC for ESP8266
Posted: Thu Dec 04, 2014 10:04 am
You can get the same result as well by running
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.
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.