Merge branch 'bugfix/esp32s2beta_enable_protocol_examples' into 'master'
Bugfix/esp32s2beta enable protocol examples Closes IDF-1027 See merge request espressif/esp-idf!6566
This commit is contained in:
commit
0e9c2cdc93
24 changed files with 33 additions and 22 deletions
|
@ -34,6 +34,25 @@
|
|||
return ret; \
|
||||
}
|
||||
|
||||
#define FETCH_ADD(n, type) type __atomic_fetch_add_ ## n (type* ptr, type value, int memorder) \
|
||||
{ \
|
||||
unsigned state = portENTER_CRITICAL_NESTED(); \
|
||||
type ret = *ptr; \
|
||||
*ptr = *ptr + value; \
|
||||
portEXIT_CRITICAL_NESTED(state); \
|
||||
return ret; \
|
||||
}
|
||||
|
||||
#define FETCH_SUB(n, type) type __atomic_fetch_sub_ ## n (type* ptr, type value, int memorder) \
|
||||
{ \
|
||||
unsigned state = portENTER_CRITICAL_NESTED(); \
|
||||
type ret = *ptr; \
|
||||
*ptr = *ptr - value; \
|
||||
portEXIT_CRITICAL_NESTED(state); \
|
||||
return ret; \
|
||||
}
|
||||
|
||||
|
||||
//this piece of code should only be compiled if the cpu doesn't support atomic compare and swap (s32c1i)
|
||||
#if XCHAL_HAVE_S32C1I == 0
|
||||
|
||||
|
@ -44,4 +63,14 @@ CMP_EXCHANGE(2, uint16_t)
|
|||
CMP_EXCHANGE(4, uint32_t)
|
||||
CMP_EXCHANGE(8, uint64_t)
|
||||
|
||||
FETCH_ADD(1, uint8_t)
|
||||
FETCH_ADD(2, uint16_t)
|
||||
FETCH_ADD(4, uint32_t)
|
||||
FETCH_ADD(8, uint64_t)
|
||||
|
||||
FETCH_SUB(1, uint8_t)
|
||||
FETCH_SUB(2, uint16_t)
|
||||
FETCH_SUB(4, uint32_t)
|
||||
FETCH_SUB(8, uint64_t)
|
||||
|
||||
#endif
|
|
@ -6,6 +6,5 @@ cmake_minimum_required(VERSION 3.5)
|
|||
# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection.
|
||||
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
|
||||
|
||||
set(SUPPORTED_TARGETS esp32)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(asio_chat_client)
|
||||
|
|
|
@ -6,6 +6,5 @@ cmake_minimum_required(VERSION 3.5)
|
|||
# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection.
|
||||
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
|
||||
|
||||
set(SUPPORTED_TARGETS esp32)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(asio_chat_server)
|
||||
|
|
|
@ -6,6 +6,5 @@ cmake_minimum_required(VERSION 3.5)
|
|||
# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection.
|
||||
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
|
||||
|
||||
set(SUPPORTED_TARGETS esp32)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(asio_tcp_echo_server)
|
||||
|
|
|
@ -6,6 +6,5 @@ cmake_minimum_required(VERSION 3.5)
|
|||
# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection.
|
||||
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
|
||||
|
||||
set(SUPPORTED_TARGETS esp32)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(asio_udp_echo_server)
|
||||
|
|
|
@ -6,6 +6,5 @@ cmake_minimum_required(VERSION 3.5)
|
|||
# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection.
|
||||
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
|
||||
|
||||
set(SUPPORTED_TARGETS esp32)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(esp-http-client-example)
|
||||
|
|
|
@ -6,6 +6,5 @@ cmake_minimum_required(VERSION 3.5)
|
|||
# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection.
|
||||
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
|
||||
|
||||
set(SUPPORTED_TARGETS esp32)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(http2-request)
|
||||
|
|
|
@ -6,6 +6,5 @@ cmake_minimum_required(VERSION 3.5)
|
|||
# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection.
|
||||
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
|
||||
|
||||
set(SUPPORTED_TARGETS esp32)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(tests)
|
||||
|
|
|
@ -6,7 +6,6 @@ cmake_minimum_required(VERSION 3.5)
|
|||
# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection.
|
||||
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
|
||||
|
||||
set(SUPPORTED_TARGETS esp32)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(persistent_sockets)
|
||||
|
||||
|
|
|
@ -4,5 +4,4 @@ cmake_minimum_required(VERSION 3.5)
|
|||
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
set(SUPPORTED_TARGETS esp32)
|
||||
project(restful_server)
|
||||
|
|
|
@ -21,6 +21,7 @@ menu "Example Configuration"
|
|||
Deploy website to host.
|
||||
It is recommended to choose this mode during developing.
|
||||
config EXAMPLE_WEB_DEPLOY_SD
|
||||
depends on IDF_TARGET_ESP32
|
||||
bool "Deploy website to SD card"
|
||||
help
|
||||
Deploy website to SD card.
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
CONDITIONS OF ANY KIND, either express or implied.
|
||||
*/
|
||||
#include "sdkconfig.h"
|
||||
#include "driver/sdmmc_host.h"
|
||||
#include "driver/gpio.h"
|
||||
#include "esp_vfs_semihost.h"
|
||||
#include "esp_vfs_fat.h"
|
||||
|
@ -20,6 +19,9 @@
|
|||
#include "mdns.h"
|
||||
#include "lwip/apps/netbiosns.h"
|
||||
#include "protocol_examples_common.h"
|
||||
#if CONFIG_EXAMPLE_WEB_DEPLOY_SD
|
||||
#include "driver/sdmmc_host.h"
|
||||
#endif
|
||||
|
||||
#define MDNS_INSTANCE "esp home web server"
|
||||
|
||||
|
|
|
@ -6,6 +6,5 @@ cmake_minimum_required(VERSION 3.5)
|
|||
# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection.
|
||||
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
|
||||
|
||||
set(SUPPORTED_TARGETS esp32)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(simple)
|
||||
|
|
|
@ -6,6 +6,5 @@ cmake_minimum_required(VERSION 3.5)
|
|||
# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection.
|
||||
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
|
||||
|
||||
set(SUPPORTED_TARGETS esp32)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(https-mbedtls)
|
||||
|
|
|
@ -6,6 +6,5 @@ cmake_minimum_required(VERSION 3.5)
|
|||
# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection.
|
||||
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
|
||||
|
||||
set(SUPPORTED_TARGETS esp32)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(https_request)
|
||||
|
|
|
@ -6,6 +6,5 @@ cmake_minimum_required(VERSION 3.5)
|
|||
# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection.
|
||||
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
|
||||
|
||||
set(SUPPORTED_TARGETS esp32)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(https_server)
|
||||
|
|
|
@ -6,7 +6,6 @@ cmake_minimum_required(VERSION 3.5)
|
|||
# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection.
|
||||
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
|
||||
|
||||
set(SUPPORTED_TARGETS esp32)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
|
||||
project(mqtt_publish)
|
||||
|
|
|
@ -6,7 +6,6 @@ cmake_minimum_required(VERSION 3.5)
|
|||
# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection.
|
||||
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
|
||||
|
||||
set(SUPPORTED_TARGETS esp32)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(mqtt_ssl)
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ cmake_minimum_required(VERSION 3.5)
|
|||
# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection.
|
||||
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
|
||||
|
||||
set(SUPPORTED_TARGETS esp32)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(mqtt_ssl_mutual_auth)
|
||||
|
||||
|
|
|
@ -6,6 +6,5 @@ cmake_minimum_required(VERSION 3.5)
|
|||
# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection.
|
||||
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
|
||||
|
||||
set(SUPPORTED_TARGETS esp32)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(mqtt_tcp)
|
|
@ -6,6 +6,5 @@ cmake_minimum_required(VERSION 3.5)
|
|||
# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection.
|
||||
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
|
||||
|
||||
set(SUPPORTED_TARGETS esp32)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(mqtt_websocket)
|
||||
|
|
|
@ -6,7 +6,6 @@ cmake_minimum_required(VERSION 3.5)
|
|||
# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection.
|
||||
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
|
||||
|
||||
set(SUPPORTED_TARGETS esp32)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(mqtt_websocket_secure)
|
||||
|
||||
|
|
|
@ -6,6 +6,5 @@ cmake_minimum_required(VERSION 3.5)
|
|||
# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection.
|
||||
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
|
||||
|
||||
set(SUPPORTED_TARGETS esp32)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(openssl_client)
|
||||
|
|
|
@ -6,6 +6,5 @@ cmake_minimum_required(VERSION 3.5)
|
|||
# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection.
|
||||
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
|
||||
|
||||
set(SUPPORTED_TARGETS esp32)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(openssl_server)
|
||||
|
|
Loading…
Reference in a new issue