Chat here about code rewrites, mods, etc... with respect to the github project https://github.com/esp8266/Arduino

Moderator: igrr

User avatar
By Baoshi
#21898 I was looking at Esp8266 arduino core.
As I came from SDK side, most of the functions are attributed using ICACHE_FLASH_ATTR to save RAM. But in Arduino core it is not there. I believe this is vital to maintain compatible with vast libraries.
So, where is the magic that moves all the functions to ROM section?

Thanks,

Baoshi
User avatar
By h4rm0n1c
#22880 it's in "hardware\esp8266com\esp8266\tools\sdk\include\c_types.h"

This is how I've seen it included in the libraries:
Code: Select allextern "C" {
#include "c_types.h"
}


Some advice: Download and install a full text search program, like Agent Ransack.

It IS useful to do a full text search of the entire source tree when you're learning how these things work, it has helped immensely with my understanding of Timer1, the SPI registers and the various ESP specific functions.