From 0ab4bbd9507f2c8fd15ae1ca755aee6334860ad9 Mon Sep 17 00:00:00 2001 From: Alexandre Bourdiol Date: Tue, 13 Sep 2022 09:19:21 +0200 Subject: [PATCH 1/5] fix: set FreeRTOS Kernel priority to 14 Aim is to have Systick priority higher (lower value) than Ethernet Timer Signed-off-by: Alexandre Bourdiol --- src/FreeRTOSConfig_Default.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/FreeRTOSConfig_Default.h b/src/FreeRTOSConfig_Default.h index b2a128f..066b7c1 100644 --- a/src/FreeRTOSConfig_Default.h +++ b/src/FreeRTOSConfig_Default.h @@ -199,7 +199,9 @@ PRIORITY THAN THIS! (higher priorities are lower numeric values. */ /* Interrupt priorities used by the kernel port layer itself. These are generic to all Cortex-M ports, and do not rely on any particular library functions. */ -#define configKERNEL_INTERRUPT_PRIORITY ( configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) ) +/* Warning in case of Ethernet, this prio (used by systick) should be higher (lower value) than ethernet Timer */ +#define configKERNEL_INTERRUPT_PRIORITY 14 + /* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!! See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */ #define configMAX_SYSCALL_INTERRUPT_PRIORITY ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) ) From 727e46a924484cfb19246b49e6c227ea32030a60 Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Tue, 7 Feb 2023 18:32:27 +0100 Subject: [PATCH 2/5] fix: warning condition to manage newlib version > 3.x Signed-off-by: Frederic Pillon --- portable/MemMang/heap_useNewlib_ST.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/portable/MemMang/heap_useNewlib_ST.c b/portable/MemMang/heap_useNewlib_ST.c index e957f56..2aa53e6 100644 --- a/portable/MemMang/heap_useNewlib_ST.c +++ b/portable/MemMang/heap_useNewlib_ST.c @@ -73,7 +73,7 @@ #include #include "newlib.h" -#if ((__NEWLIB__ == 2) && (__NEWLIB_MINOR__ < 5)) ||((__NEWLIB__ == 3) && (__NEWLIB_MINOR__ > 3)) +#if ((__NEWLIB__ == 2) && (__NEWLIB_MINOR__ < 5)) || ((__NEWLIB__ == 3) && (__NEWLIB_MINOR__ > 3)) || (__NEWLIB__ > 3) #warning "This wrapper was verified for newlib versions 2.5 - 3.3; please ensure newlib's external requirements for malloc-family are unchanged!" #endif From 6d463ecafbb292b199168ff07e030851c30c24dd Mon Sep 17 00:00:00 2001 From: cversek Date: Mon, 5 Jun 2023 11:42:53 -0400 Subject: [PATCH 3/5] FIXED BUG configKERNEL_INTERRUPT_PRIORITY must be left shifted according to ref: "Cortex-M Internal Priority Representation" https://www.freertos.org/RTOS-Cortex-M3-M4.html --- src/FreeRTOSConfig_Default.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FreeRTOSConfig_Default.h b/src/FreeRTOSConfig_Default.h index 066b7c1..c0e71ce 100644 --- a/src/FreeRTOSConfig_Default.h +++ b/src/FreeRTOSConfig_Default.h @@ -200,7 +200,7 @@ PRIORITY THAN THIS! (higher priorities are lower numeric values. */ /* Interrupt priorities used by the kernel port layer itself. These are generic to all Cortex-M ports, and do not rely on any particular library functions. */ /* Warning in case of Ethernet, this prio (used by systick) should be higher (lower value) than ethernet Timer */ -#define configKERNEL_INTERRUPT_PRIORITY 14 +#define configKERNEL_INTERRUPT_PRIORITY ( 14 << (8 - configPRIO_BITS) ) /* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!! See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */ From 490b9ed115880836b0bc1f2a5e070a83f2c29422 Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Wed, 7 Jun 2023 15:18:22 +0200 Subject: [PATCH 4/5] chore: bump to v10.3.2 Signed-off-by: Frederic Pillon --- library.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.json b/library.json index 3519781..69af74a 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "STM32duino FreeRTOS", - "version": "10.3.1", + "version": "10.3.2", "keywords": "rtos, timing, thread, task, mutex, semaphore", "description": "Real Time Operating System implemented for STM32", "repository": { From f3abddcd420bd92a862b35877181392bd2647b2a Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Wed, 7 Jun 2023 15:18:43 +0200 Subject: [PATCH 5/5] chore: bump to v10.3.2 Signed-off-by: Frederic Pillon --- library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.properties b/library.properties index acf84da..e5512f1 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=STM32duino FreeRTOS -version=10.3.1 +version=10.3.2 author=Richard Barry maintainer=stm32duino sentence=Real Time Operating System implemented for STM32