Skip to content

Commit 07e8edd

Browse files
Merge pull request #856 from david-cermak/fix/mosquitto_build
[mosq]: Fix esp_webRTC-lib deprecation with new FreeRTOS
2 parents ffeee3e + 78ae255 commit 07e8edd

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

.github/workflows/mosq__build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ jobs:
1818
exclude:
1919
- idf_ver: "release-v5.1"
2020
example: "serverless_mqtt" # serverless_mqtt is not supported due to esp-peer
21+
include:
22+
- idf_ver: "latest"
23+
example: "serverless_mqtt"
24+
warning: "'octal_mode' is deprecated"
2125

2226
runs-on: ubuntu-22.04
2327
container: espressif/idf:${{ matrix.idf_ver }}
@@ -31,6 +35,8 @@ jobs:
3135
with:
3236
submodules: recursive
3337
- name: Build with IDF-${{ matrix.idf_ver }}
38+
env:
39+
EXPECTED_WARNING: ${{ matrix.warning }}
3440
shell: bash
3541
run: |
3642
. ${IDF_PATH}/export.sh
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
From 600c9baaa622cd0885697829bcc5e22fa0a79e68 Mon Sep 17 00:00:00 2001
2+
From: David Cermak <cermak@espressif.com>
3+
Date: Fri, 25 Jul 2025 17:20:10 +0200
4+
Subject: [PATCH] fix(media_lib): Remove deprecated API for get_stack_frame API
5+
6+
---
7+
components/media_lib_sal/port/media_lib_os_freertos.c | 6 +++++-
8+
1 file changed, 5 insertions(+), 1 deletion(-)
9+
10+
diff --git a/components/media_lib_sal/port/media_lib_os_freertos.c b/components/media_lib_sal/port/media_lib_os_freertos.c
11+
index d248d59..1117926 100644
12+
--- a/components/media_lib_sal/port/media_lib_os_freertos.c
13+
+++ b/components/media_lib_sal/port/media_lib_os_freertos.c
14+
@@ -369,7 +369,11 @@ static int _get_stack_frame(void** addr, int n)
15+
TaskSnapshot_t snap_shot;
16+
TaskHandle_t cur_task = xTaskGetCurrentTaskHandle();
17+
vTaskGetSnapshot(cur_task, &snap_shot);
18+
- snap_shot.pxTopOfStack = pxTaskGetStackStart(cur_task);;
19+
+#if (ESP_IDF_VERSION > ESP_IDF_VERSION_VAL(5, 5, 0))
20+
+ snap_shot.pxTopOfStack = xTaskGetStackStart(cur_task);
21+
+#else
22+
+ snap_shot.pxTopOfStack = pxTaskGetStackStart(cur_task);
23+
+#endif
24+
esp_backtrace_get_start(&(frame.pc), &(frame.sp), &(frame.next_pc));
25+
26+
for (int i = 0; i < n; i++) {
27+
--
28+
2.43.0

components/mosquitto/examples/serverless_mqtt/esp_peer_setup/install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ COMPONENTS_SRC="${EXTRACTED_DIR}/components"
1414
COMPONENTS_DST="${ESP_PEER_DIR}/components"
1515
PATCH_FILE_1="${THIS_DIR}/Remove-deprecated-freeRTOS-header.patch"
1616
PATCH_FILE_2="${THIS_DIR}/libpeer-Add-direct-dependency-to-libsrtp.patch"
17+
PATCH_FILE_3="${THIS_DIR}/Remove-deprecated-API-for-get_stack_fr.patch"
1718

1819
# Download if not exists
1920
if [ ! -d "$EXTRACTED_DIR" ]; then
@@ -22,6 +23,7 @@ if [ ! -d "$EXTRACTED_DIR" ]; then
2223
unzip -o "$ZIP_PATH" -d "$ESP_PEER_DIR"
2324
patch -p1 -d "$EXTRACTED_DIR" < "$PATCH_FILE_1"
2425
patch -p1 -d "$EXTRACTED_DIR" < "$PATCH_FILE_2"
26+
patch -p1 -d "$EXTRACTED_DIR" < "$PATCH_FILE_3"
2527
mv ${EXTRACTED_DIR}/components ${ESP_PEER_DIR}
2628
mv ${ESP_PEER_DIR}/components/esp_webrtc/impl/peer_default ${ESP_PEER_DIR}/components
2729
fi

0 commit comments

Comments
 (0)