Skip to content

Commit 3f44440

Browse files
authored
Merge branch 'main' into atomic-msgbuf
2 parents 3222f6f + 086d52f commit 3f44440

File tree

14 files changed

+1460
-1337
lines changed

14 files changed

+1460
-1337
lines changed

.github/lexicon.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1529,6 +1529,7 @@ prvinitialisenewstreambuffer
15291529
prvinitialisenewtimer
15301530
prvinsertblockintofreelist
15311531
prvlockqueue
1532+
prvnotifyqueuesetcontainer
15321533
prvportmalloc
15331534
prvportresetpic
15341535
prvprocesssimulatedinterrupts
@@ -1617,6 +1618,7 @@ pvowner
16171618
pvparameter
16181619
pvparameters
16191620
pvportmalloc
1621+
pvportmallocstack
16201622
pvportrealloc
16211623
pvreg
16221624
pvrxdata
@@ -1630,7 +1632,6 @@ pvyieldevent
16301632
pwdtc
16311633
pwm
16321634
pwmc
1633-
pxtaskcode
16341635
pxblock
16351636
pxblocktoinsert
16361637
pxcallbackfunction
@@ -1687,6 +1688,7 @@ pxprevious
16871688
pxpreviouswaketime
16881689
pxqueue
16891690
pxqueuebuffer
1691+
pxqueuesetcontainer
16901692
pxramstack
16911693
pxreadycoroutinelists
16921694
pxreadytaskslists
@@ -1706,6 +1708,7 @@ pxstreambuffercreatestatic
17061708
pxtagvalue
17071709
pxtask
17081710
pxtaskbuffer
1711+
pxtaskcode
17091712
pxtaskdefinition
17101713
pxtaskstatus
17111714
pxtaskstatusarray
@@ -2652,7 +2655,6 @@ wu
26522655
www
26532656
wwwfreertos
26542657
wxr
2655-
xtasktodelete
26562658
xa
26572659
xaa
26582660
xaaaa
@@ -3019,6 +3021,7 @@ xtaskswaitingforbits
30193021
xtaskswaitingtermination
30203022
xtaskswaitingtoreceive
30213023
xtaskswaitingtosend
3024+
xtasktodelete
30223025
xtasktonotify
30233026
xtasktoquery
30243027
xtasktoresume

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,4 @@ jobs:
4444
- name: URL Checker
4545
run: |
4646
bash kernel/.github/actions/url_verifier.sh kernel
47+

.github/workflows/git-secrets.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: git-secrets Check
2+
on:
3+
push:
4+
pull_request:
5+
workflow_dispatch:
6+
jobs:
7+
git-secrets:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
with:
12+
submodules: recursive
13+
- name: Checkout awslabs/git-secrets
14+
uses: actions/checkout@v2
15+
with:
16+
repository: awslabs/git-secrets
17+
ref: master
18+
path: git-secrets
19+
- name: Install git-secrets
20+
run: cd git-secrets && sudo make install && cd ..
21+
- name: Run git-secrets
22+
run: |
23+
git-secrets --register-aws
24+
git-secrets --scan

