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

User avatar
By davydnorris
#59813
CARPP wrote:CFLAGS = -I. -DICACHE_FLASH -mlongcalls

fixed it for me :)


This effecively moves ALL your code into flash, which may be ok depending on what you are doing, but just be wary of functions that are long lived or that need to operate at low level.

If you get resets and timeouts, this should be the first place to look
User avatar
By CARPP
#59834 Oh, i didn't know that. I tagged every function (besides user_init()) with :
ICACHE_FLASH_ATTR

but the amount of ram i was overextending was always the same without -DICACHE_FLASH (it also didn't change if i untagged all functions). Only with -DICACHE_FLASH my program successfully compiled.
User avatar
By davydnorris
#59848
CARPP wrote:Oh, i didn't know that. I tagged every function (besides user_init()) with :
ICACHE_FLASH_ATTR

but the amount of ram i was overextending was always the same without -DICACHE_FLASH (it also didn't change if i untagged all functions). Only with -DICACHE_FLASH my program successfully compiled.


Oh ok - I'll have to check that out. Been ages since I looked at my own compiler settings!