Skip to content

Commit 8cd5451

Browse files
phelteraggarg
andauthored
Feature/fixing clang gnu compiler warnings (#620)
* Adding in ability to support a library for freertos_config and a custom freertos_kernel_port (#558) * Using single name definition for libraries everywhere. (#558) * Supporting backwards compatibility with FREERTOS_CONFIG_FILE_DIRECTORY (#571) * Removing compiler warnings for GNU and Clang. (#571) * Added in documentation on how to consume from a main project. Added default PORT selection for native POSIX and MINGW platforms. * Only adding freertos_config if it exists. Removing auto generation of it from a FREERTOS_CONFIG_FILE_DIRECTORY. * Fixing clang and gnu compiler warnings. * Adding in project information and how to compile for GNU/clang * Fixing compiler issue with unused variable - no need to declare variable. * Adding in compile warnings for linux builds that kernel is okay with using. * Fixing more extra-semi-stmt clang warnings. * Moving definition of hooks into header files if features are enabled. * Fixing formatting with uncrustify. * Fixing merge conflicts with main merge. * Fixing compiler errors due to merge issues and formatting. * Fixing Line feeds. * Adding 'portNORETURN' into portmacros.h. Other Updates based on PR request * Further clean-up of clang and clang-tidy issues. * Removing compiler specific pragmas from common c files. * Fixing missing lexicon entry and uncrustify formatting changes. * Resolving merge issue multiple defnitions of proto for prvIdleTask * Fixing formatting issues that are not covered by uncrustify. Use clang-tidy instead if you want this level of control. * More uncrustify formatting issues. * Fixing extra bracket in #if statement. --------- Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
1 parent 5d05601 commit 8cd5451

File tree

38 files changed

+260
-172
lines changed

38 files changed

+260
-172
lines changed

.github/lexicon.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2458,6 +2458,7 @@ vaninterruptserviceroutine
24582458
vanisr
24592459
vanothertask
24602460
vapplicationcleartimerinterrupt
2461+
vapplicationdaemontaskstartuphook
24612462
vapplicationexceptionregisterdump
24622463
vapplicationfpusafeirqhandler
24632464
vapplicationgetidletaskmemory

CMakeLists.txt

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,47 @@ elseif((FREERTOS_PORT STREQUAL "A_CUSTOM_PORT") AND (NOT TARGET freertos_kernel_
222222
" freertos_kernel)")
223223
endif()
224224

225+
########################################################################
226+
# Requirements
227+
set(CMAKE_C_STANDARD 99)
228+
set(CMAKE_C_STANDARD_REQUIRED ON)
229+
230+
########################################################################
231+
# Overall Compile Options
232+
# Note the compile option strategy is to error on everything and then
233+
# Per library opt-out of things that are warnings/errors.
234+
# This ensures that no matter what strategy for compilation you take, the
235+
# builds will still occur.
236+
#
237+
# Only tested with GNU and Clang.
238+
# Other options are https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_ID.html#variable:CMAKE_%3CLANG%3E_COMPILER_ID
239+
# Naming of compilers translation map:
240+
#
241+
# FreeRTOS | CMake
242+
# -------------------
243+
# CCS | ?TBD?
244+
# GCC | GNU, Clang, *Clang Others?
245+
# IAR | IAR
246+
# Keil | ARMCC
247+
# MSVC | MSVC # Note only for MinGW?
248+
# Renesas | ?TBD?
249+
250+
add_compile_options(
251+
### Gnu/Clang C Options
252+
$<$<COMPILE_LANG_AND_ID:C,GNU>:-fdiagnostics-color=always>
253+
$<$<COMPILE_LANG_AND_ID:C,Clang>:-fcolor-diagnostics>
254+
255+
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Wall>
256+
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Wextra>
257+
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Wpedantic>
258+
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Werror>
259+
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Weverything>
260+
261+
# TODO: Add in other Compilers here.
262+
)
263+
264+
265+
########################################################################
225266
add_subdirectory(portable)
226267

227268
add_library(freertos_kernel STATIC

event_groups.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@
6969
typedef struct EventGroupDef_t
7070
{
7171
EventBits_t uxEventBits;
72-
List_t xTasksWaitingForBits; /*< List of tasks waiting for a bit to be set. */
72+
List_t xTasksWaitingForBits; /**< List of tasks waiting for a bit to be set. */
7373

7474
#if ( configUSE_TRACE_FACILITY == 1 )
7575
UBaseType_t uxEventGroupNumber;
7676
#endif
7777

7878
#if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
79-
uint8_t ucStaticallyAllocated; /*< Set to pdTRUE if the event group is statically allocated to ensure no attempt is made to free the memory. */
79+
uint8_t ucStaticallyAllocated; /**< Set to pdTRUE if the event group is statically allocated to ensure no attempt is made to free the memory. */
8080
#endif
8181
} EventGroup_t;
8282

@@ -521,15 +521,15 @@ EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup,
521521

522522
EventBits_t xEventGroupGetBitsFromISR( EventGroupHandle_t xEventGroup )
523523
{
524-
UBaseType_t uxSavedInterruptStatus;
524+
portBASE_TYPE xSavedInterruptStatus;
525525
EventGroup_t const * const pxEventBits = xEventGroup;
526526
EventBits_t uxReturn;
527527

528-
uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
528+
xSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
529529
{
530530
uxReturn = pxEventBits->uxEventBits;
531531
}
532-
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
532+
portCLEAR_INTERRUPT_MASK_FROM_ISR( xSavedInterruptStatus );
533533

534534
return uxReturn;
535535
} /*lint !e818 EventGroupHandle_t is a typedef used in other functions to so can't be pointer to const. */

include/FreeRTOS.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -904,6 +904,10 @@
904904
#define portDONT_DISCARD
905905
#endif
906906

907+
#ifndef portNORETURN
908+
#define portNORETURN
909+
#endif
910+
907911
#ifndef configUSE_TIME_SLICING
908912
#define configUSE_TIME_SLICING 1
909913
#endif

include/list.h

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -143,20 +143,20 @@
143143
struct xLIST;
144144
struct xLIST_ITEM
145145
{
146-
listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
147-
configLIST_VOLATILE TickType_t xItemValue; /*< The value being listed. In most cases this is used to sort the list in ascending order. */
148-
struct xLIST_ITEM * configLIST_VOLATILE pxNext; /*< Pointer to the next ListItem_t in the list. */
149-
struct xLIST_ITEM * configLIST_VOLATILE pxPrevious; /*< Pointer to the previous ListItem_t in the list. */
150-
void * pvOwner; /*< Pointer to the object (normally a TCB) that contains the list item. There is therefore a two way link between the object containing the list item and the list item itself. */
151-
struct xLIST * configLIST_VOLATILE pxContainer; /*< Pointer to the list in which this list item is placed (if any). */
152-
listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
146+
listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE /**< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
147+
configLIST_VOLATILE TickType_t xItemValue; /**< The value being listed. In most cases this is used to sort the list in ascending order. */
148+
struct xLIST_ITEM * configLIST_VOLATILE pxNext; /**< Pointer to the next ListItem_t in the list. */
149+
struct xLIST_ITEM * configLIST_VOLATILE pxPrevious; /**< Pointer to the previous ListItem_t in the list. */
150+
void * pvOwner; /**< Pointer to the object (normally a TCB) that contains the list item. There is therefore a two way link between the object containing the list item and the list item itself. */
151+
struct xLIST * configLIST_VOLATILE pxContainer; /**< Pointer to the list in which this list item is placed (if any). */
152+
listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE /**< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
153153
};
154154
typedef struct xLIST_ITEM ListItem_t; /* For some reason lint wants this as two separate definitions. */
155155

156156
#if ( configUSE_MINI_LIST_ITEM == 1 )
157157
struct xMINI_LIST_ITEM
158158
{
159-
listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
159+
listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE /**< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
160160
configLIST_VOLATILE TickType_t xItemValue;
161161
struct xLIST_ITEM * configLIST_VOLATILE pxNext;
162162
struct xLIST_ITEM * configLIST_VOLATILE pxPrevious;
@@ -171,11 +171,11 @@ typedef struct xLIST_ITEM ListItem_t; /* For some reason lint
171171
*/
172172
typedef struct xLIST
173173
{
174-
listFIRST_LIST_INTEGRITY_CHECK_VALUE /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
174+
listFIRST_LIST_INTEGRITY_CHECK_VALUE /**< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
175175
volatile UBaseType_t uxNumberOfItems;
176-
ListItem_t * configLIST_VOLATILE pxIndex; /*< Used to walk through the list. Points to the last item returned by a call to listGET_OWNER_OF_NEXT_ENTRY (). */
177-
MiniListItem_t xListEnd; /*< List item that contains the maximum possible item value meaning it is always at the end of the list and is therefore used as a marker. */
178-
listSECOND_LIST_INTEGRITY_CHECK_VALUE /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
176+
ListItem_t * configLIST_VOLATILE pxIndex; /**< Used to walk through the list. Points to the last item returned by a call to listGET_OWNER_OF_NEXT_ENTRY (). */
177+
MiniListItem_t xListEnd; /**< List item that contains the maximum possible item value meaning it is always at the end of the list and is therefore used as a marker. */
178+
listSECOND_LIST_INTEGRITY_CHECK_VALUE /**< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
179179
} List_t;
180180

181181
/*
@@ -283,7 +283,7 @@ typedef struct xLIST
283283
* \ingroup LinkedList
284284
*/
285285
#define listGET_OWNER_OF_NEXT_ENTRY( pxTCB, pxList ) \
286-
{ \
286+
do { \
287287
List_t * const pxConstList = ( pxList ); \
288288
/* Increment the index to the next item and return the item, ensuring */ \
289289
/* we don't return the marker used at the end of the list. */ \
@@ -293,7 +293,7 @@ typedef struct xLIST
293293
( pxConstList )->pxIndex = ( pxConstList )->xListEnd.pxNext; \
294294
} \
295295
( pxTCB ) = ( pxConstList )->pxIndex->pvOwner; \
296-
}
296+
} while( 0 )
297297

298298
/*
299299
* Version of uxListRemove() that does not return a value. Provided as a slight
@@ -312,7 +312,7 @@ typedef struct xLIST
312312
* \ingroup LinkedList
313313
*/
314314
#define listREMOVE_ITEM( pxItemToRemove ) \
315-
{ \
315+
do { \
316316
/* The list item knows which list it is in. Obtain the list from the list \
317317
* item. */ \
318318
List_t * const pxList = ( pxItemToRemove )->pxContainer; \
@@ -327,7 +327,7 @@ typedef struct xLIST
327327
\
328328
( pxItemToRemove )->pxContainer = NULL; \
329329
( pxList->uxNumberOfItems )--; \
330-
}
330+
} while( 0 )
331331

332332
/*
333333
* Inline version of vListInsertEnd() to provide slight optimisation for
@@ -352,7 +352,7 @@ typedef struct xLIST
352352
* \ingroup LinkedList
353353
*/
354354
#define listINSERT_END( pxList, pxNewListItem ) \
355-
{ \
355+
do { \
356356
ListItem_t * const pxIndex = ( pxList )->pxIndex; \
357357
\
358358
/* Only effective when configASSERT() is also defined, these tests may catch \
@@ -374,7 +374,7 @@ typedef struct xLIST
374374
( pxNewListItem )->pxContainer = ( pxList ); \
375375
\
376376
( ( pxList )->uxNumberOfItems )++; \
377-
}
377+
} while( 0 )
378378

379379
/*
380380
* Access function to obtain the owner of the first entry in a list. Lists

include/queue.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,9 +1346,9 @@ BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue,
13461346
* @param pvBuffer Pointer to the buffer into which the received item will
13471347
* be copied.
13481348
*
1349-
* @param pxTaskWoken A task may be blocked waiting for space to become
1350-
* available on the queue. If xQueueReceiveFromISR causes such a task to
1351-
* unblock *pxTaskWoken will get set to pdTRUE, otherwise *pxTaskWoken will
1349+
* @param pxHigherPriorityTaskWoken A task may be blocked waiting for space to
1350+
* become available on the queue. If xQueueReceiveFromISR causes such a task
1351+
* to unblock *pxTaskWoken will get set to pdTRUE, otherwise *pxTaskWoken will
13521352
* remain unchanged.
13531353
*
13541354
* @return pdTRUE if an item was successfully received from the queue,

include/stack_macros.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
#if ( ( configCHECK_FOR_STACK_OVERFLOW > 1 ) && ( portSTACK_GROWTH < 0 ) )
8888

8989
#define taskCHECK_FOR_STACK_OVERFLOW() \
90-
{ \
90+
do { \
9191
const uint32_t * const pulStack = ( uint32_t * ) pxCurrentTCB->pxStack; \
9292
const uint32_t ulCheckValue = ( uint32_t ) 0xa5a5a5a5; \
9393
\
@@ -98,7 +98,7 @@
9898
{ \
9999
vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB, pxCurrentTCB->pcTaskName ); \
100100
} \
101-
}
101+
} while( 0 )
102102

103103
#endif /* #if( configCHECK_FOR_STACK_OVERFLOW > 1 ) */
104104
/*-----------------------------------------------------------*/

include/task.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ typedef enum
658658
*
659659
* @param xTask The handle of the task being updated.
660660
*
661-
* @param xRegions A pointer to a MemoryRegion_t structure that contains the
661+
* @param[in] pxRegions A pointer to a MemoryRegion_t structure that contains the
662662
* new memory region definitions.
663663
*
664664
* Example usage:
@@ -1667,7 +1667,7 @@ configSTACK_DEPTH_TYPE uxTaskGetStackHighWaterMark2( TaskHandle_t xTask ) PRIVIL
16671667
#endif
16681668

16691669

1670-
#if ( configUSE_TICK_HOOK > 0 )
1670+
#if ( configUSE_TICK_HOOK != 0 )
16711671

16721672
/**
16731673
* task.h

include/timers.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,6 +1361,20 @@ BaseType_t xTimerGenericCommand( TimerHandle_t xTimer,
13611361

13621362
#endif
13631363

1364+
#if ( configUSE_DAEMON_TASK_STARTUP_HOOK != 0 )
1365+
1366+
/**
1367+
* timers.h
1368+
* @code{c}
1369+
* void vApplicationDaemonTaskStartupHook( void );
1370+
* @endcode
1371+
*
1372+
* This hook function is called form the timer task once when the task starts running.
1373+
*/
1374+
void vApplicationDaemonTaskStartupHook( void );
1375+
1376+
#endif
1377+
13641378
/* *INDENT-OFF* */
13651379
#ifdef __cplusplus
13661380
}

portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/portmacro.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
*/
5151
#define portARCH_NAME "Cortex-M23"
5252
#define portDONT_DISCARD __attribute__( ( used ) )
53+
#define portNORETURN __attribute__( ( noreturn ) )
5354
/*-----------------------------------------------------------*/
5455

5556
#if( configTOTAL_MPU_REGIONS == 16 )

portable/ARMv8M/non_secure/portable/GCC/ARM_CM23_NTZ/portmacro.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
*/
5151
#define portARCH_NAME "Cortex-M23"
5252
#define portDONT_DISCARD __attribute__( ( used ) )
53+
#define portNORETURN __attribute__( ( noreturn ) )
5354
/*-----------------------------------------------------------*/
5455

5556
#if( configTOTAL_MPU_REGIONS == 16 )

portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/portmacro.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
*/
5151
#define portARCH_NAME "Cortex-M33"
5252
#define portDONT_DISCARD __attribute__( ( used ) )
53+
#define portNORETURN __attribute__( ( noreturn ) )
5354
/*-----------------------------------------------------------*/
5455

5556
/**

portable/ARMv8M/non_secure/portable/GCC/ARM_CM33_NTZ/portmacro.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
*/
5151
#define portARCH_NAME "Cortex-M33"
5252
#define portDONT_DISCARD __attribute__( ( used ) )
53+
#define portNORETURN __attribute__( ( noreturn ) )
5354
/*-----------------------------------------------------------*/
5455

5556
/**

portable/ARMv8M/non_secure/portable/GCC/ARM_CM55/portmacro.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
*/
5656
#define portARCH_NAME "Cortex-M55"
5757
#define portDONT_DISCARD __attribute__( ( used ) )
58+
#define portNORETURN __attribute__( ( noreturn ) )
5859
/*-----------------------------------------------------------*/
5960

6061
/**

portable/ARMv8M/non_secure/portable/GCC/ARM_CM85/portmacro.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
*/
5656
#define portARCH_NAME "Cortex-M85"
5757
#define portDONT_DISCARD __attribute__( ( used ) )
58+
#define portNORETURN __attribute__( ( noreturn ) )
5859
/*-----------------------------------------------------------*/
5960

6061
/**

portable/GCC/ARM_CM0/portmacro.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
7878
#define portBYTE_ALIGNMENT 8
7979
#define portDONT_DISCARD __attribute__( ( used ) )
80+
#define portNORETURN __attribute__( ( noreturn ) )
8081
/*-----------------------------------------------------------*/
8182

8283

portable/GCC/ARM_CM23/non_secure/portmacro.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
*/
5151
#define portARCH_NAME "Cortex-M23"
5252
#define portDONT_DISCARD __attribute__( ( used ) )
53+
#define portNORETURN __attribute__( ( noreturn ) )
5354
/*-----------------------------------------------------------*/
5455

5556
#if( configTOTAL_MPU_REGIONS == 16 )

portable/GCC/ARM_CM23_NTZ/non_secure/portmacro.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
*/
5151
#define portARCH_NAME "Cortex-M23"
5252
#define portDONT_DISCARD __attribute__( ( used ) )
53+
#define portNORETURN __attribute__( ( noreturn ) )
5354
/*-----------------------------------------------------------*/
5455

5556
#if( configTOTAL_MPU_REGIONS == 16 )

portable/GCC/ARM_CM3/portmacro.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
7878
#define portBYTE_ALIGNMENT 8
7979
#define portDONT_DISCARD __attribute__( ( used ) )
80+
#define portNORETURN __attribute__( ( noreturn ) )
8081
/*-----------------------------------------------------------*/
8182

8283
/* Scheduler utilities. */

portable/GCC/ARM_CM33/non_secure/portmacro.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
*/
5151
#define portARCH_NAME "Cortex-M33"
5252
#define portDONT_DISCARD __attribute__( ( used ) )
53+
#define portNORETURN __attribute__( ( noreturn ) )
5354
/*-----------------------------------------------------------*/
5455

5556
/**

portable/GCC/ARM_CM33_NTZ/non_secure/portmacro.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
*/
5151
#define portARCH_NAME "Cortex-M33"
5252
#define portDONT_DISCARD __attribute__( ( used ) )
53+
#define portNORETURN __attribute__( ( noreturn ) )
5354
/*-----------------------------------------------------------*/
5455

5556
/**

portable/GCC/ARM_CM3_MPU/portmacro.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
114114
#define portBYTE_ALIGNMENT 8
115115
#define portDONT_DISCARD __attribute__( ( used ) )
116+
#define portNORETURN __attribute__( ( noreturn ) )
116117
/*-----------------------------------------------------------*/
117118

118119
/* SVC numbers for various services. */

portable/GCC/ARM_CM4F/portmacro.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
8181
#define portBYTE_ALIGNMENT 8
8282
#define portDONT_DISCARD __attribute__( ( used ) )
83+
#define portNORETURN __attribute__( ( noreturn ) )
8384
/*-----------------------------------------------------------*/
8485

8586
/* Scheduler utilities. */

portable/GCC/ARM_CM4_MPU/portmacro.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ typedef struct MPU_SETTINGS
203203
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
204204
#define portBYTE_ALIGNMENT 8
205205
#define portDONT_DISCARD __attribute__( ( used ) )
206+
#define portNORETURN __attribute__( ( noreturn ) )
206207
/*-----------------------------------------------------------*/
207208

208209
/* SVC numbers for various services. */

portable/GCC/ARM_CM55/non_secure/portmacro.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
*/
5656
#define portARCH_NAME "Cortex-M55"
5757
#define portDONT_DISCARD __attribute__( ( used ) )
58+
#define portNORETURN __attribute__( ( noreturn ) )
5859
/*-----------------------------------------------------------*/
5960

6061
/**

0 commit comments

Comments
 (0)