diff --git a/examples/protocols/sockets/tcp_client/CMakeLists.txt b/examples/protocols/sockets/tcp_client/CMakeLists.txt index 0d19ff5631..52a0c94544 100644 --- a/examples/protocols/sockets/tcp_client/CMakeLists.txt +++ b/examples/protocols/sockets/tcp_client/CMakeLists.txt @@ -3,7 +3,8 @@ cmake_minimum_required(VERSION 3.16) if(${IDF_TARGET} STREQUAL "linux") - list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/mocks/freertos/") + set(EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/mocks/freertos/" + "$ENV{IDF_PATH}/examples/protocols/linux_stubs/esp_stubs") set(COMPONENTS main) include($ENV{IDF_PATH}/tools/cmake/project.cmake) else() diff --git a/examples/protocols/sockets/tcp_client/components/esp_stubs/CMakeLists.txt b/examples/protocols/sockets/tcp_client/components/esp_stubs/CMakeLists.txt deleted file mode 100644 index 74f75ec2a8..0000000000 --- a/examples/protocols/sockets/tcp_client/components/esp_stubs/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -if(${IDF_TARGET} STREQUAL "linux") - idf_component_register(SRCS - esp_stubs/esp_stubs.c - INCLUDE_DIRS . include/stubs - REQUIRES main) -endif() diff --git a/examples/protocols/sockets/tcp_client/components/esp_stubs/esp_stubs/esp_stubs.c b/examples/protocols/sockets/tcp_client/components/esp_stubs/esp_stubs/esp_stubs.c deleted file mode 100644 index 51141e0bc5..0000000000 --- a/examples/protocols/sockets/tcp_client/components/esp_stubs/esp_stubs/esp_stubs.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Unlicense OR CC0-1.0 - */ -#include -#include "esp_err.h" -#include "esp_log.h" - -extern void app_main(void); - -esp_err_t esp_event_loop_create_default(void) -{ - return ESP_OK; -} - -esp_err_t esp_netif_init(void) -{ - return ESP_OK; -} - -esp_err_t example_connect(void) -{ - return ESP_OK; -} - -esp_err_t nvs_flash_init(void) -{ - return ESP_OK; -} - -int main() -{ - app_main(); - - return 0; -} diff --git a/examples/protocols/sockets/tcp_client/components/esp_stubs/include/stubs/esp_event.h b/examples/protocols/sockets/tcp_client/components/esp_stubs/include/stubs/esp_event.h deleted file mode 100644 index 79887049cf..0000000000 --- a/examples/protocols/sockets/tcp_client/components/esp_stubs/include/stubs/esp_event.h +++ /dev/null @@ -1,8 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Unlicense OR CC0-1.0 - */ -#include "esp_err.h" - -esp_err_t esp_event_loop_create_default(void); diff --git a/examples/protocols/sockets/tcp_client/components/esp_stubs/include/stubs/esp_netif.h b/examples/protocols/sockets/tcp_client/components/esp_stubs/include/stubs/esp_netif.h deleted file mode 100644 index 860d7a620b..0000000000 --- a/examples/protocols/sockets/tcp_client/components/esp_stubs/include/stubs/esp_netif.h +++ /dev/null @@ -1,11 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Unlicense OR CC0-1.0 - */ -#include -#include -#include -#include "esp_err.h" - -esp_err_t esp_netif_init(void); diff --git a/examples/protocols/sockets/tcp_client/components/esp_stubs/include/stubs/nvs_flash.h b/examples/protocols/sockets/tcp_client/components/esp_stubs/include/stubs/nvs_flash.h deleted file mode 100644 index 9d138a838a..0000000000 --- a/examples/protocols/sockets/tcp_client/components/esp_stubs/include/stubs/nvs_flash.h +++ /dev/null @@ -1,8 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Unlicense OR CC0-1.0 - */ -#include "esp_err.h" - -esp_err_t nvs_flash_init(void); diff --git a/examples/protocols/sockets/tcp_client/components/esp_stubs/include/stubs/protocol_examples_common.h b/examples/protocols/sockets/tcp_client/components/esp_stubs/include/stubs/protocol_examples_common.h deleted file mode 100644 index 6f8bf0706f..0000000000 --- a/examples/protocols/sockets/tcp_client/components/esp_stubs/include/stubs/protocol_examples_common.h +++ /dev/null @@ -1,8 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Unlicense OR CC0-1.0 - */ -#include "esp_err.h" - -esp_err_t example_connect(void);