diff --git a/pkg/esp32_sdk/patches/0028-hal-cast-esp-interrupt-type-to-riscv-interrupt-type.patch b/pkg/esp32_sdk/patches/0028-hal-cast-esp-interrupt-type-to-riscv-interrupt-type.patch new file mode 100644 index 0000000000..d588f1057f --- /dev/null +++ b/pkg/esp32_sdk/patches/0028-hal-cast-esp-interrupt-type-to-riscv-interrupt-type.patch @@ -0,0 +1,25 @@ +From 19f7ed9aaab8be94571779fc8b738d3479e0aa23 Mon Sep 17 00:00:00 2001 +From: Gunar Schorcht +Date: Tue, 4 Apr 2023 09:55:00 +0200 +Subject: [PATCH 28/29] hal: cast esp interrupt type to riscv interrupt type + +--- + components/hal/esp32c3/include/hal/interrupt_controller_ll.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/components/hal/esp32c3/include/hal/interrupt_controller_ll.h b/components/hal/esp32c3/include/hal/interrupt_controller_ll.h +index 70afe314cfe..3c3ef3b953e 100644 +--- a/components/hal/esp32c3/include/hal/interrupt_controller_ll.h ++++ b/components/hal/esp32c3/include/hal/interrupt_controller_ll.h +@@ -124,7 +124,7 @@ static inline void intr_cntrl_ll_set_int_level(int intr, int level) + */ + static inline void intr_cntrl_ll_set_int_type(int intr, int_type_t type) + { +- esprv_intc_int_set_type(BIT(intr), type); ++ esprv_intc_int_set_type(BIT(intr), (enum intr_type)type); + } + + #ifdef __cplusplus +-- +2.34.1 + diff --git a/pkg/esp32_sdk/patches/0029-nfs_flash-include-stddef.h-for-size_t-deklaration.patch b/pkg/esp32_sdk/patches/0029-nfs_flash-include-stddef.h-for-size_t-deklaration.patch new file mode 100644 index 0000000000..2a8ecc0521 --- /dev/null +++ b/pkg/esp32_sdk/patches/0029-nfs_flash-include-stddef.h-for-size_t-deklaration.patch @@ -0,0 +1,24 @@ +From 0e52f50f9c53eac78f5c70aed1f140b8ba3a3031 Mon Sep 17 00:00:00 2001 +From: Gunar Schorcht +Date: Tue, 4 Apr 2023 09:55:45 +0200 +Subject: [PATCH 29/29] nfs_flash: include stddef.h for size_t deklaration + +--- + components/nvs_flash/src/intrusive_list.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/components/nvs_flash/src/intrusive_list.h b/components/nvs_flash/src/intrusive_list.h +index bb580502ec7..695020c415f 100644 +--- a/components/nvs_flash/src/intrusive_list.h ++++ b/components/nvs_flash/src/intrusive_list.h +@@ -14,6 +14,7 @@ + #ifndef intrusive_list_h + #define intrusive_list_h + ++#include + #include + #include + +-- +2.34.1 + diff --git a/pkg/esp32_sdk/patches/0030-bt-controller-esp32s3-fix-return-types-in-functions.patch b/pkg/esp32_sdk/patches/0030-bt-controller-esp32s3-fix-return-types-in-functions.patch new file mode 100644 index 0000000000..cde309f996 --- /dev/null +++ b/pkg/esp32_sdk/patches/0030-bt-controller-esp32s3-fix-return-types-in-functions.patch @@ -0,0 +1,141 @@ +From e175ea4902cebfdd5b4edc470feff2dadbec408a Mon Sep 17 00:00:00 2001 +From: Gunar Schorcht +Date: Wed, 5 Apr 2023 01:17:12 +0200 +Subject: [PATCH 30/30] bt/controller/esp32s3: fix return types in functions + +Since the size of int and int32_t is the same, changing int to int32_t and vise versa to fix the compilation issue due to function declaration conflict isn't any risk. +--- + components/bt/controller/esp32s3/bt.c | 52 +++++++++++++-------------- + 1 file changed, 26 insertions(+), 26 deletions(-) + +diff --git a/components/bt/controller/esp32s3/bt.c b/components/bt/controller/esp32s3/bt.c +index 64e10ad4a70..ee68c6b834b 100644 +--- a/components/bt/controller/esp32s3/bt.c ++++ b/components/bt/controller/esp32s3/bt.c +@@ -268,7 +268,7 @@ extern char _bt_tmp_bss_end; + */ + static void interrupt_set_wrapper(int32_t cpu_no, int32_t intr_source, int32_t intr_num, int32_t intr_prio); + static void interrupt_clear_wrapper(int32_t intr_source, int32_t intr_num); +-static void interrupt_handler_set_wrapper(int n, void *fn, void *arg); ++static void interrupt_handler_set_wrapper(int32_t n, void *fn, void *arg); + static void IRAM_ATTR interrupt_disable(void); + static void IRAM_ATTR interrupt_restore(void); + static void IRAM_ATTR task_yield_from_isr(void); +@@ -486,28 +486,28 @@ static void semphr_delete_wrapper(void *semphr) + vSemaphoreDelete(semphr); + } + +-static int IRAM_ATTR semphr_take_from_isr_wrapper(void *semphr, void *hptw) ++static int32_t IRAM_ATTR semphr_take_from_isr_wrapper(void *semphr, void *hptw) + { +- return (int)xSemaphoreTakeFromISR(semphr, hptw); ++ return xSemaphoreTakeFromISR(semphr, hptw); + } + +-static int IRAM_ATTR semphr_give_from_isr_wrapper(void *semphr, void *hptw) ++static int32_t IRAM_ATTR semphr_give_from_isr_wrapper(void *semphr, void *hptw) + { +- return (int)xSemaphoreGiveFromISR(semphr, hptw); ++ return xSemaphoreGiveFromISR(semphr, hptw); + } + +-static int semphr_take_wrapper(void *semphr, uint32_t block_time_ms) ++static int32_t semphr_take_wrapper(void *semphr, uint32_t block_time_ms) + { + if (block_time_ms == OSI_FUNCS_TIME_BLOCKING) { +- return (int)xSemaphoreTake(semphr, portMAX_DELAY); ++ return xSemaphoreTake(semphr, portMAX_DELAY); + } else { +- return (int)xSemaphoreTake(semphr, block_time_ms / portTICK_PERIOD_MS); ++ return xSemaphoreTake(semphr, block_time_ms / portTICK_PERIOD_MS); + } + } + +-static int semphr_give_wrapper(void *semphr) ++static int32_t semphr_give_wrapper(void *semphr) + { +- return (int)xSemaphoreGive(semphr); ++ return xSemaphoreGive(semphr); + } + + static void *mutex_create_wrapper(void) +@@ -520,14 +520,14 @@ static void mutex_delete_wrapper(void *mutex) + vSemaphoreDelete(mutex); + } + +-static int mutex_lock_wrapper(void *mutex) ++static int32_t mutex_lock_wrapper(void *mutex) + { +- return (int)xSemaphoreTake(mutex, portMAX_DELAY); ++ return xSemaphoreTake(mutex, portMAX_DELAY); + } + +-static int mutex_unlock_wrapper(void *mutex) ++static int32_t mutex_unlock_wrapper(void *mutex) + { +- return (int)xSemaphoreGive(mutex); ++ return xSemaphoreGive(mutex); + } + + static void *queue_create_wrapper(uint32_t queue_len, uint32_t item_size) +@@ -540,37 +540,37 @@ static void queue_delete_wrapper(void *queue) + vQueueDelete(queue); + } + +-static int queue_send_wrapper(void *queue, void *item, uint32_t block_time_ms) ++static int32_t queue_send_wrapper(void *queue, void *item, uint32_t block_time_ms) + { + if (block_time_ms == OSI_FUNCS_TIME_BLOCKING) { +- return (int)xQueueSend(queue, item, portMAX_DELAY); ++ return xQueueSend(queue, item, portMAX_DELAY); + } else { +- return (int)xQueueSend(queue, item, block_time_ms / portTICK_PERIOD_MS); ++ return xQueueSend(queue, item, block_time_ms / portTICK_PERIOD_MS); + } + } + +-static int IRAM_ATTR queue_send_from_isr_wrapper(void *queue, void *item, void *hptw) ++static int32_t IRAM_ATTR queue_send_from_isr_wrapper(void *queue, void *item, void *hptw) + { + return (int)xQueueSendFromISR(queue, item, hptw); + } + +-static int queue_recv_wrapper(void *queue, void *item, uint32_t block_time_ms) ++static int32_t queue_recv_wrapper(void *queue, void *item, uint32_t block_time_ms) + { + if (block_time_ms == OSI_FUNCS_TIME_BLOCKING) { +- return (int)xQueueReceive(queue, item, portMAX_DELAY); ++ return xQueueReceive(queue, item, portMAX_DELAY); + } else { +- return (int)xQueueReceive(queue, item, block_time_ms / portTICK_PERIOD_MS); ++ return xQueueReceive(queue, item, block_time_ms / portTICK_PERIOD_MS); + } + } + +-static int IRAM_ATTR queue_recv_from_isr_wrapper(void *queue, void *item, void *hptw) ++static int32_t IRAM_ATTR queue_recv_from_isr_wrapper(void *queue, void *item, void *hptw) + { +- return (int)xQueueReceiveFromISR(queue, item, hptw); ++ return xQueueReceiveFromISR(queue, item, hptw); + } + +-static int task_create_wrapper(void *task_func, const char *name, uint32_t stack_depth, void *param, uint32_t prio, void *task_handle, uint32_t core_id) ++static int32_t task_create_wrapper(void *task_func, const char *name, uint32_t stack_depth, void *param, uint32_t prio, void *task_handle, uint32_t core_id) + { +- return (uint32_t)xTaskCreatePinnedToCore(task_func, name, stack_depth, param, prio, task_handle, (core_id < portNUM_PROCESSORS ? core_id : tskNO_AFFINITY)); ++ return xTaskCreatePinnedToCore(task_func, name, stack_depth, param, prio, task_handle, (core_id < portNUM_PROCESSORS ? core_id : tskNO_AFFINITY)); + } + + static void task_delete_wrapper(void *task_handle) +@@ -592,7 +592,7 @@ static void *malloc_internal_wrapper(size_t size) + return p; + } + +-static int IRAM_ATTR read_mac_wrapper(uint8_t mac[6]) ++static int32_t IRAM_ATTR read_mac_wrapper(uint8_t mac[6]) + { + int ret = esp_read_mac(mac, ESP_MAC_BT); + ESP_LOGI(BT_LOG_TAG, "Bluetooth MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", +-- +2.34.1 +