Skip to content

Commit 1032651

Browse files
quytranpzzKhiemNguyenT
authored andcommitted
hal: renesas: ra: update Renesas CMSIS header file
Update renesas cmsis header file to fix swap arm thread due to macros regarding FPU not defined correctly. Signed-off-by: Tran Van Quy <[email protected]>
1 parent 02b399d commit 1032651

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

drivers/ra/README

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,7 @@ Patch List:
5454
* Allows custom implementation of option setting memory
5555
Impacted files:
5656
drivers/ra/fsp/src/bsp/mcu/all/bsp_rom_registers.c
57+
58+
* Move the include for cmsis_compiler.h after include for Renesas CMSIS header file
59+
Impacted files:
60+
drivers/ra/fsp/src/bsp/cmsis/Device/RENESAS/Include/renesas.h

drivers/ra/fsp/src/bsp/cmsis/Device/RENESAS/Include/renesas.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,6 @@
2525
extern "C" {
2626
#endif
2727

28-
/* Workaround for LLVM. __ARM_ARCH_8_1M_MAIN__ is defined for CM85 parts. But CMSIS_5 does not support this */
29-
#if defined(__llvm__) && !defined(__CLANG_TIDY__) && defined(__ARM_ARCH_8_1M_MAIN__)
30-
#undef __ARM_ARCH_8_1M_MAIN__
31-
#define __ARM_ARCH_8M_MAIN__ 1
32-
#endif
33-
#include "cmsis_compiler.h"
34-
35-
/* Workaround for compilers that are not defining __ARM_ARCH_8_1M_MAIN__ for CM85 parts. Search CM85_WORKAROUND for related code changes */
36-
#if BSP_CFG_MCU_PART_SERIES == 8
37-
#undef __ARM_ARCH_8M_MAIN__
38-
#define __ARM_ARCH_8_1M_MAIN__ 1
39-
#endif
40-
4128
/** @addtogroup Configuration_of_CMSIS
4229
* @{
4330
*/
@@ -115,6 +102,19 @@ extern "C" {
115102
#endif
116103
#endif
117104

105+
/* Workaround for LLVM. __ARM_ARCH_8_1M_MAIN__ is defined for CM85 parts. But CMSIS_5 does not support this */
106+
#if defined(__llvm__) && !defined(__CLANG_TIDY__) && defined(__ARM_ARCH_8_1M_MAIN__)
107+
#undef __ARM_ARCH_8_1M_MAIN__
108+
#define __ARM_ARCH_8M_MAIN__ 1
109+
#endif
110+
#include "cmsis_compiler.h"
111+
112+
/* Workaround for compilers that are not defining __ARM_ARCH_8_1M_MAIN__ for CM85 parts. Search CM85_WORKAROUND for related code changes */
113+
#if BSP_CFG_MCU_PART_SERIES == 8
114+
#undef __ARM_ARCH_8M_MAIN__
115+
#define __ARM_ARCH_8_1M_MAIN__ 1
116+
#endif
117+
118118
#if __ARM_ARCH_7EM__
119119
#define RENESAS_CORTEX_M4
120120
#elif __ARM_ARCH_6M__

0 commit comments

Comments
 (0)