Merge branch 'bugfix/esp32s2beta_enable_protocol_examples' into 'master'

Bugfix/esp32s2beta enable protocol examples

Closes IDF-1027

See merge request espressif/esp-idf!6566
pull/4345/head
Angus Gratton 2019-11-04 14:46:57 +08:00
commit 0e9c2cdc93
24 zmienionych plików z 33 dodań i 22 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -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)

Wyświetl plik

@ -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)

Wyświetl plik

@ -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)

Wyświetl plik

@ -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)

Wyświetl plik

@ -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)

Wyświetl plik

@ -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)

Wyświetl plik

@ -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)

Wyświetl plik

@ -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)

Wyświetl plik

@ -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)

Wyświetl plik

@ -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.

Wyświetl plik

@ -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"

Wyświetl plik

@ -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)

Wyświetl plik

@ -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)

Wyświetl plik

@ -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)

Wyświetl plik

@ -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)

Wyświetl plik

@ -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)

Wyświetl plik

@ -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)

Wyświetl plik

@ -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)

Wyświetl plik

@ -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)

Wyświetl plik

@ -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)

Wyświetl plik

@ -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)

Wyświetl plik

@ -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)

Wyświetl plik

@ -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)