Skip to content

Commit d2dc3c2

Browse files
author
Hao Lingjie
committed
upgrade to FreeRTOS 10.4.6
1 parent aa1507f commit d2dc3c2

35 files changed

+5757
-2386
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[{000214A0-0000-0000-C000-000000000046}]
2+
Prop3=19,2
3+
[InternetShortcut]
4+
URL=https://github.com/FreeRTOS/FreeRTOS-Kernel
5+
IconIndex=0
6+
IDList=
7+
HotKey=0
8+

FreeRTOS/Source/History.txt

Lines changed: 2908 additions & 0 deletions
Large diffs are not rendered by default.

FreeRTOS/Source/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,9 @@ See the readme file in the ```./portable``` directory for more information.
3131
- The ```./include``` directory contains the real time kernel header files.
3232

3333
### Code Formatting
34-
FreeRTOS files are formatted using the "uncrustify" tool. The configuration file used by uncrustify can be found in the [FreeRTOS/FreeRTOS repository](https://github.com/FreeRTOS/FreeRTOS/blob/master/tools/uncrustify.cfg).
34+
FreeRTOS files are formatted using the "uncrustify" tool. The configuration file used by uncrustify can be found in the [FreeRTOS/FreeRTOS repository](https://github.com/FreeRTOS/FreeRTOS/blob/main/tools/uncrustify.cfg).
35+
36+
### Spelling
37+
*lexicon.txt* contains words that are not traditionally found in an English dictionary. It is used by the spellchecker to verify the various jargon, variable names, and other odd words used in the FreeRTOS code base. If your pull request fails to pass the spelling and you believe this is a mistake, then add the word to *lexicon.txt*.
38+
Note that only the FreeRTOS Kernel source files are checked for proper spelling, the portable section is ignored.
3539

FreeRTOS/Source/croutine.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/*
2-
* FreeRTOS Kernel V10.4.0
3-
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
* FreeRTOS Kernel V10.4.6
3+
* Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
*
5+
* SPDX-License-Identifier: MIT
46
*
57
* Permission is hereby granted, free of charge, to any person obtaining a copy of
68
* this software and associated documentation files (the "Software"), to deal in

FreeRTOS/Source/event_groups.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/*
2-
* FreeRTOS Kernel V10.4.0
3-
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
* FreeRTOS Kernel V10.4.6
3+
* Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
*
5+
* SPDX-License-Identifier: MIT
46
*
57
* Permission is hereby granted, free of charge, to any person obtaining a copy of
68
* this software and associated documentation files (the "Software"), to deal in
@@ -626,7 +628,11 @@ EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup,
626628
void vEventGroupDelete( EventGroupHandle_t xEventGroup )
627629
{
628630
EventGroup_t * pxEventBits = xEventGroup;
629-
const List_t * pxTasksWaitingForBits = &( pxEventBits->xTasksWaitingForBits );
631+
const List_t * pxTasksWaitingForBits;
632+
633+
configASSERT( pxEventBits );
634+
635+
pxTasksWaitingForBits = &( pxEventBits->xTasksWaitingForBits );
630636

631637
vTaskSuspendAll();
632638
{

FreeRTOS/Source/include/FreeRTOS.h

Lines changed: 54 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/*
2-
* FreeRTOS Kernel V10.4.0
3-
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
* FreeRTOS Kernel V10.4.6
3+
* Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
*
5+
* SPDX-License-Identifier: MIT
46
*
57
* Permission is hereby granted, free of charge, to any person obtaining a copy of
68
* this software and associated documentation files (the "Software"), to deal in
@@ -45,7 +47,7 @@
4547
* contains the typedefs required to build FreeRTOS. Read the instructions
4648
* in FreeRTOS/source/stdint.readme for more information.
4749
*/
48-
#include <stdint.h> /* READ COMMENT ABOVE. */
50+
#include <stdint.h> /* READ COMMENT ABOVE. */
4951

5052
/* *INDENT-OFF* */
5153
#ifdef __cplusplus
@@ -126,8 +128,30 @@
126128
#define INCLUDE_vTaskSuspend 0
127129
#endif
128130

129-
#ifndef INCLUDE_vTaskDelayUntil
130-
#define INCLUDE_vTaskDelayUntil 0
131+
#ifdef INCLUDE_xTaskDelayUntil
132+
#ifdef INCLUDE_vTaskDelayUntil
133+
134+
/* INCLUDE_vTaskDelayUntil was replaced by INCLUDE_xTaskDelayUntil. Backward
135+
* compatibility is maintained if only one or the other is defined, but
136+
* there is a conflict if both are defined. */
137+
#error INCLUDE_vTaskDelayUntil and INCLUDE_xTaskDelayUntil are both defined. INCLUDE_vTaskDelayUntil is no longer required and should be removed
138+
#endif
139+
#endif
140+
141+
#ifndef INCLUDE_xTaskDelayUntil
142+
#ifdef INCLUDE_vTaskDelayUntil
143+
144+
/* If INCLUDE_vTaskDelayUntil is set but INCLUDE_xTaskDelayUntil is not then
145+
* the project's FreeRTOSConfig.h probably pre-dates the introduction of
146+
* xTaskDelayUntil and setting INCLUDE_xTaskDelayUntil to whatever
147+
* INCLUDE_vTaskDelayUntil is set to will ensure backward compatibility.
148+
*/
149+
#define INCLUDE_xTaskDelayUntil INCLUDE_vTaskDelayUntil
150+
#endif
151+
#endif
152+
153+
#ifndef INCLUDE_xTaskDelayUntil
154+
#define INCLUDE_xTaskDelayUntil 0
131155
#endif
132156

133157
#ifndef INCLUDE_vTaskDelay
@@ -883,6 +907,14 @@
883907
#define configSTACK_DEPTH_TYPE uint16_t
884908
#endif
885909

910+
#ifndef configRUN_TIME_COUNTER_TYPE
911+
912+
/* Defaults to uint32_t for backward compatibility, but can be overridden in
913+
* FreeRTOSConfig.h if uint32_t is too restrictive. */
914+
915+
#define configRUN_TIME_COUNTER_TYPE uint32_t
916+
#endif
917+
886918
#ifndef configMESSAGE_BUFFER_LENGTH_TYPE
887919

888920
/* Defaults to size_t for backward compatibility, but can be overridden
@@ -959,7 +991,7 @@
959991

960992
#ifndef configMIN
961993

962-
/* The application writer has not provided their own MAX macro, so define
994+
/* The application writer has not provided their own MIN macro, so define
963995
* the following generic implementation. */
964996
#define configMIN( a, b ) ( ( ( a ) < ( b ) ) ? ( a ) : ( b ) )
965997
#endif
@@ -1034,6 +1066,11 @@
10341066
#define configRUN_FREERTOS_SECURE_ONLY 0
10351067
#endif
10361068

1069+
#ifndef configRUN_ADDITIONAL_TESTS
1070+
#define configRUN_ADDITIONAL_TESTS 0
1071+
#endif
1072+
1073+
10371074
/* Sometimes the FreeRTOSConfig.h settings only allow a task to be created using
10381075
* dynamically allocated RAM, in which case when any task is deleted it is known
10391076
* that both the task's stack and TCB need to be freed. Sometimes the
@@ -1085,7 +1122,7 @@
10851122
* data hiding policy, so the real structures used by FreeRTOS to maintain the
10861123
* state of tasks, queues, semaphores, etc. are not accessible to the application
10871124
* code. However, if the application writer wants to statically allocate such
1088-
* an object then the size of the object needs to be know. Dummy structures
1125+
* an object then the size of the object needs to be known. Dummy structures
10891126
* that are guaranteed to have the same size and alignment requirements of the
10901127
* real objects are used for this purpose. The dummy list and list item
10911128
* structures below are used for inclusion in such a dummy structure.
@@ -1134,7 +1171,7 @@ typedef struct xSTATIC_LIST
11341171
* strict data hiding policy. This means the Task structure used internally by
11351172
* FreeRTOS is not accessible to application code. However, if the application
11361173
* writer wants to statically allocate the memory required to create a task then
1137-
* the size of the task object needs to be know. The StaticTask_t structure
1174+
* the size of the task object needs to be known. The StaticTask_t structure
11381175
* below is provided for this purpose. Its sizes and alignment requirements are
11391176
* guaranteed to match those of the genuine structure, no matter which
11401177
* architecture is being used, and no matter how the values in FreeRTOSConfig.h
@@ -1170,7 +1207,7 @@ typedef struct xSTATIC_TCB
11701207
void * pvDummy15[ configNUM_THREAD_LOCAL_STORAGE_POINTERS ];
11711208
#endif
11721209
#if ( configGENERATE_RUN_TIME_STATS == 1 )
1173-
uint32_t ulDummy16;
1210+
configRUN_TIME_COUNTER_TYPE ulDummy16;
11741211
#endif
11751212
#if ( configUSE_NEWLIB_REENTRANT == 1 )
11761213
struct _reent xDummy17;
@@ -1197,7 +1234,7 @@ typedef struct xSTATIC_TCB
11971234
* strict data hiding policy. This means the Queue structure used internally by
11981235
* FreeRTOS is not accessible to application code. However, if the application
11991236
* writer wants to statically allocate the memory required to create a queue
1200-
* then the size of the queue object needs to be know. The StaticQueue_t
1237+
* then the size of the queue object needs to be known. The StaticQueue_t
12011238
* structure below is provided for this purpose. Its sizes and alignment
12021239
* requirements are guaranteed to match those of the genuine structure, no
12031240
* matter which architecture is being used, and no matter how the values in
@@ -1268,7 +1305,7 @@ typedef struct xSTATIC_EVENT_GROUP
12681305
* strict data hiding policy. This means the software timer structure used
12691306
* internally by FreeRTOS is not accessible to application code. However, if
12701307
* the application writer wants to statically allocate the memory required to
1271-
* create a software timer then the size of the queue object needs to be know.
1308+
* create a software timer then the size of the queue object needs to be known.
12721309
* The StaticTimer_t structure below is provided for this purpose. Its sizes
12731310
* and alignment requirements are guaranteed to match those of the genuine
12741311
* structure, no matter which architecture is being used, and no matter how the
@@ -1296,12 +1333,12 @@ typedef struct xSTATIC_TIMER
12961333
* internally by FreeRTOS is not accessible to application code. However, if
12971334
* the application writer wants to statically allocate the memory required to
12981335
* create a stream buffer then the size of the stream buffer object needs to be
1299-
* know. The StaticStreamBuffer_t structure below is provided for this purpose.
1300-
* Its size and alignment requirements are guaranteed to match those of the
1301-
* genuine structure, no matter which architecture is being used, and no matter
1302-
* how the values in FreeRTOSConfig.h are set. Its contents are somewhat
1303-
* obfuscated in the hope users will recognise that it would be unwise to make
1304-
* direct use of the structure members.
1336+
* known. The StaticStreamBuffer_t structure below is provided for this
1337+
* purpose. Its size and alignment requirements are guaranteed to match those
1338+
* of the genuine structure, no matter which architecture is being used, and
1339+
* no matter how the values in FreeRTOSConfig.h are set. Its contents are
1340+
* somewhat obfuscated in the hope users will recognise that it would be unwise
1341+
* to make direct use of the structure members.
13051342
*/
13061343
typedef struct xSTATIC_STREAM_BUFFER
13071344
{

FreeRTOS/Source/include/StackMacros.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/*
2-
* FreeRTOS Kernel V10.4.0
3-
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
* FreeRTOS Kernel V10.4.6
3+
* Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
*
5+
* SPDX-License-Identifier: MIT
46
*
57
* Permission is hereby granted, free of charge, to any person obtaining a copy of
68
* this software and associated documentation files (the "Software"), to deal in

FreeRTOS/Source/include/atomic.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/*
2-
* FreeRTOS Kernel V10.4.0
3-
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
* FreeRTOS Kernel V10.4.6
3+
* Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
*
5+
* SPDX-License-Identifier: MIT
46
*
57
* Permission is hereby granted, free of charge, to any person obtaining a copy of
68
* this software and associated documentation files (the "Software"), to deal in

0 commit comments

Comments
 (0)