diff --git a/.github/workflows/examples_build-host-test.yml b/.github/workflows/examples_build-host-test.yml index 0a1cbbc1a..2919faf0f 100644 --- a/.github/workflows/examples_build-host-test.yml +++ b/.github/workflows/examples_build-host-test.yml @@ -13,10 +13,7 @@ jobs: name: Build examples strategy: matrix: - idf_ver: ["latest", "release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4"] - include: - - idf_ver: "latest" - warning: "Warning: The smallest app partition is nearly full" + idf_ver: ["latest", "release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "release-v5.5", "release-v6.0"] runs-on: ubuntu-22.04 container: espressif/idf:${{ matrix.idf_ver }} env: @@ -27,7 +24,7 @@ jobs: uses: actions/checkout@v4 - name: Build with IDF-${{ matrix.idf_ver }} env: - EXPECTED_WARNING: ${{ matrix.warning }} + EXPECTED_WARNING: "Warning: The smallest app partition is nearly full" shell: bash run: | . ${IDF_PATH}/export.sh @@ -75,7 +72,7 @@ jobs: needs: build_all_examples strategy: matrix: - idf_ver: ["release-v5.4", "latest"] + idf_ver: ["release-v5.5", "latest"] runs-on: - self-hosted - modem diff --git a/examples/esp_netif/multiple_netifs/main/ethernet_connect.c b/examples/esp_netif/multiple_netifs/main/ethernet_connect.c index dc2537e08..5796f7928 100644 --- a/examples/esp_netif/multiple_netifs/main/ethernet_connect.c +++ b/examples/esp_netif/multiple_netifs/main/ethernet_connect.c @@ -18,6 +18,7 @@ #include "esp_log.h" #include "sdkconfig.h" #include "iface_info.h" +#include "esp_idf_version.h" static const char *TAG = "ethernet_connect"; @@ -109,7 +110,11 @@ iface_info_t *example_eth_init(int prio) // Use internal ESP32's ethernet eth_esp32_emac_config_t esp32_emac_config = ETH_ESP32_EMAC_DEFAULT_CONFIG(); eth_info->mac = esp_eth_mac_new_esp32(&esp32_emac_config, &mac_config); +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0) + eth_info->phy = esp_eth_phy_new_generic(&phy_config); +#else eth_info->phy = esp_eth_phy_new_ip101(&phy_config); +#endif // Init Ethernet driver to default and install it esp_eth_config_t config = ETH_DEFAULT_CONFIG(eth_info->mac, eth_info->phy); ESP_ERROR_CHECK(esp_eth_driver_install(&config, ð_info->eth_handle)); diff --git a/examples/esp_netif/multiple_netifs/main/idf_component.yml b/examples/esp_netif/multiple_netifs/main/idf_component.yml index 186d064b4..12333e231 100644 --- a/examples/esp_netif/multiple_netifs/main/idf_component.yml +++ b/examples/esp_netif/multiple_netifs/main/idf_component.yml @@ -2,3 +2,7 @@ dependencies: espressif/esp_modem: version: "^1.0.0" override_path: "../../../../components/esp_modem" + espressif/mqtt: + rules: + - if: idf_version >=6.0 + version: ^1.0.0 diff --git a/examples/esp_netif/slip_custom_netif/components/slip_modem/CMakeLists.txt b/examples/esp_netif/slip_custom_netif/components/slip_modem/CMakeLists.txt index e30196349..8768f598b 100644 --- a/examples/esp_netif/slip_custom_netif/components/slip_modem/CMakeLists.txt +++ b/examples/esp_netif/slip_custom_netif/components/slip_modem/CMakeLists.txt @@ -1,7 +1,12 @@ # SLIP Modem Component +if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER "5.3") + set(dependencies esp_driver_uart) +else() + set(dependencies driver) +endif() idf_component_register( SRCS "library/slip_modem.c" "library/slip_modem_netif.c" INCLUDE_DIRS "include" - REQUIRES esp_netif driver + REQUIRES esp_netif ${dependencies} ) diff --git a/examples/esp_netif/slip_custom_netif/components/slip_modem/library/slip_modem_netif.c b/examples/esp_netif/slip_custom_netif/components/slip_modem/library/slip_modem_netif.c index 7bf6792a8..ce06b16c5 100644 --- a/examples/esp_netif/slip_custom_netif/components/slip_modem/library/slip_modem_netif.c +++ b/examples/esp_netif/slip_custom_netif/components/slip_modem/library/slip_modem_netif.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2019-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2019-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -53,10 +53,18 @@ esp_err_t slip_modem_netif_start(esp_netif_t *esp_netif, esp_ip6_addr_t *addr) return ESP_OK; } +#if defined(CONFIG_ESP_NETIF_RECEIVE_REPORT_ERRORS) +typedef esp_err_t esp_netif_recv_ret_t; +#define ESP_NETIF_OPTIONAL_RETURN_CODE(expr) expr +#else +typedef void esp_netif_recv_ret_t; +#define ESP_NETIF_OPTIONAL_RETURN_CODE(expr) +#endif // CONFIG_ESP_NETIF_RECEIVE_REPORT_ERRORS + /** * @brief Write incoming serial data to the SLIP interface */ -void esp_netif_lwip_slip_input(void *h, void *buffer, unsigned int len, void *eb) +esp_netif_recv_ret_t esp_netif_lwip_slip_input(void *h, void *buffer, unsigned int len, void *eb) { struct netif *netif = h; @@ -76,6 +84,7 @@ void esp_netif_lwip_slip_input(void *h, void *buffer, unsigned int len, void *eb for (int i = 0; i < len; i++) { slipif_process_rxqueue(netif); } + return ESP_NETIF_OPTIONAL_RETURN_CODE(ESP_OK); } /** diff --git a/examples/mqtt/main/idf_component.yml b/examples/mqtt/main/idf_component.yml index 718194867..5a432a3d5 100644 --- a/examples/mqtt/main/idf_component.yml +++ b/examples/mqtt/main/idf_component.yml @@ -1,3 +1,7 @@ dependencies: protocol_examples_common: path: ${IDF_PATH}/examples/common_components/protocol_examples_common + espressif/mqtt: + rules: + - if: idf_version >=6.0 + version: ^1.0.0