Skip to content

Commit a3ea816

Browse files
authored
add optional espressif fw nonos-sdk 2.2.x (19.03.13) (#5873)
1 parent e5b4de3 commit a3ea816

21 files changed

+27
-17
lines changed

boards.txt

+4-2
Original file line numberDiff line numberDiff line change
@@ -350,9 +350,11 @@ generic.menu.led.14=14
350350
generic.menu.led.14.build.led=-DLED_BUILTIN=14
351351
generic.menu.led.15=15
352352
generic.menu.led.15.build.led=-DLED_BUILTIN=15
353-
generic.menu.sdk.nonosdk221=nonos-sdk 2.2.1
353+
generic.menu.sdk.nonosdk221=nonos-sdk 2.2.1 (legacy)
354354
generic.menu.sdk.nonosdk221.build.sdk=NONOSDK221
355-
generic.menu.sdk.nonosdk3v0=nonos-sdk pre-3
355+
generic.menu.sdk.nonosdk222=nonos-sdk 2.2.2-190313 (testing)
356+
generic.menu.sdk.nonosdk222.build.sdk=NONOSDK22x
357+
generic.menu.sdk.nonosdk3v0=nonos-sdk pre-3 (known issues)
356358
generic.menu.sdk.nonosdk3v0.build.sdk=NONOSDK3V0
357359
generic.menu.ip.lm2f=v2 Lower Memory
358360
generic.menu.ip.lm2f.build.lwip_include=lwip2/include

libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -249,13 +249,13 @@ int32_t ESP8266WiFiGenericClass::channel(void) {
249249
* @param type sleep_type_t
250250
* @return bool
251251
*/
252-
#ifdef NONOSDK221
252+
#ifndef NONOSDK3V0
253253
bool ESP8266WiFiGenericClass::setSleepMode(WiFiSleepType_t type, uint8_t listenInterval) {
254254
(void)type;
255255
(void)listenInterval;
256256
return false;
257257
}
258-
#else // !defined(NONOSDK221)
258+
#else // defined(NONOSDK3V0)
259259
bool ESP8266WiFiGenericClass::setSleepMode(WiFiSleepType_t type, uint8_t listenInterval) {
260260

261261
/**
@@ -322,7 +322,7 @@ bool ESP8266WiFiGenericClass::setSleepMode(WiFiSleepType_t type, uint8_t listenI
322322
}
323323
return ret;
324324
}
325-
#endif // !defined(NONOSDK221)
325+
#endif // defined(NONOSDK3V0)
326326

327327
/**
328328
* get Sleep mode
@@ -507,7 +507,7 @@ bool ESP8266WiFiGenericClass::forceSleepWake() {
507507
* @return interval
508508
*/
509509
uint8_t ESP8266WiFiGenericClass::getListenInterval () {
510-
#ifdef NONOSDK221
510+
#ifndef NONOSDK3V0
511511
return 0;
512512
#else
513513
return wifi_get_listen_interval();
@@ -519,7 +519,7 @@ uint8_t ESP8266WiFiGenericClass::getListenInterval () {
519519
* @return true if max level
520520
*/
521521
bool ESP8266WiFiGenericClass::isSleepLevelMax () {
522-
#ifdef NONOSDK221
522+
#ifndef NONOSDK3V0
523523
return false;
524524
#else
525525
return wifi_get_sleep_level() == MAX_SLEEP_T;

libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ wl_status_t ESP8266WiFiSTAClass::begin(const char* ssid, const char *passphrase,
138138
}
139139

140140
conf.threshold.rssi = -127;
141-
#ifndef NONOSDK221
141+
#ifdef NONOSDK3V0
142142
conf.open_and_wep_mode_disable = !(_useInsecureWEP || *conf.password == 0);
143143
#endif
144144

package/package_esp8266com_index.template.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -264,4 +264,4 @@
264264
]
265265
}
266266
]
267-
}
267+
}

tests/host/common/user_interface.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ bool wifi_station_get_config (struct station_config *config)
8484
config->bssid[i] = i;
8585
config->threshold.rssi = 1;
8686
config->threshold.authmode = AUTH_WPA_PSK;
87-
#ifndef NONOSDK221
87+
#ifdef NONOSDK3V0
8888
config->open_and_wep_mode_disable = true;
8989
#endif
9090
return true;
@@ -192,7 +192,7 @@ uint8 wifi_get_opmode_default (void)
192192
return STATION_MODE;
193193
}
194194

