Skip to content

Commit

Permalink
Update to esp-idf v5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
chrta committed Nov 4, 2023
1 parent 1c62609 commit 5012fd2
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions components/sip_client/idf_component.yml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM espressif/idf:release-v5.0
FROM espressif/idf:release-v5.1

ARG DEBIAN_FRONTEND=noninteractive

Expand Down
4 changes: 2 additions & 2 deletions docker/run-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
5 changes: 2 additions & 3 deletions main/idf_component.yml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
16 changes: 16 additions & 0 deletions main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,22 @@ static const char* TAG = "main";

using SipClientT = SipClient<AsioUdpClient, MbedtlsMd5>;

#ifdef ASIO_NO_EXCEPTIONS
namespace asio::detail {

template <typename Exception>
void throw_exception(const Exception& e)
{
ESP_LOGE(TAG, "Asio exception, terminating...");
std::terminate();
}

template void throw_exception<invalid_service_owner>(const invalid_service_owner&);
template void throw_exception<service_already_exists>(const service_already_exists&);
template void throw_exception<system_error>(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;
Expand Down

0 comments on commit 5012fd2

Please sign in to comment.