Advanced Users can post their questions and comments here for the not so Newbie crowd.

Moderator: eriksl

User avatar
By hjalfi
#90277 I have a potential bare-metal ESP8266 project which doesn't use the SDK at all --- so it's just my code and the ROM.

Even though I'm not using any SDK code, the ROM is still present and handling thinga like interrupts and exceptions. So, it's going to need somewhere to store its variables. As i'm going to want to use every byte of available memory, both dram and iram, I need to know where this is so I can work around it. I can't find any documentation on this, or references to it in the linker scripts; can anyone point me at anything useful here?
User avatar
By eriksl
#90545 Yes indeed, if you'd find these data, some people (including me) would be VERY happy.

Do you have your system already running, completely SDK-less? That in itself would already be quite an achievement I think! Please tell us all about it!
User avatar
By hjalfi
#90549 Yes, see here: http://cowlark.com/2021-02-09-esp8266-fuzix I managed to remove all SDK dependencies --- it's completely self contains (apart from the LX106 toolchain available from Debian).

I did find out that the ROM uses memory from 0x3fffc000 to 0x3fffffff, but quite a lot of that is either unused or devoted to the boot stack, which I'm not using. However, I don't know how big the boot stack is so I'm hesitant about reclaiming that space. I've noticed the LX106 is a bit heavy on stack usage so I'd expect it to be several kilobytes at least.
User avatar
By eriksl
#90550 My $0.02 that might help: the area from 0x3fffe000 to 0x3fffeb2c is not used by the SDK, maybe neither by the ROM. At least, with my usage (no TLS, nothing from the "fancy" Espressif stuff, just bare WiFi). I noticed that a little bit of that area is used once before main user code is called and after that no longer. Maybe that's the ROM boot stack you're referring to. I am using it as a generic buffer.

Did you notice that from a recent update of the SDK the stack is being moved at some point between booting and user code? Probably not as you're trying to avoid the SDK anyway ;).