Skip to content

Instantly share code, notes, and snippets.

@jmkim
Created April 11, 2025 08:42
Show Gist options
  • Save jmkim/298a7c4fcbc34f8c387f7a3bb825a207 to your computer and use it in GitHub Desktop.
Save jmkim/298a7c4fcbc34f8c387f7a3bb825a207 to your computer and use it in GitHub Desktop.
From 423319693132e1b28ed8e81a72078f45cb00863d Mon Sep 17 00:00:00 2001
From: Jongmin Kim <[email protected]>
Date: Thu, 10 Apr 2025 20:28:34 +0900
Subject: [PATCH] pkg/exp32: fix ESP-IDF build conflicts
Signed-off-by: Jongmin Kim <[email protected]>
---
...x-undefined-reference-to-rtc_gpio_fo.patch | 29 +++++++++++++++++++
...newlib-guard-sys-uio.h-for-RIOT-only.patch | 27 +++++++++++++++++
2 files changed, 56 insertions(+)
create mode 100644 pkg/esp32_sdk/patches/0037-driver-rtc_io-fix-undefined-reference-to-rtc_gpio_fo.patch
create mode 100644 pkg/esp32_sdk/patches/0038-newlib-guard-sys-uio.h-for-RIOT-only.patch
diff --git a/pkg/esp32_sdk/patches/0037-driver-rtc_io-fix-undefined-reference-to-rtc_gpio_fo.patch b/pkg/esp32_sdk/patches/0037-driver-rtc_io-fix-undefined-reference-to-rtc_gpio_fo.patch
new file mode 100644
index 000000000000..cdc829294640
--- /dev/null
+++ b/pkg/esp32_sdk/patches/0037-driver-rtc_io-fix-undefined-reference-to-rtc_gpio_fo.patch
@@ -0,0 +1,29 @@
+From 5db5d279fae095919427b174a1e937a2d9b43911 Mon Sep 17 00:00:00 2001
+From: Jongmin Kim <[email protected]>
+Date: Thu, 10 Apr 2025 20:16:56 +0900
+Subject: [PATCH 1/2] driver/rtc_io: fix undefined reference to
+ rtc_gpio_force_hold_en_all
+
+Fix the undefined reference to `rtc_gpio_force_hold_en_all` in `components/driver/include/driver/rtc_io.h`
+
+Signed-off-by: Jongmin Kim <[email protected]>
+---
+ components/driver/include/driver/rtc_io.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/components/driver/include/driver/rtc_io.h b/components/driver/include/driver/rtc_io.h
+index cbf32c4f..766bde11 100644
+--- a/components/driver/include/driver/rtc_io.h
++++ b/components/driver/include/driver/rtc_io.h
+@@ -269,7 +269,7 @@ esp_err_t rtc_gpio_isolate(gpio_num_t gpio_num);
+ * Force hold signal is enabled before going into deep sleep for pins which
+ * are used for EXT1 wakeup.
+ */
+-esp_err_t rtc_gpio_force_hold_all(void);
++esp_err_t rtc_gpio_force_hold_en_all(void);
+
+ /**
+ * @brief Disable force hold signal for all RTC IOs
+--
+2.49.0
+
diff --git a/pkg/esp32_sdk/patches/0038-newlib-guard-sys-uio.h-for-RIOT-only.patch b/pkg/esp32_sdk/patches/0038-newlib-guard-sys-uio.h-for-RIOT-only.patch
new file mode 100644
index 000000000000..8e74141951f0
--- /dev/null
+++ b/pkg/esp32_sdk/patches/0038-newlib-guard-sys-uio.h-for-RIOT-only.patch
@@ -0,0 +1,27 @@
+From 0b095344abbf3bfdb6a230e62ec45db8101e9b9c Mon Sep 17 00:00:00 2001
+From: Jongmin Kim <[email protected]>
+Date: Thu, 10 Apr 2025 20:22:17 +0900
+Subject: [PATCH 2/2] newlib: guard sys/uio.h for RIOT only
+
+Signed-off-by: Jongmin Kim <[email protected]>
+---
+ components/newlib/platform_include/sys/uio.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/components/newlib/platform_include/sys/uio.h b/components/newlib/platform_include/sys/uio.h
+index 388fed3d..5a8652a7 100644
+--- a/components/newlib/platform_include/sys/uio.h
++++ b/components/newlib/platform_include/sys/uio.h
+@@ -6,7 +6,9 @@
+
+ #pragma once
+
++#ifdef RIOT_VERSION
+ #include_next <sys/uio.h>
++#endif /* RIOT_VERSION */
+
+ #include <stdint.h>
+ #include <sys/types.h>
+--
+2.49.0
+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment