Skip to content

Commit 08a4e9c

Browse files
committed
Fix CMSIS_RTOS_V2 compilation issue (FreeRTOS 10.3.1)
* CMSIS_device_header must be defined. * Some Includes define must be set Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
1 parent 929d553 commit 08a4e9c

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,12 @@ CMSIS-RTOSv2.
105105
| [P-Nucleo-WB55RG](https://www.st.com/en/evaluation-tools/p-nucleo-wb55.html) | PASSED | PASSED | FAILED | PASSED | PASSED |
106106

107107
\* PASSED with `configUSE_NEWLIB_REENTRANT` set to 0 due to small RAM.
108+
109+
### STM32FreeRTOS v10.3.1
110+
| Board | AnalogRead_DigitalRead | frBlinkPrint | frLiuLayland | frBlink (CMSIS-RTOSv2) | Blinky (CMSIS-RTOSv2) |
111+
| --- | :---: | :---: | :---: | :---: | :---: |
112+
| [Nucleo F091RC (Cortex-M0)](http://www.st.com/en/evaluation-tools/nucleo-f091rc.html) | PASSED | PASSED | FAILED | PASSED | PASSED |
113+
| [Nucleo G071RB (Cortex-M0+)](http://www.st.com/en/evaluation-tools/nucleo-g071rb.html) | PASSED | PASSED | FAILED | PASSED | PASSED |
114+
| [Nucleo L476RG (Cortex-M3)](http://www.st.com/en/evaluation-tools/nucleo-l476rg.html) | PASSED | PASSED | PASSED | PASSED | PASSED |
115+
| [Nucleo L476RG (Cortex-M4)](http://www.st.com/en/evaluation-tools/nucleo-l476rg.html) | PASSED | PASSED | PASSED | PASSED | PASSED |
116+
| [Nucleo H743ZI (Cortex-M7)](https://www.st.com/en/evaluation-tools/nucleo-h743zi.html) | PASSED | PASSED | PASSED | PASSED | PASSED |

portable/CMSIS_RTOS_V2/cmsis_os2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ extern void xPortSysTickHandler (void);
156156
SysTick handler implementation that also clears overflow flag.
157157
*/
158158
/* SysTick handler implementation done in the core and call osSystickHandler */
159-
#ifndef ARDUINO_ARCH_STM32 && (USE_CUSTOM_SYSTICK_HANDLER_IMPLEMENTATION == 0)
159+
#if !defined(ARDUINO_ARCH_STM32) && (USE_CUSTOM_SYSTICK_HANDLER_IMPLEMENTATION == 0)
160160
void SysTick_Handler (void) {
161161
/* Clear overflow flag */
162162
SysTick->CTRL;
@@ -166,7 +166,7 @@ void SysTick_Handler (void) {
166166
xPortSysTickHandler();
167167
}
168168
}
169-
#endif /* ARDUINO_ARCH_STM32 && USE_CUSTOM_SYSTICK_HANDLER_IMPLEMENTATION == 0*/
169+
#endif /* !ARDUINO_ARCH_STM32 && (USE_CUSTOM_SYSTICK_HANDLER_IMPLEMENTATION == 0)*/
170170
#endif /* SysTick */
171171

172172
/*

src/FreeRTOSConfig_Default.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@
8383
#ifndef configMINIMAL_STACK_SIZE
8484
#define configMINIMAL_STACK_SIZE ((uint16_t)128)
8585
#endif
86+
87+
#if !defined(CMSIS_device_header)
88+
/* CMSIS_device_header defined to stm32_def.h by default, which include <device.h> like stm32f1xx.h */
89+
#define CMSIS_device_header "stm32_def.h"
90+
#endif /* CMSIS_device_header */
8691
#else
8792
#define configMAX_PRIORITIES (7)
8893
#endif /* configUSE_CMSIS_RTOS_V2 */
@@ -158,6 +163,13 @@ to exclude the API function. */
158163
#define INCLUDE_uxTaskGetStackHighWaterMark 1
159164
#define INCLUDE_xTaskGetIdleTaskHandle 1
160165

166+
#if defined(configUSE_CMSIS_RTOS_V2) && (configUSE_CMSIS_RTOS_V2 == 1)
167+
#define INCLUDE_xSemaphoreGetMutexHolder 1
168+
#define INCLUDE_eTaskGetState 1
169+
#define INCLUDE_xTimerPendFunctionCall 1
170+
#define INCLUDE_xTaskGetCurrentTaskHandle 1
171+
#endif
172+
161173
/* Cortex-M specific definitions. */
162174
#ifdef __NVIC_PRIO_BITS
163175
/* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy