diff --git a/EdgeImpulse.EI-SDK.pdsc b/EdgeImpulse.EI-SDK.pdsc
index 46663e7..ddd5380 100644
--- a/EdgeImpulse.EI-SDK.pdsc
+++ b/EdgeImpulse.EI-SDK.pdsc
@@ -5,13 +5,16 @@
EI-SDK
LICENSE-apache-2.0.txt
Edge Impulse SDK
- https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.50.11/
+ https://github.com/edgeimpulse/edge-impulse-sdk-pack/releases/download/v1.50.13/
hello@edgeimpulse.com
https://github.com/edgeimpulse/edge-impulse-sdk-pack.git
-
+
EI-SDK
+
+ EI-SDK
+
EI-SDK
@@ -98,9 +101,6 @@
EI-SDK
-
-
- EI-SDK
@@ -146,7 +146,7 @@
-
+
Edge Impulse SDK
diff --git a/EdgeImpulse.pidx b/EdgeImpulse.pidx
index ffbfb18..a3f0af9 100644
--- a/EdgeImpulse.pidx
+++ b/EdgeImpulse.pidx
@@ -2,8 +2,8 @@
EdgeImpulse
https://raw.githubusercontent.com/edgeimpulse/edge-impulse-sdk-pack/main/
- 2024-05-27 11:35:17
+ 2024-05-30 13:50:49
-
+
diff --git a/edgeimpulse/edge-impulse-sdk/porting/espressif/ei_classifier_porting.cpp b/edgeimpulse/edge-impulse-sdk/porting/espressif/ei_classifier_porting.cpp
index 5e6e74c..840ebe6 100644
--- a/edgeimpulse/edge-impulse-sdk/porting/espressif/ei_classifier_porting.cpp
+++ b/edgeimpulse/edge-impulse-sdk/porting/espressif/ei_classifier_porting.cpp
@@ -28,6 +28,10 @@
// for millis and micros
#include "esp_timer.h"
+#include "esp_idf_version.h"
+
+// memory handling
+#include "esp_heap_caps.h"
#define EI_WEAK_FN __attribute__((weak))
@@ -78,13 +82,20 @@ __attribute__((weak)) void ei_printf_float(float f) {
// due to https://github.com/espressif/esp-nn/issues/7
__attribute__((weak)) void *ei_malloc(size_t size) {
#if defined(CONFIG_IDF_TARGET_ESP32S3)
+#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 2, 1)
+ return heap_caps_aligned_alloc(16, size, MALLOC_CAP_DEFAULT);
+#else
return aligned_alloc(16, size);
+#endif
#endif
return malloc(size);
}
__attribute__((weak)) void *ei_calloc(size_t nitems, size_t size) {
#if defined(CONFIG_IDF_TARGET_ESP32S3)
+#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 2, 1)
+ return heap_caps_calloc(nitems, size, MALLOC_CAP_DEFAULT);
+#else
void *p;
p = aligned_alloc(16, nitems * size);
if (p == nullptr)
@@ -92,6 +103,7 @@ __attribute__((weak)) void *ei_calloc(size_t nitems, size_t size) {
memset(p, '\0', nitems * size);
return p;
+#endif
#endif
return calloc(nitems, size);
}