.github/workflows/unit-tests.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CMock Unit Tests
2+
on: [push]
3+
4+
jobs:
5+
run:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout Parent Repo
9+
uses: actions/checkout@v2
10+
with:
11+
ref: master
12+
repository: FreeRTOS/FreeRTOS
13+
submodules: 'recursive'
14+
fetch-depth: 1
15+
- name: Clone This Repo
16+
uses: actions/checkout@v2
17+
with:
18+
path: ./FreeRTOS/Source
19+
20+
- name: Setup Python
21+
uses: actions/setup-python@master
22+
with:
23+
python-version: 3.8
24+
25+
- name: Install packages
26+
run: |
27+
sudo apt-get install lcov cflow ruby doxygen build-essential
28+
- name: Run Unit Tests with ENABLE_SANITIZER=1
29+
run: |
30+
make -C FreeRTOS/Test/CMock clean
31+
make -C FreeRTOS/Test/CMock ENABLE_SANITIZER=1 run_col_formatted
32+
- name: Run Unit Tests for coverage
33+
run: |
34+
make -C FreeRTOS/Test/CMock clean
35+
make -C FreeRTOS/Test/CMock lcovhtml
36+
lcov --config-file FreeRTOS/Test/CMock/lcovrc --summary FreeRTOS/Test/CMock/build/cmock_test.info > FreeRTOS/Test/CMock/build/cmock_test_summary.txt
37+
- name: Upload coverage to Codecov
38+
uses: codecov/codecov-action@v1
39+
with:
40+
files: FreeRTOS/Test/CMock/build/cmock_test.info
41+
working-directory: .
42+
root_dir: FreeRTOS/Source
43+
flags: unittests
44+
fail_ci_if_error: false
45+
path_to_write_report: coverage/codecov_report.txt
46+
verbose: false
47+
- name: Archive code coverage data
48+
uses: actions/upload-artifact@v2
49+
with:
50+
name: coverage-data
51+
path: FreeRTOS/Test/CMock/build/cmock_test*
52+
- name: Archive code coverage html report
53+
uses: actions/upload-artifact@v2
54+
with:
55+
name: coverage-report
56+
path: FreeRTOS/Test/CMock/build/coverage

include/FreeRTOS.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,11 @@
896896
#define configSUPPORT_DYNAMIC_ALLOCATION 1
897897
#endif
898898

899+
#ifndef configSTACK_ALLOCATION_FROM_SEPARATE_HEAP
900+
/* Defaults to 0 for backward compatibility. */
901+
#define configSTACK_ALLOCATION_FROM_SEPARATE_HEAP 0
902+
#endif
903+
899904
#ifndef configSTACK_DEPTH_TYPE
900905

901906
/* Defaults to uint16_t for backward compatibility, but can be overridden
@@ -1054,6 +1059,11 @@
10541059
#define configRUN_FREERTOS_SECURE_ONLY 0
10551060
#endif
10561061

1062+
#ifndef configRUN_ADDITIONAL_TESTS
1063+
#define configRUN_ADDITIONAL_TESTS 0
1064+
#endif
1065+
1066+
10571067
/* Sometimes the FreeRTOSConfig.h settings only allow a task to be created using
10581068
* dynamically allocated RAM, in which case when any task is deleted it is known
10591069
* that both the task's stack and TCB need to be freed. Sometimes the

include/mpu_wrappers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
/* This file redefines API functions to be called through a wrapper macro, but
3131
* only for ports that are using the MPU. */
32-
#ifdef portUSING_MPU_WRAPPERS
32+
#if ( portUSING_MPU_WRAPPERS == 1 )
3333

