ESP8266 Developer Zone The Official ESP8266 Forum 2015-09-30T13:12:23+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=1174 2015-09-30T13:12:23+08:00 2015-09-30T13:12:23+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1174&p=3933#p3933 <![CDATA[Re: Can we determine SDK version at compile time?]]> Thanks for that. That's good to know.

I was more thinking of the notion of compilation determination between SDK releases. It is probably a safe bet to assume that there will be future SDK releases which will change or add or remove APIs. If one wanted to create an application that would still compile cleanly against known SDK releases, it might be useful to know (at compile time), the release of SDK being compiled against.

It would be nice to assume that every future SDK release will always be backwards compatible with the last but I am more thinking about forward compatibility. For example, when a new release ships, it would be great to allow applications to compile against it ... but I would prefer to also provide support for the previous SDK (the one that we know works ... for example) ... and on occasion, the only way to achieve that is by knowing at compile time, the SDK level.

A concrete example would be "os_realloc" ... or your own experience with the 1st item in a scan callback list. These appear to diverge between releases.

Statistics: Posted by kolban — Wed Sep 30, 2015 1:12 pm


]]>
2015-09-30T12:53:31+08:00 2015-09-30T12:53:31+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1174&p=3932#p3932 <![CDATA[Re: Can we determine SDK version at compile time?]]>
For Esprunio users there's:

Code:

>ESP8266WiFi.getState();
={
  "sdkVersion": "1.4.0",
  "cpuFrequency": 80, "freeHeap": 1520, "maxCon": 5 }

;-)

Statistics: Posted by tve — Wed Sep 30, 2015 12:53 pm


]]>
2015-09-29T22:53:54+08:00 2015-09-29T22:53:54+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1174&p=3919#p3919 <![CDATA[Can we determine SDK version at compile time?]]>
I could imagine something like

#define ESP_SDK_VERSION "1.4.0"

being present ... and was curious if such a technique was already present in the SDK?

Neil

Statistics: Posted by kolban — Tue Sep 29, 2015 10:53 pm


]]>