2.5.0 IRAM usage core_esp8266_si2c.c
Hi there, I was rather surprised by the increase of iram-usage of my application when using release v2.5.0 for the first time. The map shows that the i2c-library is the greatest consumer of ram i.e. Aprox. 2500 bytes! As on the other hand the developers did their utmost to decrease iram-usage with aprox 700 bytes.... This increase is caused by the extension of the library with slave-functionality. Wouldn't it be a good idea to have two versions of this library , with and without slave-functions. Or some kind of conditional compilation and/or linking two separate modules.
Could you give a specific example or sketch that shows a difference?
Mind you: I use Sloeber as IDE. I just included "wire.h" in a basic blink.ino example, made one referende to the original library , and there you are. Next I deleted all the IRAMCACHE definitions in the headers of the i2c-functions. Result: 2500 IRAM extra.
Check out #6326. It's untested, but reduced IRAM usage by >500 bytes in the TWI code. Any testing you'd be able to provide would be welcome!
The referenced PRs are merged, IRAM has improved quite a bit. Closing this.