fix(mosq): Fix esp_webRTC deprecation with new FreeRTOS

This commit is contained in:
David Cermak
2025-07-25 17:23:42 +02:00
parent ffeee3e87a
commit 78ae25598b
3 changed files with 36 additions and 0 deletions

View File

@ -18,6 +18,10 @@ jobs:
exclude:
- idf_ver: "release-v5.1"
example: "serverless_mqtt" # serverless_mqtt is not supported due to esp-peer
include:
- idf_ver: "latest"
example: "serverless_mqtt"
warning: "'octal_mode' is deprecated"
runs-on: ubuntu-22.04
container: espressif/idf:${{ matrix.idf_ver }}
@ -31,6 +35,8 @@ jobs:
with:
submodules: recursive
- name: Build with IDF-${{ matrix.idf_ver }}
env:
EXPECTED_WARNING: ${{ matrix.warning }}
shell: bash
run: |
. ${IDF_PATH}/export.sh

View File

@ -0,0 +1,28 @@
From 600c9baaa622cd0885697829bcc5e22fa0a79e68 Mon Sep 17 00:00:00 2001
From: David Cermak <cermak@espressif.com>
Date: Fri, 25 Jul 2025 17:20:10 +0200
Subject: [PATCH] fix(media_lib): Remove deprecated API for get_stack_frame API
---
components/media_lib_sal/port/media_lib_os_freertos.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/components/media_lib_sal/port/media_lib_os_freertos.c b/components/media_lib_sal/port/media_lib_os_freertos.c
index d248d59..1117926 100644
--- a/components/media_lib_sal/port/media_lib_os_freertos.c
+++ b/components/media_lib_sal/port/media_lib_os_freertos.c
@@ -369,7 +369,11 @@ static int _get_stack_frame(void** addr, int n)
TaskSnapshot_t snap_shot;
TaskHandle_t cur_task = xTaskGetCurrentTaskHandle();
vTaskGetSnapshot(cur_task, &snap_shot);
- snap_shot.pxTopOfStack = pxTaskGetStackStart(cur_task);;
+#if (ESP_IDF_VERSION > ESP_IDF_VERSION_VAL(5, 5, 0))
+ snap_shot.pxTopOfStack = xTaskGetStackStart(cur_task);
+#else
+ snap_shot.pxTopOfStack = pxTaskGetStackStart(cur_task);
+#endif
esp_backtrace_get_start(&(frame.pc), &(frame.sp), &(frame.next_pc));
for (int i = 0; i < n; i++) {
--
2.43.0

View File

@ -14,6 +14,7 @@ COMPONENTS_SRC="${EXTRACTED_DIR}/components"
COMPONENTS_DST="${ESP_PEER_DIR}/components"
PATCH_FILE_1="${THIS_DIR}/Remove-deprecated-freeRTOS-header.patch"
PATCH_FILE_2="${THIS_DIR}/libpeer-Add-direct-dependency-to-libsrtp.patch"
PATCH_FILE_3="${THIS_DIR}/Remove-deprecated-API-for-get_stack_fr.patch"
# Download if not exists
if [ ! -d "$EXTRACTED_DIR" ]; then
@ -22,6 +23,7 @@ if [ ! -d "$EXTRACTED_DIR" ]; then
unzip -o "$ZIP_PATH" -d "$ESP_PEER_DIR"
patch -p1 -d "$EXTRACTED_DIR" < "$PATCH_FILE_1"
patch -p1 -d "$EXTRACTED_DIR" < "$PATCH_FILE_2"
patch -p1 -d "$EXTRACTED_DIR" < "$PATCH_FILE_3"
mv ${EXTRACTED_DIR}/components ${ESP_PEER_DIR}
mv ${ESP_PEER_DIR}/components/esp_webrtc/impl/peer_default ${ESP_PEER_DIR}/components
fi