-
-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sming No Wifi
build option
#2001
Comments
So I guess you are not looking for the solution in NoWifiSDK: https://github.com/pvvx/SDKnoWiFi/blob/master/Makefile#L91-L100? One thing that comes to my mind is that when the name and the signature of a function are known then you can do the following:
|
Made a start on this, https://github.com/mikee47/Sming/tree/feature/no-wifi. @slaff I haven't tried weakening functions, may give that a go if this doesn't pan out. |
GCC does that for you. For example rBoot is weakening Cache_Read_Enable_New in libmain:
|
Done some further work on this and weakening helps in some situations so looks like a combination approach is working best. I'll open a PR shortly with progress as it's working for multiple samples now, including debugger :-) |
Getting the low-level functions into code is probably useful anyway general considering that the Non-OS SDK is now considered 'end of life'. I'm also continuing to migrate towards the RTOS headers. Arduino has imported all the SDK header files and only uses the pre-built libraries from the various SDK versions. This is a sensible move and we could dispense with the ESP8266_NONOS_SDK as a submodule. |
I recently came across https://basicengine.org/.
It's an extraordinary project, but of interest here is its use of the ESP8266 without WiFi stack to release a ton of RAM. It uses
https://github.com/pvvx/SDKnoWiFi.git
to achieve this. There's also an Arduino Port.I think it'd be rather handy to have this as a build option for Sming, but of course it would have to be done properly. SDKnoWiFi has a ton of low-level definitions and essentially re-implements the low-level support code for task queues, timers, etc. which the SDK normally does. I may end up doing that but as we'd need 100% compatibility with the existing SDK it seems like a lot of work and a little risky. (Although most of the code is floating about in various places it needs tidying up, checking, testing, etc.)
I've investigated some alternative approaches with the aim of hooking or patching the offending startup code within
libmain.a
itself, so that the linker discards all the wifi stuff we don't need and gives us the RAM back.This seems simple enough - just replace calls to
wifi_station_start
and so on with no-ops or calls to dummy functions, but patching ELF object files is rather more involved and I'm disinclined to do that manually; I want a scripted approach.The text was updated successfully, but these errors were encountered: