Skip to content

Feature/fixing clang gnu compiler warnings #620

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1342407
Adding in ability to support a library for freertos_config and a cust…
phelter Sep 29, 2022
1822d8e
Using single name definition for libraries everywhere. (#558)
phelter Sep 30, 2022
50a29ef
Supporting backwards compatibility with FREERTOS_CONFIG_FILE_DIRECTOR…
phelter Oct 11, 2022
06f9314
Removing compiler warnings for GNU and Clang. (#571)
phelter Oct 12, 2022
b625d2a
Merge branch 'main' into feature/cmake-updates
aggarg Oct 12, 2022
ae8eb33
Merge branch 'main' into feature/cmake-updates
phelter Oct 13, 2022
855d6d5
Merge branch 'main' into feature/cmake-updates
phelter Oct 23, 2022
a3db429
Added in documentation on how to consume from a main project. Added d…
phelter Oct 23, 2022
2310f17
Merge branch 'main' into feature/cmake-updates
aggarg Oct 31, 2022
b2c564c
Only adding freertos_config if it exists. Removing auto generation of…
phelter Nov 4, 2022
8c3c2c1
Fixing clang and gnu compiler warnings.
phelter Oct 13, 2022
2e2aa7a
Adding in project information and how to compile for GNU/clang
phelter Oct 23, 2022
89ac587
Fixing compiler issue with unused variable - no need to declare varia…
phelter Oct 24, 2022
8952634
Adding in compile warnings for linux builds that kernel is okay with …
phelter Nov 1, 2022
6d60ad8
Fixing more extra-semi-stmt clang warnings.
phelter Nov 2, 2022
4bddfa3
Moving definition of hooks into header files if features are enabled.
phelter Nov 3, 2022
5b7045c
Fixing formatting with uncrustify.
phelter Nov 3, 2022
32ecc3e
Merge remote-tracking branch 'origin/main' into feature/fixing-clang-…
phelter Feb 9, 2023
ec7de59
Fixing merge conflicts with main merge.
phelter Feb 9, 2023
c3a0d94
Fixing compiler errors due to merge issues and formatting.
phelter Feb 9, 2023
0f5b7cf
Fixing Line feeds.
phelter Feb 9, 2023
eb83cad
Adding 'portNORETURN' into portmacros.h. Other Updates based on PR re…
phelter Feb 13, 2023
fc687af
Merge branch 'main' into feature/fixing-clang-gnu-compiler-warnings
aggarg Feb 13, 2023
fda8ac9
Further clean-up of clang and clang-tidy issues.
phelter Feb 13, 2023
608b7d7
Removing compiler specific pragmas from common c files.
phelter Feb 13, 2023
23acff8
Fixing missing lexicon entry and uncrustify formatting changes.
phelter Feb 13, 2023
e15209f
Resolving merge issue multiple defnitions of proto for prvIdleTask
phelter Feb 13, 2023
31c6261
Fixing formatting issues that are not covered by uncrustify. Use clan…
phelter Feb 13, 2023
8839aa4
More uncrustify formatting issues.
phelter Feb 13, 2023
1169b3b
Fixing extra bracket in #if statement.
phelter Feb 13, 2023
d538ae6
Merge branch 'main' into feature/fixing-clang-gnu-compiler-warnings
phelter Feb 22, 2023
75f2405
Merge branch 'main' into feature/fixing-clang-gnu-compiler-warnings
aggarg Feb 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/lexicon.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2458,6 +2458,7 @@ vaninterruptserviceroutine
vanisr
vanothertask
vapplicationcleartimerinterrupt
vapplicationdaemontaskstartuphook
vapplicationexceptionregisterdump
vapplicationfpusafeirqhandler
vapplicationgetidletaskmemory
Expand Down
41 changes: 41 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,47 @@ elseif((FREERTOS_PORT STREQUAL "A_CUSTOM_PORT") AND (NOT TARGET freertos_kernel_
" freertos_kernel)")
endif()

########################################################################
# Requirements
set(CMAKE_C_STANDARD 99)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@phelter Why do you need C99? We want to support C89. Did you notice anything C99 specific in the kernel?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aggarg - Yes- there were several cases of: C90 ISO violations of declaration after statement. See: https://clang.llvm.org/docs/DiagnosticsReference.html#wdeclaration-after-statement These may have since been updated.

These can be detected using clang-14 compiles by setting the compile options in the description of this PR.

Feel free to change back to C90 if/when those are updated. I am unaware of any others.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the clarification. I did build the kernel with -Wdeclaration-after-statement and I see no warning from kernel source. I will remove the following 2 lines which were added in this PR -

set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is the PR - #633

set(CMAKE_C_STANDARD_REQUIRED ON)

########################################################################
# Overall Compile Options
# Note the compile option strategy is to error on everything and then
# Per library opt-out of things that are warnings/errors.
# This ensures that no matter what strategy for compilation you take, the
# builds will still occur.
#
# Only tested with GNU and Clang.
# Other options are https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_ID.html#variable:CMAKE_%3CLANG%3E_COMPILER_ID
# Naming of compilers translation map:
#
# FreeRTOS | CMake
# -------------------
# CCS | ?TBD?
# GCC | GNU, Clang, *Clang Others?
# IAR | IAR
# Keil | ARMCC
# MSVC | MSVC # Note only for MinGW?
# Renesas | ?TBD?

add_compile_options(
### Gnu/Clang C Options
$<$<COMPILE_LANG_AND_ID:C,GNU>:-fdiagnostics-color=always>
$<$<COMPILE_LANG_AND_ID:C,Clang>:-fcolor-diagnostics>

$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Wall>
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Wextra>
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Wpedantic>
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Werror>
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Weverything>

# TODO: Add in other Compilers here.
)


########################################################################
add_subdirectory(portable)

add_library(freertos_kernel STATIC
Expand Down
10 changes: 5 additions & 5 deletions event_groups.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@
typedef struct EventGroupDef_t
{
EventBits_t uxEventBits;
List_t xTasksWaitingForBits; /*< List of tasks waiting for a bit to be set. */
List_t xTasksWaitingForBits; /**< List of tasks waiting for a bit to be set. */

#if ( configUSE_TRACE_FACILITY == 1 )
UBaseType_t uxEventGroupNumber;
#endif

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

Expand Down Expand Up @@ -521,15 +521,15 @@ EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup,

EventBits_t xEventGroupGetBitsFromISR( EventGroupHandle_t xEventGroup )
{
UBaseType_t uxSavedInterruptStatus;
portBASE_TYPE xSavedInterruptStatus;
EventGroup_t const * const pxEventBits = xEventGroup;
EventBits_t uxReturn;

uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
xSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR();
{
uxReturn = pxEventBits->uxEventBits;
}
portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus );
portCLEAR_INTERRUPT_MASK_FROM_ISR( xSavedInterruptStatus );

return uxReturn;
} /*lint !e818 EventGroupHandle_t is a typedef used in other functions to so can't be pointer to const. */
Expand Down
4 changes: 4 additions & 0 deletions include/FreeRTOS.h
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,10 @@
#define portDONT_DISCARD
#endif

#ifndef portNORETURN
#define portNORETURN
#endif

#ifndef configUSE_TIME_SLICING
#define configUSE_TIME_SLICING 1
#endif
Expand Down
36 changes: 18 additions & 18 deletions include/list.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,20 +143,20 @@
struct xLIST;
struct xLIST_ITEM
{
listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
configLIST_VOLATILE TickType_t xItemValue; /*< The value being listed. In most cases this is used to sort the list in ascending order. */
struct xLIST_ITEM * configLIST_VOLATILE pxNext; /*< Pointer to the next ListItem_t in the list. */
struct xLIST_ITEM * configLIST_VOLATILE pxPrevious; /*< Pointer to the previous ListItem_t in the list. */
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. */
struct xLIST * configLIST_VOLATILE pxContainer; /*< Pointer to the list in which this list item is placed (if any). */
listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE /**< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
configLIST_VOLATILE TickType_t xItemValue; /**< The value being listed. In most cases this is used to sort the list in ascending order. */
struct xLIST_ITEM * configLIST_VOLATILE pxNext; /**< Pointer to the next ListItem_t in the list. */
struct xLIST_ITEM * configLIST_VOLATILE pxPrevious; /**< Pointer to the previous ListItem_t in the list. */
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. */
struct xLIST * configLIST_VOLATILE pxContainer; /**< Pointer to the list in which this list item is placed (if any). */
listSECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE /**< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
};
typedef struct xLIST_ITEM ListItem_t; /* For some reason lint wants this as two separate definitions. */

#if ( configUSE_MINI_LIST_ITEM == 1 )
struct xMINI_LIST_ITEM
{
listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
listFIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE /**< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
configLIST_VOLATILE TickType_t xItemValue;
struct xLIST_ITEM * configLIST_VOLATILE pxNext;
struct xLIST_ITEM * configLIST_VOLATILE pxPrevious;
Expand All @@ -171,11 +171,11 @@ typedef struct xLIST_ITEM ListItem_t; /* For some reason lint
*/
typedef struct xLIST
{
listFIRST_LIST_INTEGRITY_CHECK_VALUE /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
listFIRST_LIST_INTEGRITY_CHECK_VALUE /**< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
volatile UBaseType_t uxNumberOfItems;
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 (). */
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. */
listSECOND_LIST_INTEGRITY_CHECK_VALUE /*< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
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 (). */
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. */
listSECOND_LIST_INTEGRITY_CHECK_VALUE /**< Set to a known value if configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */
} List_t;

/*
Expand Down Expand Up @@ -283,7 +283,7 @@ typedef struct xLIST
* \ingroup LinkedList
*/
#define listGET_OWNER_OF_NEXT_ENTRY( pxTCB, pxList ) \
{ \
do { \
List_t * const pxConstList = ( pxList ); \
/* Increment the index to the next item and return the item, ensuring */ \
/* we don't return the marker used at the end of the list. */ \
Expand All @@ -293,7 +293,7 @@ typedef struct xLIST
( pxConstList )->pxIndex = ( pxConstList )->xListEnd.pxNext; \
} \
( pxTCB ) = ( pxConstList )->pxIndex->pvOwner; \
}
} while( 0 )

/*
* Version of uxListRemove() that does not return a value. Provided as a slight
Expand All @@ -312,7 +312,7 @@ typedef struct xLIST
* \ingroup LinkedList
*/
#define listREMOVE_ITEM( pxItemToRemove ) \
{ \
do { \
/* The list item knows which list it is in. Obtain the list from the list \
* item. */ \
List_t * const pxList = ( pxItemToRemove )->pxContainer; \
Expand All @@ -327,7 +327,7 @@ typedef struct xLIST
\
( pxItemToRemove )->pxContainer = NULL; \
( pxList->uxNumberOfItems )--; \
}
} while( 0 )

/*
* Inline version of vListInsertEnd() to provide slight optimisation for
Expand All @@ -352,7 +352,7 @@ typedef struct xLIST
* \ingroup LinkedList
*/
#define listINSERT_END( pxList, pxNewListItem ) \
{ \
do { \
ListItem_t * const pxIndex = ( pxList )->pxIndex; \
\
/* Only effective when configASSERT() is also defined, these tests may catch \
Expand All @@ -374,7 +374,7 @@ typedef struct xLIST
( pxNewListItem )->pxContainer = ( pxList ); \
\
( ( pxList )->uxNumberOfItems )++; \
}
} while( 0 )

/*
* Access function to obtain the owner of the first entry in a list. Lists
Expand Down
6 changes: 3 additions & 3 deletions include/queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -1346,9 +1346,9 @@ BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue,
* @param pvBuffer Pointer to the buffer into which the received item will
* be copied.
*
* @param pxTaskWoken A task may be blocked waiting for space to become
* available on the queue. If xQueueReceiveFromISR causes such a task to
* unblock *pxTaskWoken will get set to pdTRUE, otherwise *pxTaskWoken will
* @param pxHigherPriorityTaskWoken A task may be blocked waiting for space to
* become available on the queue. If xQueueReceiveFromISR causes such a task
* to unblock *pxTaskWoken will get set to pdTRUE, otherwise *pxTaskWoken will
* remain unchanged.
*
* @return pdTRUE if an item was successfully received from the queue,
Expand Down
4 changes: 2 additions & 2 deletions include/stack_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
#if ( ( configCHECK_FOR_STACK_OVERFLOW > 1 ) && ( portSTACK_GROWTH < 0 ) )

#define taskCHECK_FOR_STACK_OVERFLOW() \
{ \
do { \
const uint32_t * const pulStack = ( uint32_t * ) pxCurrentTCB->pxStack; \
const uint32_t ulCheckValue = ( uint32_t ) 0xa5a5a5a5; \
\
Expand All @@ -98,7 +98,7 @@
{ \
vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB, pxCurrentTCB->pcTaskName ); \
} \
}
} while( 0 )

#endif /* #if( configCHECK_FOR_STACK_OVERFLOW > 1 ) */
/*-----------------------------------------------------------*/
Expand Down
4 changes: 2 additions & 2 deletions include/task.h
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ typedef enum
*
* @param xTask The handle of the task being updated.
*
* @param xRegions A pointer to a MemoryRegion_t structure that contains the
* @param[in] pxRegions A pointer to a MemoryRegion_t structure that contains the
* new memory region definitions.
*
* Example usage:
Expand Down Expand Up @@ -1667,7 +1667,7 @@ configSTACK_DEPTH_TYPE uxTaskGetStackHighWaterMark2( TaskHandle_t xTask ) PRIVIL
#endif


#if ( configUSE_TICK_HOOK > 0 )
#if ( configUSE_TICK_HOOK != 0 )

/**
* task.h
Expand Down
14 changes: 14 additions & 0 deletions include/timers.h
Original file line number Diff line number Diff line change
Expand Up @@ -1361,6 +1361,20 @@ BaseType_t xTimerGenericCommand( TimerHandle_t xTimer,

#endif

#if ( configUSE_DAEMON_TASK_STARTUP_HOOK != 0 )

/**
* timers.h
* @code{c}
* void vApplicationDaemonTaskStartupHook( void );
* @endcode
*
* This hook function is called form the timer task once when the task starts running.
*/
void vApplicationDaemonTaskStartupHook( void );

#endif

/* *INDENT-OFF* */
#ifdef __cplusplus
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
*/
#define portARCH_NAME "Cortex-M23"
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

#if( configTOTAL_MPU_REGIONS == 16 )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
*/
#define portARCH_NAME "Cortex-M23"
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

#if( configTOTAL_MPU_REGIONS == 16 )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
*/
#define portARCH_NAME "Cortex-M33"
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
*/
#define portARCH_NAME "Cortex-M33"
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
*/
#define portARCH_NAME "Cortex-M55"
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
*/
#define portARCH_NAME "Cortex-M85"
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/**
Expand Down
1 change: 1 addition & 0 deletions portable/GCC/ARM_CM0/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
#define portBYTE_ALIGNMENT 8
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/


Expand Down
1 change: 1 addition & 0 deletions portable/GCC/ARM_CM23/non_secure/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
*/
#define portARCH_NAME "Cortex-M23"
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

#if( configTOTAL_MPU_REGIONS == 16 )
Expand Down
1 change: 1 addition & 0 deletions portable/GCC/ARM_CM23_NTZ/non_secure/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
*/
#define portARCH_NAME "Cortex-M23"
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

#if( configTOTAL_MPU_REGIONS == 16 )
Expand Down
1 change: 1 addition & 0 deletions portable/GCC/ARM_CM3/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
#define portBYTE_ALIGNMENT 8
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/* Scheduler utilities. */
Expand Down
1 change: 1 addition & 0 deletions portable/GCC/ARM_CM33/non_secure/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
*/
#define portARCH_NAME "Cortex-M33"
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/**
Expand Down
1 change: 1 addition & 0 deletions portable/GCC/ARM_CM33_NTZ/non_secure/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
*/
#define portARCH_NAME "Cortex-M33"
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/**
Expand Down
1 change: 1 addition & 0 deletions portable/GCC/ARM_CM3_MPU/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
#define portBYTE_ALIGNMENT 8
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/* SVC numbers for various services. */
Expand Down
1 change: 1 addition & 0 deletions portable/GCC/ARM_CM4F/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
#define portBYTE_ALIGNMENT 8
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/* Scheduler utilities. */
Expand Down
1 change: 1 addition & 0 deletions portable/GCC/ARM_CM4_MPU/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ typedef struct MPU_SETTINGS
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
#define portBYTE_ALIGNMENT 8
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/* SVC numbers for various services. */
Expand Down
1 change: 1 addition & 0 deletions portable/GCC/ARM_CM55/non_secure/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
*/
#define portARCH_NAME "Cortex-M55"
#define portDONT_DISCARD __attribute__( ( used ) )
#define portNORETURN __attribute__( ( noreturn ) )
/*-----------------------------------------------------------*/

/**
Expand Down
Loading