195-
#ifndef NONOSDK221
195+
#ifdef NONOSDK3V0
196196

197197
sleep_level_t wifi_get_sleep_level (void)
198198
{
@@ -248,7 +248,7 @@ bool wifi_set_phy_mode (phy_mode_t mode)
248248
return true;
249249
}
250250

251-
#ifndef NONOSDK221
251+
#ifdef NONOSDK3V0
252252

253253
bool wifi_set_sleep_level (sleep_level_t level)
254254
{

tools/boards.txt.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1332,9 +1332,11 @@ def led (default,max):
13321332

13331333
def sdk ():
13341334
return { 'sdk': collections.OrderedDict([
1335-
('.menu.sdk.nonosdk221', 'nonos-sdk 2.2.1'),
1335+
('.menu.sdk.nonosdk221', 'nonos-sdk 2.2.1 (legacy)'),
13361336
('.menu.sdk.nonosdk221.build.sdk', 'NONOSDK221'),
1337-
('.menu.sdk.nonosdk3v0', 'nonos-sdk pre-3'),
1337+
('.menu.sdk.nonosdk222', 'nonos-sdk 2.2.2-190313 (testing)'),
1338+
('.menu.sdk.nonosdk222.build.sdk', 'NONOSDK22x'),
1339+
('.menu.sdk.nonosdk3v0', 'nonos-sdk pre-3 (known issues)'),
13381340
('.menu.sdk.nonosdk3v0.build.sdk', 'NONOSDK3V0'),
13391341
])
13401342
}

tools/platformio-build.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,12 @@ def scons_patched_match_splitext(path, suffixes=None):
140140
CPPDEFINES=[("NONOSDK3V0", 1)],
141141
LIBPATH=[join(FRAMEWORK_DIR, "tools", "sdk", "lib", "NONOSDK3V0"),]
142142
)
143-
# PIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK221 (default)
143+
elif "PIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x" in flatten_cppdefines:
144+
env.Append(
145+
CPPDEFINES=[("NONOSDK22x", 1)],
146+
LIBPATH=[join(FRAMEWORK_DIR, "tools", "sdk", "lib", "NONOSDK22x"),]
147+
)
148+
# PIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x (default)
144149
else:
145150
env.Append(
146151
CPPDEFINES=[("NONOSDK221", 1)],

tools/sdk/include/user_interface.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ struct station_config {
253253
// with both ssid[] and bssid[] matched. Please check about this.
254254
uint8 bssid[6];
255255
wifi_fast_scan_threshold_t threshold;
256-
#ifndef NONOSDK221
256+
#ifdef NONOSDK3V0
257257
bool open_and_wep_mode_disable; // Can connect to open/wep router by default.
258258
#endif
259259
};
@@ -434,7 +434,7 @@ typedef enum {
434434
MODEM_SLEEP_T
435435
} sleep_type_t;
436436

437-
#ifndef NONOSDK221
437+
#ifdef NONOSDK3V0
438438

439439
typedef enum {
440440
MIN_SLEEP_T,

tools/sdk/lib/NONOSDK22x/libairkiss.a

11 KB
Binary file not shown.

tools/sdk/lib/NONOSDK22x/libcrypto.a

132 KB
Binary file not shown.

tools/sdk/lib/NONOSDK22x/libdriver.a

66.1 KB
Binary file not shown.

tools/sdk/lib/NONOSDK22x/libespnow.a

70.4 KB
Binary file not shown.

tools/sdk/lib/NONOSDK22x/libmain.a

212 KB
Binary file not shown.
328 KB
Binary file not shown.

tools/sdk/lib/NONOSDK22x/libphy.a

153 KB
Binary file not shown.

tools/sdk/lib/NONOSDK22x/libpp.a

260 KB
Binary file not shown.
116 KB
Binary file not shown.

tools/sdk/lib/NONOSDK22x/libwpa.a

169 KB
Binary file not shown.

tools/sdk/lib/NONOSDK22x/libwpa2.a

464 KB
Binary file not shown.

tools/sdk/lib/NONOSDK22x/libwps.a

315 KB
Binary file not shown.

tools/sdk/lib/NONOSDK22x/version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v2.2.1-61-gc7b580c (shows as SDK:2.2.2-dev(c0eb301) in debug mode)

0 commit comments

Comments
 (0)