Skip to content

Commit 204d2c9

Browse files
authored
NONOS SDK clean-up (#8770)
Remove nonos-sdk-v2.2.0-28-g89920dc aka 3v0, since we have a real v3 Remove 3.0.0...3.0.4 to reduce overhead in maintaining a bunch or binary patches Update our docs and menu opts to mention 'experimental' status Old versions still remains in git history, so anyone wanting to play around with 3.0.x could still make use of that work
1 parent 3f1d608 commit 204d2c9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+51
-2596
lines changed

Diff for: boards.txt

+3-27
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ menu.vt=VTables
2222
menu.exception=C++ Exceptions
2323
menu.stacksmash=Stack Protection
2424
menu.wipe=Erase Flash
25-
menu.sdk=Espressif FW
25+
menu.sdk=NONOS SDK Version
2626
menu.ssl=SSL Support
2727
menu.mmu=MMU
2828
menu.non32xfer=Non-32-Bit Access
@@ -363,19 +363,7 @@ generic.menu.sdk.nonosdk_190313=nonos-sdk 2.2.1+61 (190313)
363363
generic.menu.sdk.nonosdk_190313.build.sdk=NONOSDK22x_190313
364364
generic.menu.sdk.nonosdk221=nonos-sdk 2.2.1 (legacy)
365365
generic.menu.sdk.nonosdk221.build.sdk=NONOSDK221
366-
generic.menu.sdk.nonosdk3v0=nonos-sdk pre-3 (180626 known issues)
367-
generic.menu.sdk.nonosdk3v0.build.sdk=NONOSDK3V0
368-
generic.menu.sdk.nonosdk300=nonos-sdk 3.0.0
369-
generic.menu.sdk.nonosdk300.build.sdk=NONOSDK300
370-
generic.menu.sdk.nonosdk301=nonos-sdk 3.0.1
371-
generic.menu.sdk.nonosdk301.build.sdk=NONOSDK301
372-
generic.menu.sdk.nonosdk302=nonos-sdk 3.0.2
373-
generic.menu.sdk.nonosdk302.build.sdk=NONOSDK302
374-
generic.menu.sdk.nonosdk303=nonos-sdk 3.0.3
375-
generic.menu.sdk.nonosdk303.build.sdk=NONOSDK303
376-
generic.menu.sdk.nonosdk304=nonos-sdk 3.0.4
377-
generic.menu.sdk.nonosdk304.build.sdk=NONOSDK304
378-
generic.menu.sdk.nonosdk305=nonos-sdk 3.0.5
366+
generic.menu.sdk.nonosdk305=nonos-sdk 3.0.5 (experimental)
379367
generic.menu.sdk.nonosdk305.build.sdk=NONOSDK305
380368
generic.menu.ip.lm2f=v2 Lower Memory
381369
generic.menu.ip.lm2f.build.lwip_include=lwip2/include
@@ -720,19 +708,7 @@ esp8285.menu.sdk.nonosdk_190313=nonos-sdk 2.2.1+61 (190313)
720708
esp8285.menu.sdk.nonosdk_190313.build.sdk=NONOSDK22x_190313
721709
esp8285.menu.sdk.nonosdk221=nonos-sdk 2.2.1 (legacy)
722710
esp8285.menu.sdk.nonosdk221.build.sdk=NONOSDK221
723-
esp8285.menu.sdk.nonosdk3v0=nonos-sdk pre-3 (180626 known issues)
724-
esp8285.menu.sdk.nonosdk3v0.build.sdk=NONOSDK3V0
725-
esp8285.menu.sdk.nonosdk300=nonos-sdk 3.0.0
726-
esp8285.menu.sdk.nonosdk300.build.sdk=NONOSDK300
727-
esp8285.menu.sdk.nonosdk301=nonos-sdk 3.0.1
728-
esp8285.menu.sdk.nonosdk301.build.sdk=NONOSDK301
729-
esp8285.menu.sdk.nonosdk302=nonos-sdk 3.0.2
730-
esp8285.menu.sdk.nonosdk302.build.sdk=NONOSDK302
731-
esp8285.menu.sdk.nonosdk303=nonos-sdk 3.0.3
732-
esp8285.menu.sdk.nonosdk303.build.sdk=NONOSDK303
733-
esp8285.menu.sdk.nonosdk304=nonos-sdk 3.0.4
734-
esp8285.menu.sdk.nonosdk304.build.sdk=NONOSDK304
735-
esp8285.menu.sdk.nonosdk305=nonos-sdk 3.0.5
711+
esp8285.menu.sdk.nonosdk305=nonos-sdk 3.0.5 (experimental)
736712
esp8285.menu.sdk.nonosdk305.build.sdk=NONOSDK305
737713
esp8285.menu.ip.lm2f=v2 Lower Memory
738714
esp8285.menu.ip.lm2f.build.lwip_include=lwip2/include

Diff for: cores/esp8266/core_esp8266_main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ extern "C" void user_init(void) {
648648
install_vm_exception_handler();
649649
#endif
650650

651-
#if defined(NON32XFER_HANDLER) || (defined(MMU_IRAM_HEAP) && (NONOSDK < (0x30000 - 1)))
651+
#if defined(NON32XFER_HANDLER) || (defined(MMU_IRAM_HEAP) && (NONOSDK < (0x30000)))
652652
install_non32xfer_exception_handler();
653653
#endif
654654

Diff for: cores/esp8266/core_esp8266_non32xfer.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ extern "C" {
6262

6363
#define EXCCAUSE_LOAD_STORE_ERROR 3 /* Non 32-bit read/write error */
6464

65-
#if (defined(NON32XFER_HANDLER) || defined(MMU_IRAM_HEAP)) && (NONOSDK < (0x30000 - 1))
65+
#if (defined(NON32XFER_HANDLER) || defined(MMU_IRAM_HEAP)) && (NONOSDK < (0x30000))
6666
static fn_c_exception_handler_t old_c_handler = NULL;
6767
#endif
6868

69-
#if defined(NON32XFER_HANDLER) || (defined(MMU_IRAM_HEAP) && (NONOSDK < (0x30000 - 1)))
69+
#if defined(NON32XFER_HANDLER) || (defined(MMU_IRAM_HEAP) && (NONOSDK < (0x30000)))
7070
static
7171
IRAM_ATTR void non32xfer_exception_handler(struct __exception_frame *ef, [[maybe_unused]] int cause)
7272
{
@@ -145,7 +145,7 @@ IRAM_ATTR void non32xfer_exception_handler(struct __exception_frame *ef, [[maybe
145145
} while(false);
146146

147147
/* Fail request, die */
148-
#if (NONOSDK < (0x30000 - 1))
148+
#if (NONOSDK < (0x30000))
149149
/*
150150
The old handler points to the SDK. Be alert for HWDT when Calling with
151151
INTLEVEL != 0. I cannot create it any more. I thought I saw this as a
@@ -170,9 +170,9 @@ IRAM_ATTR void non32xfer_exception_handler(struct __exception_frame *ef, [[maybe
170170
abort();
171171
#endif
172172
}
173-
#endif // #if defined(NON32XFER_HANDLER) || (defined(MMU_IRAM_HEAP) && (NONOSDK < (0x30000 - 1)))
173+
#endif // #if defined(NON32XFER_HANDLER) || (defined(MMU_IRAM_HEAP) && (NONOSDK < (0x30000)))
174174

175-
#if (defined(NON32XFER_HANDLER) || defined(MMU_IRAM_HEAP)) && (NONOSDK < (0x30000 - 1))
175+
#if (defined(NON32XFER_HANDLER) || defined(MMU_IRAM_HEAP)) && (NONOSDK < (0x30000))
176176
/*
177177
To operate reliably, this module requires the new
178178
`_xtos_set_exception_handler` from `exc-sethandler.cpp` and

Diff for: cores/esp8266/exc-sethandler.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
#include <user_interface.h> // need NONOSDK
4343

4444
#if defined(NON32XFER_HANDLER) || defined(MMU_IRAM_HEAP) || \
45-
defined(NEW_EXC_C_WRAPPER) || defined(MMU_EXTERNAL_HEAP) || (NONOSDK >= (0x30000 - 1))
45+
defined(NEW_EXC_C_WRAPPER) || defined(MMU_EXTERNAL_HEAP) || (NONOSDK >= (0x30000))
4646

4747
/*
4848
* The original module source code came from:

Diff for: cores/esp8266/heap.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,6 @@ void IRAM_ATTR vPortFree(void *ptr, const char* file, int line)
411411
try IRAM.
412412
413413
WPA2 Enterprise connect crashing is fixed at v3.0.2 and up.
414-
415-
Not used for unreleased version NONOSDK3V0.
416414
*/
417415
#ifdef UMM_HEAP_IRAM
418416
void* IRAM_ATTR sdk3_pvPortMalloc(size_t size, const char* file, int line, bool iram)

Diff for: cores/esp8266/wpa2_eap_patch.cpp

+1-13
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,13 @@
1616
defined(NONOSDK22x_191124) || \
1717
defined(NONOSDK22x_190313) || \
1818
defined(NONOSDK221) || \
19-
defined(NONOSDK3V0) || \
20-
defined(NONOSDK300) || \
21-
defined(NONOSDK301) || \
22-
defined(NONOSDK302) || \
23-
defined(NONOSDK303) || \
24-
defined(NONOSDK304) || \
2519
defined(NONOSDK305)
2620

2721
// eap_peer_config_deinit() - For this list of SDKs there are no significant
2822
// changes in the function. Just the line number reference for when vPortFree
2923
// is called. When vPortFree is called, register a12 continues to hold a pointer
3024
// to the struct StateMachine. Our cleanup routine should continue to work.
31-
#if defined(NONOSDK300) || defined(NONOSDK301)
32-
// Minor changes only line number changed
33-
#define SDK_LEAK_LINE 809
34-
#elif defined(NONOSDK302) || defined(NONOSDK303) || defined(NONOSDK304)
35-
// Minor changes only line number changed
36-
#define SDK_LEAK_LINE 831
37-
#elif defined(NONOSDK305)
25+
#if defined(NONOSDK305)
3826
// At v3.0.5 Espressif moved `.text.eap_peer_config_deinit` to
3927
// `eap_peer_config_deinit` then later in latest git they moved it
4028
// back. For our linker script both are placed in flash.

Diff for: doc/esp8266wifi/client-class.rst

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ This API frees up resources used by the connection. Consider using it instead of
4949
*Example:*
5050

5151
.. code:: cpp
52+
5253
# define MIN_HEAP_FREE 20000 // or whatever min available heap memory convienent for your application
5354
auto client = server.accept();
5455
// ... do something with the client object ...

Diff for: doc/esp8266wifi/generic-class.rst

+5-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,11 @@ Other Function Calls
227227
bool enableAP (bool enable)
228228
int hostByName (const char *aHostname, IPAddress &aResult)
229229
230-
appeared with SDK pre-V3:
230+
231+
Also, when using NONOS SDK v3:
232+
233+
.. code:: cpp
234+
231235
uint8_t getListenInterval ();
232236
bool isSleepLevelMax ();
233237

Diff for: doc/ideoptions.rst

+17-5
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,25 @@ Erase Flash
219219

220220
- ``All Flash``: WiFi settings and Filesystems are erased.
221221

222-
Espressif Firmware
222+
NONOS SDK Version
223223
~~~~~~~~~~~~~~~~~~
224224

225-
There are a number of available espressif firmwares. The first / default
226-
choice is fine. Only try with others after reading on the issue tracker
227-
that something has to be tried with them. Note that Espressif obsoleted
228-
all of them at the time of writing.
225+
Our Core is based on [Espressif NONOS SDK](https://github.com/espressif/ESP8266_NONOS_SDK).
226+
227+
- **2.2.1+100 (190703)** (default)
228+
- 2.2.1+119 (191122)
229+
- 2.2.1+113 (191105)
230+
- 2.2.1+111 (191024)
231+
- 2.2.1+61 (190313)
232+
- 2.2.1 (legacy)
233+
- 3.0.5 (experimental)
234+
235+
See our issue tracker in regards to default version selection.
236+
237+
* `#6724 (comment) <https://github.com/esp8266/Arduino/pull/6724#issuecomment-556243781>`__
238+
* `#6826 <https://github.com/esp8266/Arduino/pull/6826>`__
239+
240+
Notice that 3.x.x is provided **as-is** and remains **experimental**.
229241

230242
SSL Support
231243
~~~~~~~~~~~

Diff for: libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ bool ESP8266WiFiGenericClass::setSleepMode(WiFiSleepType_t type, uint8_t listenI
303303
304304
*/
305305

306-
#if (NONOSDK >= (0x30000 - 1))
306+
#if (NONOSDK >= (0x30000))
307307

308308
#ifdef DEBUG_ESP_WIFI
309309
if (listenInterval && type == WIFI_NONE_SLEEP)
@@ -334,9 +334,9 @@ bool ESP8266WiFiGenericClass::setSleepMode(WiFiSleepType_t type, uint8_t listenI
334334
}
335335
}
336336
}
337-
#else // (NONOSDK >= (0x30000 - 1))
337+
#else // (NONOSDK >= (0x30000))
338338
(void)listenInterval;
339-
#endif // (NONOSDK >= (0x30000 - 1))
339+
#endif // (NONOSDK >= (0x30000))
340340

341341
bool ret = wifi_set_sleep_type((sleep_type_t) type);
342342
if (!ret) {
@@ -571,7 +571,7 @@ bool ESP8266WiFiGenericClass::forceSleepWake() {
571571
* @return interval
572572
*/
573573
uint8_t ESP8266WiFiGenericClass::getListenInterval () {
574-
#if (NONOSDK >= (0x30000 - 1))
574+
#if (NONOSDK >= (0x30000))
575575
return wifi_get_listen_interval();
576576
#else
577577
return 0;
@@ -583,7 +583,7 @@ uint8_t ESP8266WiFiGenericClass::getListenInterval () {
583583
* @return true if max level
584584
*/
585585
bool ESP8266WiFiGenericClass::isSleepLevelMax () {
586-
#if (NONOSDK >= (0x30000 - 1))
586+
#if (NONOSDK >= (0x30000))
587587
return wifi_get_sleep_level() == MAX_SLEEP_T;
588588
#else
589589
return false;

Diff for: libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ static bool sta_config_equal(const station_config& lhs, const station_config& rh
6161
*/
6262
static bool sta_config_equal(const station_config& lhs, const station_config& rhs) {
6363

64-
#if (NONOSDK >= (0x30000 - 1))
64+
#if (NONOSDK >= (0x30000))
6565
static_assert(sizeof(station_config) == 116, "struct station_config has changed, please update comparison function");
6666
#else
6767
static_assert(sizeof(station_config) == 112, "struct station_config has changed, please update comparison function");
@@ -94,7 +94,7 @@ static bool sta_config_equal(const station_config& lhs, const station_config& rh
9494
return false;
9595
}
9696

97-
#if (NONOSDK >= (0x30000 - 1))
97+
#if (NONOSDK >= (0x30000))
9898
if(lhs.open_and_wep_mode_disable != rhs.open_and_wep_mode_disable) {
9999
return false;
100100
}
@@ -166,7 +166,7 @@ wl_status_t ESP8266WiFiSTAClass::begin(const char* ssid, const char *passphrase,
166166
}
167167

168168
conf.threshold.rssi = -127;
169-
#if (NONOSDK >= (0x30000 - 1))
169+
#if (NONOSDK >= (0x30000))
170170
conf.open_and_wep_mode_disable = !(_useInsecureWEP || *conf.password == 0);
171171
#endif
172172
#if (NONOSDK >= (0x30200))

Diff for: tests/host/common/user_interface.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ extern "C"
8585
config->bssid[i] = i;
8686
config->threshold.rssi = 1;
8787
config->threshold.authmode = AUTH_WPA_PSK;
88-
#if (NONOSDK >= (0x30000 - 1))
88+
#if (NONOSDK >= (0x30000))
8989
config->open_and_wep_mode_disable = true;
9090
#endif
9191
#if (NONOSDK >= (0x30200))
@@ -215,7 +215,7 @@ extern "C"
215215
return STATION_MODE;
216216
}
217217

218-
#if (NONOSDK >= (0x30000 - 1))
218+
#if (NONOSDK >= (0x30000))
219219

220220
sleep_level_t wifi_get_sleep_level(void)
221221
{
@@ -271,7 +271,7 @@ extern "C"
271271
return true;
272272
}
273273

274-
#if (NONOSDK >= (0x30000 - 1))
274+
#if (NONOSDK >= (0x30000))
275275

276276
bool wifi_set_sleep_level(sleep_level_t level)
277277
{

Diff for: tools/boards.txt.py

+2-14
Original file line numberDiff line numberDiff line change
@@ -1668,19 +1668,7 @@ def sdk ():
16681668
('.menu.sdk.nonosdk_190313.build.sdk', 'NONOSDK22x_190313'),
16691669
('.menu.sdk.nonosdk221', 'nonos-sdk 2.2.1 (legacy)'),
16701670
('.menu.sdk.nonosdk221.build.sdk', 'NONOSDK221'),
1671-
('.menu.sdk.nonosdk3v0', 'nonos-sdk pre-3 (180626 known issues)'),
1672-
('.menu.sdk.nonosdk3v0.build.sdk', 'NONOSDK3V0'),
1673-
('.menu.sdk.nonosdk300', 'nonos-sdk 3.0.0'),
1674-
('.menu.sdk.nonosdk300.build.sdk', 'NONOSDK300'),
1675-
('.menu.sdk.nonosdk301', 'nonos-sdk 3.0.1'),
1676-
('.menu.sdk.nonosdk301.build.sdk', 'NONOSDK301'),
1677-
('.menu.sdk.nonosdk302', 'nonos-sdk 3.0.2'),
1678-
('.menu.sdk.nonosdk302.build.sdk', 'NONOSDK302'),
1679-
('.menu.sdk.nonosdk303', 'nonos-sdk 3.0.3'),
1680-
('.menu.sdk.nonosdk303.build.sdk', 'NONOSDK303'),
1681-
('.menu.sdk.nonosdk304', 'nonos-sdk 3.0.4'),
1682-
('.menu.sdk.nonosdk304.build.sdk', 'NONOSDK304'),
1683-
('.menu.sdk.nonosdk305', 'nonos-sdk 3.0.5'),
1671+
('.menu.sdk.nonosdk305', 'nonos-sdk 3.0.5 (experimental)'),
16841672
('.menu.sdk.nonosdk305.build.sdk', 'NONOSDK305'),
16851673
])
16861674
}
@@ -1757,7 +1745,7 @@ def all_boards ():
17571745
print('menu.exception=C++ Exceptions')
17581746
print('menu.stacksmash=Stack Protection')
17591747
print('menu.wipe=Erase Flash')
1760-
print('menu.sdk=Espressif FW')
1748+
print('menu.sdk=NONOS SDK Version')
17611749
print('menu.ssl=SSL Support')
17621750
print('menu.mmu=MMU')
17631751
print('menu.non32xfer=Non-32-Bit Access')

Diff for: tools/platformio-build.py

-6
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,6 @@ def scons_patched_match_splitext(path, suffixes=None):
183183
("SDK22x_191024", "NONOSDK22x_191024"),
184184
("SDK22x_191105", "NONOSDK22x_191105"),
185185
("SDK22x_191122", "NONOSDK22x_191122"),
186-
("SDK3", "NONOSDK3V0"),
187-
("SDK300", "NONOSDK300"),
188-
("SDK301", "NONOSDK301"),
189-
("SDK302", "NONOSDK302"),
190-
("SDK303", "NONOSDK303"),
191-
("SDK304", "NONOSDK304"),
192186
("SDK305", "NONOSDK305"),
193187
)
194188
nonosdk_version = NONOSDK_VERSIONS[0]

Diff for: tools/sdk/include/user_interface.h

+3-17
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,8 @@
2525
#ifndef __USER_INTERFACE_H__
2626
#define __USER_INTERFACE_H__
2727

28-
#if defined(NONOSDK3V0)
29-
#define NONOSDK (0x30000 - 1)
30-
#elif defined(NONOSDK300)
31-
#define NONOSDK (0x30000)
32-
#elif defined(NONOSDK301)
33-
#define NONOSDK (0x30100)
34-
#elif defined(NONOSDK302)
35-
#define NONOSDK (0x30200)
36-
#elif defined(NONOSDK303)
37-
#define NONOSDK (0x30300)
38-
#elif defined(NONOSDK304)
39-
#define NONOSDK (0x30400)
40-
#elif defined(NONOSDK305)
28+
#if defined(NONOSDK305)
4129
#define NONOSDK (0x30500)
42-
#elif defined(NONOSDK306)
43-
#define NONOSDK (0x30600)
4430
#else
4531
#define NONOSDK (0x22100)
4632
#endif
@@ -276,7 +262,7 @@ struct station_config {
276262
// with both ssid[] and bssid[] matched. Please check about this.
277263
uint8 bssid[6];
278264
wifi_fast_scan_threshold_t threshold;
279-
#if (NONOSDK >= (0x30000 - 1))
265+
#if (NONOSDK >= (0x30000))
280266
bool open_and_wep_mode_disable; // Can connect to open/wep router by default.
281267
#endif
282268
#if (NONOSDK >= (0x30200))
@@ -464,7 +450,7 @@ typedef enum {
464450
MODEM_SLEEP_T
465451
} sleep_type_t;
466452

467-
#if (NONOSDK >= (0x30000 - 1))
453+
#if (NONOSDK >= (0x30000))
468454

469455
typedef enum {
470456
MIN_SLEEP_T,

0 commit comments

Comments
 (0)