eriksl wrote:davydnorris wrote:Not sure if things have changed but using the esp-open-sdk build I got a large increase in code and stack usage, and tracked it down to the compiler using software versions of the low and higher level functions instead of the ROM based versions. There appeared to be a whole bunch of them left out of the explicit definitions in the linker. Things may have changed now though
I have collected all (known) functions in ROM and added them to the linker file (if not yet there from Espressif). Also my images are already very large (just under 500 k), so for me it's less important, only if it's in IRAM context. Thanks for the tip though and I will check this.
Indeed it appears gnu ld simply links in the libc versions, even though PROVIDEs are present. A bit disappointing. I did strip the libc.a from ROM-provided functions and it saved me 320 bytes in flash (on a total of 592 k) and 0 on IRAM, so for me it's not worth the while. Others may feel differently, they'll have to do the strip themselves, I don't know of a hook in ct-ng where to automate it.
About libgcc, I don't feel confident we should do this. The versions in ROM are for gcc 3 or 4, as we're on 10 now, I think they're at least a bit outdated.