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

User avatar
By tve
#19657 > I am trying to reduce the size for linked firmware to have more room for application code
and file system.

Have you pushed to the limit of the 236KB irom + 32KB iram you have available? See the last section of the the esp-link project readme (and associated makefile) for info https://github.com/jeelabs/esp-link. I eyeballed my esp-link linker map and the __ arithmetic routines seem to make up ~4KB. I don't know how much work it's worth to tr and recover these. I would probably rather slice into the 16KB user settings and 4KB bootloader-mirror flash areas.
User avatar
By cal
#19660
jcmvbkbc wrote:
tve wrote:Are the calling sequences and register usage of the two compilers the same? I.e. is it even possible to call the xtensa compiled code from gcc compiled code?

Yes. It's the ABI that defines these conventions, compilers must follow them.


Luckily the person that did the gcc xtensa support has this opinion. Thanks! ;-)
I once was responsible for compilers and support libraries on a unix variant where gcc had a different opinion
compared to the system cc.
Not funny.

Cal
User avatar
By cal
#19661
tve wrote:> I am trying to reduce the size for linked firmware to have more room for application code
and file system.

Have you pushed to the limit of the 236KB irom + 32KB iram you have available? See the last section of the the esp-link project readme (and associated makefile) for info https://github.com/jeelabs/esp-link. I eyeballed my esp-link linker map and the __ arithmetic routines seem to make up ~4KB. I don't know how much work it's worth to tr and recover these. I would probably rather slice into the 16KB user settings and 4KB bootloader-mirror flash areas.


Good idea. Thanks for checking.
I had the problem playing with sdk 1.1.0 and nodemcu code and didn't want to decide what to toss from iram
into flash or decide what the sdk code needs in this regard.
The sdk pulled floating point code into iram and that was >32k.
Using some floating point code from rom instead i was able link.
So I had a chance to get my WTF moment with sdk 1.1.0. One of us is not ready for nodemcu yet.
And I didn't wanted to dig into ld script differences and just used the sdk 1.1.0 one and adjusted size
and some content.

Cal