From 5012fd24bbdd208a8ff858c61bd28647df749db8 Mon Sep 17 00:00:00 2001 From: Christian Taedcke Date: Sat, 4 Nov 2023 14:21:47 +0100 Subject: [PATCH 1/2] Update to esp-idf v5.1 --- README.rst | 2 +- components/sip_client/idf_component.yml | 4 ++-- docker/Dockerfile | 2 +- docker/run-docker.sh | 4 ++-- main/idf_component.yml | 5 ++--- main/main.cpp | 16 ++++++++++++++++ 6 files changed, 24 insertions(+), 9 deletions(-) diff --git a/README.rst b/README.rst index f9d1793..c7aa438 100644 --- a/README.rst +++ b/README.rst @@ -22,7 +22,7 @@ Programming The source code is mixed C and C++. -This application is to be used with `Espressif IoT Development Framework`_ (ESP-IDF). It is tested with version v5.0 (rev 7f5ecbe533b2666df6b10658a023b5f637320696) +This application is to be used with `Espressif IoT Development Framework`_ (ESP-IDF). It is tested with a version after v5.1 (rev b4268c874a4cf8fcf7c0c4153cffb76ad2ddda4e) Please check ESP-IDF docs for getting started instructions. diff --git a/components/sip_client/idf_component.yml b/components/sip_client/idf_component.yml index 3a09f51..a6a9ead 100644 --- a/components/sip_client/idf_component.yml +++ b/components/sip_client/idf_component.yml @@ -1,11 +1,11 @@ ## IDF Component Manager Manifest File dependencies: espressif/asio: - version: "^1.14.1~3" + version: "^1.28.0" public: true ## Required IDF version idf: - version: ">=4.1.0" + version: ">=5.1.0" # # Put list of dependencies here # # For components maintained by Espressif: # component: "~1.0.0" diff --git a/docker/Dockerfile b/docker/Dockerfile index b63d77d..693fe78 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM espressif/idf:release-v5.0 +FROM espressif/idf:release-v5.1 ARG DEBIAN_FRONTEND=noninteractive diff --git a/docker/run-docker.sh b/docker/run-docker.sh index bb3ec59..5d8e36f 100755 --- a/docker/run-docker.sh +++ b/docker/run-docker.sh @@ -24,9 +24,9 @@ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - echo deb http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-15 main > /etc/apt/sources.list.d/llvm.list -wget https://github.com/chriskohlhoff/asio/archive/asio-1-14-1.tar.gz -O /tmp/asio-1-14-1.tar.gz +wget https://github.com/chriskohlhoff/asio/archive/asio-1-28-0.tar.gz -O /tmp/asio-1-28-0.tar.gz -tar -C /usr/include --strip-components=3 -x -f /tmp/asio-1-14-1.tar.gz asio-asio-1-14-1/asio/include/ +tar -C /usr/include --strip-components=3 -x -f /tmp/asio-1-28-0.tar.gz asio-asio-1-28-0/asio/include/ apt-get update \ && apt-get install -y clang-15 \ diff --git a/main/idf_component.yml b/main/idf_component.yml index 9d79ad1..aecce6e 100644 --- a/main/idf_component.yml +++ b/main/idf_component.yml @@ -1,10 +1,9 @@ ## IDF Component Manager Manifest File dependencies: - espressif/asio: "^1.14.1~3" - espressif/mdns: "^1.0.7" + espressif/mdns: "^1.2.2" ## Required IDF version idf: - version: ">=4.1.0" + version: ">=5.1.0" # # Put list of dependencies here # # For components maintained by Espressif: # component: "~1.0.0" diff --git a/main/main.cpp b/main/main.cpp index 758c45e..8c2bbe4 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -68,6 +68,22 @@ static const char* TAG = "main"; using SipClientT = SipClient; +#ifdef ASIO_NO_EXCEPTIONS +namespace asio::detail { + +template +void throw_exception(const Exception& e) +{ + ESP_LOGE(TAG, "Asio exception, terminating..."); + std::terminate(); +} + +template void throw_exception(const invalid_service_owner&); +template void throw_exception(const service_already_exists&); +template void throw_exception(const system_error&); +}; // namespace asio::detail +#endif // ASIO_NO_EXCEPTIONS + static std::string ip_to_string(const esp_ip4_addr_t* ip) { static constexpr size_t BUFFER_SIZE = 16; From ce39e5a0b3a82ecfd317d6d823d8aa6263ba6f8c Mon Sep 17 00:00:00 2001 From: Christian Taedcke Date: Sat, 4 Nov 2023 18:57:05 +0100 Subject: [PATCH 2/2] Update gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3059324..471c830 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ -build/ +build*/ +managed_componenets/ sdkconfig.old sdkconfig compile_commands.json