Skip to content

Commit 684b34c

Browse files
authored
Define security extension configs before portable.h (#1294)
Define configENABLE_PAC and configENABLE_BTI before including portable.h to prevent "used before definition" warnings when these macros are not set in FreeRTOSConfig.h. Fixes: #1293 Signed-off-by: Gaurav Aggarwal <[email protected]>
1 parent f5e6151 commit 684b34c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

include/FreeRTOS.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,16 @@
101101
#define configASSERT_DEFINED 1
102102
#endif
103103

104+
/* Set configENABLE_PAC and/or configENABLE_BTI to 1 to enable PAC and/or BTI
105+
* support and 0 to disable them. These are currently used in ARMv8.1-M ports. */
106+
#ifndef configENABLE_PAC
107+
#define configENABLE_PAC 0
108+
#endif
109+
110+
#ifndef configENABLE_BTI
111+
#define configENABLE_BTI 0
112+
#endif
113+
104114
/* Basic FreeRTOS definitions. */
105115
#include "projdefs.h"
106116

@@ -3040,16 +3050,6 @@
30403050
#define configCONTROL_INFINITE_LOOP()
30413051
#endif
30423052

3043-
/* Set configENABLE_PAC and/or configENABLE_BTI to 1 to enable PAC and/or BTI
3044-
* support and 0 to disable them. These are currently used in ARMv8.1-M ports. */
3045-
#ifndef configENABLE_PAC
3046-
#define configENABLE_PAC 0
3047-
#endif
3048-
3049-
#ifndef configENABLE_BTI
3050-
#define configENABLE_BTI 0
3051-
#endif
3052-
30533053
/* Sometimes the FreeRTOSConfig.h settings only allow a task to be created using
30543054
* dynamically allocated RAM, in which case when any task is deleted it is known
30553055
* that both the task's stack and TCB need to be freed. Sometimes the

0 commit comments

Comments
 (0)