Skip to content

Commit 994bd14

Browse files
authored
Merge branch 'main' into rfc/pre-commit
2 parents 0f165d5 + 56428a9 commit 994bd14

File tree

533 files changed

+5786
-4625
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

533 files changed

+5786
-4625
lines changed

.github/CONTRIBUTING.md

Lines changed: 70 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,70 @@
1-
# Contribution guidelines
2-
3-
Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, code, or
4-
documentation, we welcome our community to be involved in this project.
5-
6-
Please read through this document before submitting any issues or pull requests to ensure we are able to help you and all members of the community as effectively as possible.
7-
8-
## Code of conduct
9-
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
10-
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
11-
[email protected] with any additional questions or comments.
12-
13-
14-
## Security issue notifications
15-
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](https://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.
16-
17-
18-
## Submitting a bugs/feature request
19-
Have a bug to report or feature to request? Follow these steps:
20-
1. Search on the [FreeRTOS Community Support Forums](https://forums.freertos.org/) and [GitHub issue tracker](https://github.com/FreeRTOS/FreeRTOS/issues?utf8=%E2%9C%93&q=is%3Aissue) to be sure this hasn't been already reported or discussed.
21-
2. If your search turns up empty, create a new topic in the [forums](https://forums.freertos.org/) and work with the community to help clarify issues or refine the idea. Include as many of the details listed below.
22-
3. Once the community has had time to discuss and digest, we welcome you to create an [issue](https://github.com/FreeRTOS/FreeRTOS/issues) to report bugs or suggest features.
23-
24-
When creating a new topic on the forums or filing an issue, please include as many relevant details as possible. Examples include:
25-
26-
* A clear description of the situation — what you observe, what you expect, and your view on how the two differ.
27-
* A reproducible test case or sequence of steps.
28-
* The version of our code being used.
29-
* Any modifications you've made relevant to the bug.
30-
* Details of your environment or deployment. Highlight anything unusual.
31-
32-
33-
## Contributing via pull request
34-
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
35-
36-
1. You are working against the latest source on the *master* branch.
37-
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
38-
3. You open an issue to discuss any significant work - we would hate for your time to be wasted.
39-
40-
To send us a pull request, please:
41-
42-
1. Fork the repository.
43-
2. Modify the source; focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
44-
3. Follow the [coding style guide](https://www.FreeRTOS.org/FreeRTOS-Coding-Standard-and-Style-Guide.html).
45-
4. Commit to your fork using clear commit messages.
46-
5. Send us a pull request, answering any default questions in the pull request interface.
47-
NOTE: Please make sure the default option (Allow edits from maintainers) is left checked.
48-
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
49-
50-
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
51-
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
52-
53-
## Coding style
54-
* Please ensure that your code complies to the [FreeRTOS coding style guidelines](https://www.FreeRTOS.org/FreeRTOS-Coding-Standard-and-Style-Guide.html).
55-
56-
57-
## Getting your pull request merged
58-
All pull requests must be approved by our review team before it can be merged in. We appreciate your patience while pull requests are reviewed. The time it takes to review will depend on complexity and consideration of wider implications.
59-
60-
61-
## Finding contributions to work on
62-
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), tackling open 'help wanted' issues is a great place to start.
63-
64-
65-
## Licensing
66-
The FreeRTOS kernel is released under the MIT open source license, the text of which can be found [here](https://github.com/FreeRTOS/FreeRTOS/blob/master/FreeRTOS/License/license.txt)
67-
68-
Additional license files can be found in the folders containing any supplementary libraries licensed by their respective copyright owners where applicable.
69-
70-
We may ask you to sign a [Contributor License Agreement (CLA)](https://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.
1+
# Contribution guidelines
2+
3+
Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, code, or
4+
documentation, we welcome our community to be involved in this project.
5+
6+
Please read through this document before submitting any issues or pull requests to ensure we are able to help you and all members of the community as effectively as possible.
7+
8+
## Code of conduct
9+
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
10+
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
11+
[email protected] with any additional questions or comments.
12+
13+
14+
## Security issue notifications
15+
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](https://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.
16+
17+
18+
## Submitting a bugs/feature request
19+
Have a bug to report or feature to request? Follow these steps:
20+
1. Search on the [FreeRTOS Community Support Forums](https://forums.freertos.org/) and [GitHub issue tracker](https://github.com/FreeRTOS/FreeRTOS/issues?utf8=%E2%9C%93&q=is%3Aissue) to be sure this hasn't been already reported or discussed.
21+
2. If your search turns up empty, create a new topic in the [forums](https://forums.freertos.org/) and work with the community to help clarify issues or refine the idea. Include as many of the details listed below.
22+
3. Once the community has had time to discuss and digest, we welcome you to create an [issue](https://github.com/FreeRTOS/FreeRTOS/issues) to report bugs or suggest features.
23+
24+
When creating a new topic on the forums or filing an issue, please include as many relevant details as possible. Examples include:
25+
26+
* A clear description of the situation — what you observe, what you expect, and your view on how the two differ.
27+
* A reproducible test case or sequence of steps.
28+
* The version of our code being used.
29+
* Any modifications you've made relevant to the bug.
30+
* Details of your environment or deployment. Highlight anything unusual.
31+
32+
33+
## Contributing via pull request
34+
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
35+
36+
1. You are working against the latest source on the *main* branch.
37+
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
38+
3. You open an issue to discuss any significant work - we would hate for your time to be wasted.
39+
40+
To send us a pull request, please:
41+
42+
1. Fork the repository.
43+
2. Modify the source; focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
44+
3. Follow the [coding style guide](https://www.FreeRTOS.org/FreeRTOS-Coding-Standard-and-Style-Guide.html).
45+
4. Commit to your fork using clear commit messages.
46+
5. Send us a pull request, answering any default questions in the pull request interface.
47+
NOTE: Please make sure the default option (Allow edits from maintainers) is left checked.
48+
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
49+
50+
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
51+
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
52+
53+
## Coding style
54+
* Please ensure that your code complies to the [FreeRTOS coding style guidelines](https://www.FreeRTOS.org/FreeRTOS-Coding-Standard-and-Style-Guide.html).
55+
56+
57+
## Getting your pull request merged
58+
All pull requests must be approved by our review team before it can be merged in. We appreciate your patience while pull requests are reviewed. The time it takes to review will depend on complexity and consideration of wider implications.
59+
60+
61+
## Finding contributions to work on
62+
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), tackling open 'help wanted' issues is a great place to start.
63+
64+
65+
## Licensing
66+
The FreeRTOS kernel is released under the MIT open source license, the text of which can be found [here](https://github.com/FreeRTOS/FreeRTOS/blob/main/FreeRTOS/License/license.txt)
67+
68+
Additional license files can be found in the folders containing any supplementary libraries licensed by their respective copyright owners where applicable.
69+
70+
We may ask you to sign a [Contributor License Agreement (CLA)](https://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.

.github/lexicon.txt

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,6 +1105,7 @@ misc
11051105
misconfiguration
11061106
miso
11071107
misra
1108+
mit
11081109
mmcr
11091110
mmi
11101111
mmr
@@ -1529,6 +1530,7 @@ prvinitialisenewstreambuffer
15291530
prvinitialisenewtimer
15301531
prvinsertblockintofreelist
15311532
prvlockqueue
1533+
prvnotifyqueuesetcontainer
15321534
prvportmalloc
15331535
prvportresetpic
15341536
prvprocesssimulatedinterrupts
@@ -1631,7 +1633,6 @@ pvyieldevent
16311633
pwdtc
16321634
pwm
16331635
pwmc
1634-
pxtaskcode
16351636
pxblock
16361637
pxblocktoinsert
16371638
pxcallbackfunction
@@ -1688,6 +1689,7 @@ pxprevious
16881689
pxpreviouswaketime
16891690
pxqueue
16901691
pxqueuebuffer
1692+
pxqueuesetcontainer
16911693
pxramstack
16921694
pxreadycoroutinelists
16931695
pxreadytaskslists
@@ -1707,7 +1709,9 @@ pxstreambuffercreatestatic
17071709
pxtagvalue
17081710
pxtask
17091711
pxtaskbuffer
1712+
pxtaskcode
17101713
pxtaskdefinition
1714+
pxtaskin
17111715
pxtaskstatus
17121716
pxtaskstatusarray
17131717
pxtasktag
@@ -1978,6 +1982,7 @@ softreset
19781982
sp
19791983
spck
19801984
spd
1985+
spdx
19811986
sph
19821987
spi
19831988
spidis
@@ -2306,6 +2311,8 @@ ullporttaskhasfpucontext
23062311
ulmair
23072312
ulmask
23082313
ulmatchvalueforonetick
2314+
ulnumberofheapallocations
2315+
ulnumberofheapfrees
23092316
ulong
23102317
ulparameter
23112318
ulparameters
@@ -2328,6 +2335,7 @@ ulstatsaspercentage
23282335
ulstoppedtimercompensation
23292336
ultablebase
23302337
ultaskgetidleruntimecounter
2338+
ultaskgetidleruntimepercent
23312339
ultaskhasfpucontext
23322340
ultasknotificationtakeindexed
23332341
ultasknotifystateclear
@@ -2337,6 +2345,8 @@ ultasknotifyvalueclear
23372345
ultasknotifyvalueclearindexed
23382346
ultaskswitchedintime
23392347
ultaskswitchrequested
2348+
ultotalmemoryallocations
2349+
ultotalmemoryfrees
23402350
ultotalruntime
23412351
ultotalruntimediv
23422352
ulusingfpu
@@ -2436,6 +2446,7 @@ uxsavedmaskvalue
24362446
uxsavedtaskstackpointer
24372447
uxschedulersuspended
24382448
uxsemaphoregetcount
2449+
uxsemaphoregetcountfromisr
24392450
uxstate
24402451
uxstreambuffernumber
24412452
uxtaskgetnumberoftasks
@@ -2653,7 +2664,6 @@ wu
26532664
www
26542665
wwwfreertos
26552666
wxr
2656-
xtasktodelete
26572667
xa
26582668
xaa
26592669
xaaaa
@@ -2768,6 +2778,9 @@ xgenericlistitem
27682778
xgetfreestackspace
27692779
xhandle
27702780
xhead
2781+
xheapbytescurrentlyallocated
2782+
xheapbytescurrentlyheld
2783+
xheapbyteshighwatermark
27712784
xheapregions
27722785
xhigherpriorittaskwoken
27732786
xhigherprioritytaskwoken
@@ -2794,6 +2807,7 @@ xlistend
27942807
xmair
27952808
xmaxcount
27962809
xmaxexpirycountbeforestopping
2810+
xmaxheapbyteseverheld
27972811
xmaxsize
27982812
xmc
27992813
xmessage
@@ -3020,6 +3034,7 @@ xtaskswaitingforbits
30203034
xtaskswaitingtermination
30213035
xtaskswaitingtoreceive
30223036
xtaskswaitingtosend
3037+
xtasktodelete
30233038
xtasktonotify
30243039
xtasktoquery
30253040
xtasktoresume

.github/scripts/find_replace.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
old_text=$1
3+
new_text=$2
4+
echo "Old text: ${old_text}"
5+
echo "New text: ${new_text}"
6+
grep -rl "${old_text}" . | xargs gsed -i -e '1h;2,$H;$!d;g' -e "s/${old_text}/${new_text}/g"
7+

.github/scripts/kernel_checker.py

Lines changed: 70 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,31 @@
11
#!/usr/bin/env python3
2+
#/*
3+
# * FreeRTOS Kernel <DEVELOPMENT BRANCH>
4+
# * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5+
# *
6+
# * SPDX-License-Identifier: MIT
7+
# *
8+
# * Permission is hereby granted, free of charge, to any person obtaining a copy of
9+
# * this software and associated documentation files (the "Software"), to deal in
10+
# * the Software without restriction, including without limitation the rights to
11+
# * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
12+
# * the Software, and to permit persons to whom the Software is furnished to do so,
13+
# * subject to the following conditions:
14+
# *
15+
# * The above copyright notice and this permission notice shall be included in all
16+
# * copies or substantial portions of the Software.
17+
# *
18+
# * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
# * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
20+
# * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
21+
# * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
22+
# * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
23+
# * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24+
# *
25+
# * https://www.FreeRTOS.org
26+
# * https://github.com/FreeRTOS
27+
# *
28+
# */
229

330
import os
431
from common.header_checker import HeaderChecker
@@ -7,7 +34,9 @@
734
# CONFIG
835
#--------------------------------------------------------------------------------------------------
936
KERNEL_IGNORED_FILES = [
10-
'FreeRTOS-openocd.c'
37+
'FreeRTOS-openocd.c',
38+
'Makefile',
39+
'.DS_Store'
1140
]
1241

1342
KERNEL_IGNORED_EXTENSIONS = [
@@ -35,20 +64,45 @@
3564
'.txt'
3665
]
3766

67+
KERNEL_ASM_EXTENSIONS = [
68+
'.s',
69+
'.S',
70+
'.src',
71+
'.inc',
72+
'.s26',
73+
'.s43',
74+
'.s79',
75+
'.s85',
76+
'.s87',
77+
'.s90',
78+
'.asm',
79+
'.h'
80+
]
81+
82+
KERNEL_PY_EXTENSIONS = [
83+
'.py'
84+
]
85+
3886
KERNEL_IGNORED_PATTERNS = [
3987
r'.*\.git.*',
40-
r'.*portable.*Xtensa_ESP32\/include\/portmacro\.h',
41-
r'.*portable.*Xtensa_ESP32.*port\.c',
42-
r'.*portable.*Xtensa_ESP32.*portasm\.S',
43-
r'.*portable.*Xtensa_ESP32.*xtensa_.*',
44-
r'.*portable.*Xtensa_ESP32.*portmux_impl.*',
45-
r'.*portable.*Xtensa_ESP32.*xt_asm_utils\.h'
88+
r'.*portable/IAR/AtmelSAM7S64/.*AT91SAM7.*',
89+
r'.*portable/GCC/ARM7_AT91SAM7S/.*',
90+
r'.*portable/MPLAB/PIC18F/stdio.h'
91+
]
92+
93+
KERNEL_THIRD_PARTY_PATTERNS = [
94+
r'.*portable/ThirdParty/GCC/Posix/port*',
95+
r'.*portable/ThirdParty/*',
96+
r'.*portable/IAR/AVR32_UC3/.*',
97+
r'.*portable/GCC/AVR32_UC3/.*',
4698
]
4799

48100
KERNEL_HEADER = [
49101
'/*\n',
50-
' * FreeRTOS Kernel V10.4.3\n',
51-
' * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n',
102+
' * FreeRTOS Kernel <DEVELOPMENT BRANCH>\n',
103+
' * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n',
104+
' *\n',
105+
' * SPDX-License-Identifier: MIT\n',
52106
' *\n',
53107
' * Permission is hereby granted, free of charge, to any person obtaining a copy of\n',
54108
' * this software and associated documentation files (the "Software"), to deal in\n',
@@ -73,16 +127,18 @@
73127
' */\n',
74128
]
75129

76-
77130
def main():
78131
parser = HeaderChecker.configArgParser()
79132
args = parser.parse_args()
80133

81134
# Configure the checks then run
82-
checker = HeaderChecker(KERNEL_HEADER)
83-
checker.ignoreExtension(*KERNEL_IGNORED_EXTENSIONS)
84-
checker.ignorePattern(*KERNEL_IGNORED_PATTERNS)
85-
checker.ignoreFile(*KERNEL_IGNORED_FILES)
135+
checker = HeaderChecker(KERNEL_HEADER,
136+
ignored_files=KERNEL_IGNORED_FILES,
137+
ignored_ext=KERNEL_IGNORED_EXTENSIONS,
138+
ignored_patterns=KERNEL_IGNORED_PATTERNS,
139+
third_party_patterns=KERNEL_THIRD_PARTY_PATTERNS,
140+
py_ext=KERNEL_PY_EXTENSIONS,
141+
asm_ext=KERNEL_ASM_EXTENSIONS)
86142
checker.ignoreFile(os.path.split(__file__)[-1])
87143

88144
rc = checker.processArgs(args)

0 commit comments

Comments
 (0)