mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-08-06 07:00:05 +08:00

select() should not judge socket fd just SHUTDOWN state when other socket closed actively those socket will be in unreadable or unwriteable abnormal step before:[ESP8266 as the tcp server] 1. ESP8266 set up a listen port (system default: socket = 0) 2. Client 1 connect to ESP8266 OK (system default: socket = 1) 3. Client 1 send data OK 4. Client 2 connect to ESP8266 OK (system default: socket = 2) 5. Client 1 and Client 2 send data OK 6. Disconnect Client 2 actively, Client 1 send data OK 7. Client 2 reconnect to ESP8266 OK (system default: socket = 2) 8. Client 1 and Client 2 send data OK 9. Disconnect Client 1 actively, select() API will return -1 if Client 2 send data at this time, tcp server will not work internal: 7c50f410
ESP8266_RTOS_SDK
ESP8266 SDK based on FreeRTOS.
Note
APIs of "ESP8266_RTOS_SDK" are same as "ESP8266_NONOS_SDK"
More details in "Wiki" !
Requrements
You can use both xcc and gcc to compile your project, gcc is recommended. For gcc, please refer to esp-open-sdk.
Compile
Clone ESP8266_RTOS_SDK, e.g., to ~/ESP8266_RTOS_SDK.
$git clone https://github.com/espressif/ESP8266_RTOS_SDK.git
Modify gen_misc.sh or gen_misc.bat: For Linux:
$export SDK_PATH=~/ESP8266_RTOS_SDK
$export BIN_PATH=~/ESP8266_BIN
For Windows:
set SDK_PATH=/c/ESP8266_RTOS_SDK
set BIN_PATH=/c/ESP8266_BIN
ESP8266_RTOS_SDK/examples/project_template is a project template, you can copy this to anywhere, e.g., to ~/workspace/project_template.
Generate bin: For Linux:
./gen_misc.sh
For Windows:
gen_misc.bat
Just follow the tips and steps.
Download
eagle.app.v6.flash.bin, downloads to flash 0x00000
eagle.app.v6.irom0text.bin, downloads to flash 0x40000
blank.bin, downloads to flash 0x7E000
Description
Languages
C
86.2%
Python
6%
C++
4.1%
CMake
1%
Makefile
0.8%
Other
1.6%