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

User avatar
By 0ff
#2399
Necromant wrote:AFAIK there should be some cleaner way to send huge chunks of code to 'irom0.text' with some linker magic that doesn't require such bloody patching. Btw, remind me, does xtensa-gcc support -fPIC?

That'd be awesome, unfortunately I don't know enough about the linking to say if/how that's possible.
User avatar
By Necromant
#2402
0ff wrote:
Necromant wrote:AFAIK there should be some cleaner way to send huge chunks of code to 'irom0.text' with some linker magic that doesn't require such bloody patching. Btw, remind me, does xtensa-gcc support -fPIC?

That'd be awesome, unfortunately I don't know enough about the linking to say if/how that's possible.


The most straightforward way I see is combining all the library code into one .o and then objcopy --rename-section .text=.irom0text
Not sure it will work, but it's worth giving a try.
User avatar
By jcmvbkbc
#2411
Necromant wrote:
0ff wrote:libhal.a source is in the windows VM.
liblwip is upstream lwip 1.4.0 RC2, but with added ICACHE_FLASH_ATTR so that it's loaded off to the flash.


AFAIK there should be some cleaner way to send huge chunks of code to 'irom0.text' with some linker magic that doesn't require such bloody patching.

viewtopic.php?f=9&t=224&start=80#p1385

Necromant wrote:Btw, remind me, does xtensa-gcc support -fPIC?

It should, but why would you need that?