3434
/* MPU_WRAPPERS_INCLUDED_FROM_API_FILE will be defined when this file is
3535
* included from queue.c or task.c to prevent it from having an effect within

include/portable.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,14 @@ void vPortInitialiseBlocks( void ) PRIVILEGED_FUNCTION;
179179
size_t xPortGetFreeHeapSize( void ) PRIVILEGED_FUNCTION;
180180
size_t xPortGetMinimumEverFreeHeapSize( void ) PRIVILEGED_FUNCTION;
181181

182+
#if( configSTACK_ALLOCATION_FROM_SEPARATE_HEAP == 1 )
183+
void *pvPortMallocStack( size_t xSize ) PRIVILEGED_FUNCTION;
184+
void vPortFreeStack( void *pv ) PRIVILEGED_FUNCTION;
185+
#else
186+
#define pvPortMallocStack pvPortMalloc
187+
#define vPortFreeStack vPortFree
188+
#endif
189+
182190
/*
183191
* Setup the hardware ready for the scheduler to take control. This generally
184192
* sets up a tick interrupt and sets timers for the correct tick frequency.

include/task.h

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1795,8 +1795,10 @@ UBaseType_t uxTaskGetSystemState( TaskStatus_t * const pxTaskStatusArray,
17951795
* demo applications. Do not consider it to be part of the scheduler.
17961796
*
17971797
* vTaskList() calls uxTaskGetSystemState(), then formats part of the
1798-
* uxTaskGetSystemState() output into a human readable table that displays task
1799-
* names, states and stack usage.
1798+
* uxTaskGetSystemState() output into a human readable table that displays task:
1799+
* names, states, priority, stack usage and task number.
1800+
* Stack usage specified as the number of unused StackType_t words stack can hold
1801+
* on top of stack - not the number of bytes.
18001802
*
18011803
* vTaskList() has a dependency on the sprintf() C library function that might
18021804
* bloat the code size, use a lot of stack, and provide different results on
@@ -1932,9 +1934,8 @@ uint32_t ulTaskGetIdleRunTimeCounter( void ) PRIVILEGED_FUNCTION;
19321934
* that way task notifications can be used to send data to a task, or be used as
19331935
* light weight and fast binary or counting semaphores.
19341936
*
1935-
* A task can use xTaskNotifyWaitIndexed() to [optionally] block to wait for a
1936-
* notification to be pending, or ulTaskNotifyTakeIndexed() to [optionally] block
1937-
* to wait for a notification value to have a non-zero value. The task does
1937+
* A task can use xTaskNotifyWaitIndexed() or ulTaskNotifyTakeIndexed() to
1938+
* [optionally] block to wait for a notification to be pending. The task does
19381939
* not consume any CPU time while it is in the Blocked state.
19391940
*
19401941
* A notification sent to a task will remain pending until it is cleared by the
@@ -2520,8 +2521,8 @@ void vTaskGenericNotifyGiveFromISR( TaskHandle_t xTaskToNotify,
25202521
* value acts like a counting semaphore.
25212522
*
25222523
* A task can use ulTaskNotifyTakeIndexed() to [optionally] block to wait for
2523-
* the task's notification value to be non-zero. The task does not consume any
2524-
* CPU time while it is in the Blocked state.
2524+
* a notification. The task does not consume any CPU time while it is in the
2525+
* Blocked state.
25252526
*
25262527
* Where as xTaskNotifyWaitIndexed() will return when a notification is pending,
25272528
* ulTaskNotifyTakeIndexed() will return when the task's notification value is

list.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ void vListInsert( List_t * const pxList,
158158
* 4) Using a queue or semaphore before it has been initialised or
159159
* before the scheduler has been started (are interrupts firing
160160
* before vTaskStartScheduler() has been called?).
161+
* 5) If the FreeRTOS port supports interrupt nesting then ensure that
162+
* the priority of the tick interrupt is at or below
163+
* configMAX_SYSCALL_INTERRUPT_PRIORITY.
161164
**********************************************************************/
162165

163166
for( pxIterator = ( ListItem_t * ) &( pxList->xListEnd ); pxIterator->pxNext->xItemValue <= xValueOfInsertion; pxIterator = pxIterator->pxNext ) /*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. *//*lint !e440 The iterator moves to a different value, not xValueOfInsertion. */

portable/GCC/ATMega323/portmacro.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
* https://www.FreeRTOS.org
2323
* https://github.com/FreeRTOS
2424
*
25-
* 1 tab == 4 spaces!
2625
*/
2726

2827
/*
@@ -58,6 +57,8 @@ extern "C" {
5857
#define portSTACK_TYPE uint8_t
5958
#define portBASE_TYPE char
6059

60+
#define portPOINTER_SIZE_TYPE uint16_t
61+
6162
typedef portSTACK_TYPE StackType_t;
6263
typedef signed char BaseType_t;
6364
typedef unsigned char UBaseType_t;

0 commit comments

Comments
 (0)