]> begriffs open source - freertos/log
freertos
2 years agoDeprecate smp branch (#799)
chinglee-iot [Tue, 3 Oct 2023 16:58:06 +0000 (00:58 +0800)]
Deprecate smp branch (#799)

* Update deprecation message in README.md

2 years agoperformance counting: ulTaskSwitchedInTime and ulTotalRunTime must be (#618)
Hardy Griech [Thu, 2 Feb 2023 22:40:27 +0000 (23:40 +0100)]
performance counting: ulTaskSwitchedInTime and ulTotalRunTime must be (#618)

arrays, index is core number

2 years agoRemove prvSelectHighestPriorityTask call in vTaskSuspend (#610)
chinglee-iot [Tue, 24 Jan 2023 08:25:36 +0000 (16:25 +0800)]
Remove prvSelectHighestPriorityTask call in vTaskSuspend (#610)

* Remove prvSelectHighestPriorityTask call in vTaskSuspend

* Every core starts with an idle task in SMP implementation and
  taskTASK_IS_RUNNING only return ture when the task is idle task before
  scheduler started. So prvSelectHighestPriorityTask won't be called in
  vTaskSuspend before scheduler started.
* Update prvSelectHighestPriorityTask to ensure that this function is
  called only when scheduler started.

* Fix kernel checker error

3 years agoAdd support for retrieving a task's uxCoreAffinityMask with the vTaskGetInfo() API...
Sudeep Mohanty [Wed, 12 Oct 2022 16:32:19 +0000 (18:32 +0200)]
Add support for retrieving a task's uxCoreAffinityMask with the vTaskGetInfo() API (#574)

* Add support for retrieving a task's uxCoreAffinityMask with the vTaskGetInfo() API

This commit adds support for retrieving the task's core affinity mask
when SMP is used for more than 1 cores and configUSE_CORE_AFFINITY is
enabled.

Signed-off-by: Sudeep Mohanty <sudp.mohanty@gmail.com>
* Apply suggestions from code review

Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
Signed-off-by: Sudeep Mohanty <sudp.mohanty@gmail.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
3 years agoRP2040: Fix compiler warning and comment (#509) 539/head
Graham Sanderson [Fri, 24 Jun 2022 11:53:51 +0000 (06:53 -0500)]
RP2040: Fix compiler warning and comment (#509)

Co-authored-by: graham sanderson <graham.sanderson@raspeberryi.com>
3 years agoRemove ThirdParty from core checker in smp branch (#512)
Gaurav-Aggarwal-AWS [Fri, 24 Jun 2022 11:52:15 +0000 (04:52 -0700)]
Remove ThirdParty from core checker in smp branch (#512)

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
3 years agoRP2040: Allow FreeRTOS to be added to the parent CMake project post initialization...
graham sanderson [Sat, 4 Jun 2022 16:16:01 +0000 (11:16 -0500)]
RP2040: Allow FreeRTOS to be added to the parent CMake project post initialization of the Pico SDK

3 years agoUpdate prvYieldCore() compile warning for single core targets (#505)
Sudeep Mohanty [Wed, 22 Jun 2022 04:33:44 +0000 (06:33 +0200)]
Update prvYieldCore() compile warning for single core targets (#505)

When configNUM_CORES is 1, prvYieldCore() generates an array subscript
outofbound error (-Warray-bounds) when compiled with GCC with space
optimization enabled (-Os).

This commit updates the code flow in prvYieldCore() to compile out
the part where yield is needed on the other core which is unnecessary
for single-core targets.

3 years agoFix RP2040 assertion due to yield spin lock info being wrongly shared between multipl...
Graham Sanderson [Thu, 9 Jun 2022 17:59:35 +0000 (12:59 -0500)]
Fix RP2040 assertion due to yield spin lock info being wrongly shared between multiple cores (#501)

Co-authored-by: graham sanderson <graham.sanderson@raspeberryi.com>
3 years agoAdd support for newlib dynamic reentrancy (#496)
Darian [Tue, 31 May 2022 23:11:02 +0000 (07:11 +0800)]
Add support for newlib dynamic reentrancy (#496)

Previously, newlib's _impure_ptr was updated on every context switch
to point to the current task's _reent structure.

However, this behavior is no longer valid on multi-core systems due
to the fact that multiple cores can switch contexts at the same time,
thus leading to the corruption of the _impure_ptr.

However, Newlib can be compiled with __DYNAMIC_REENT__ enabled which
will cause newlib functions to call __getreent() instead in order to
obtain the required reent struct.

This commit adds dynamic reentrancy support to FreeRTOS:

- Added a configNEWLIB_REENTRANT_IS_DYNAMIC to enable dynamic reentrancy support
- _impure_ptr is no longer updated with reentrancy is dynamic
- Port must provide their own __getreent() that returns the current task's reent struct

3 years agoAdd task creation with affinity functions (#470)
Darian [Fri, 18 Mar 2022 17:16:21 +0000 (01:16 +0800)]
Add task creation with affinity functions (#470)

This commit adds the functions listed below. These functions allow
tasks to be created with their core affinity already set.

- xTaskCreateAffinitySet()
- xTaskCreateStaticAffinitySet()
- xTaskCreateRestrictedAffinitySet()
- xTaskCreateRestrictedStaticAffinitySet()

3 years agoFix pxPreviousTCB compile warning (#464)
Darian [Sun, 6 Mar 2022 22:21:39 +0000 (06:21 +0800)]
Fix pxPreviousTCB compile warning (#464)

When compiling with configNUM_CORES == 1 and configUSE_CORE_AFFINITY == 1,
pxPreviousTCB will generate a "set but unused" warning.

4 years agosmp branch: bugfix for race condition on RP2040 (#431)
Timo Sandmann [Tue, 28 Dec 2021 20:30:03 +0000 (21:30 +0100)]
smp branch: bugfix for race condition on RP2040 (#431)

* Bugfix for race condition on RP2040 in vPortEnableInterrupts()

RP2040 SMP port: Since spin_unlock() re-enables interrupts, pxYieldSpinLock has to be updated first to avoid a possible race condition.

* Bugfix for invalid sanity checks on RP2040

RP2040 SMP port: Testing pxYieldSpinLock for NULL does not work reliable in these places, because another/new lock might already be set when configASSERT() is executed.

4 years agoRp2040 fixes smp (#425)
Graham Sanderson [Fri, 17 Dec 2021 23:06:35 +0000 (17:06 -0600)]
Rp2040 fixes smp (#425)

* RP2040: malloc needs to be thread safe for FreeRTOS whether both cores are used or not

* RP2040: CMake file had broken left over test code

4 years agoAdd SMP in the License Header (#402) V202110.00-SMP
Gaurav-Aggarwal-AWS [Thu, 14 Oct 2021 01:38:24 +0000 (18:38 -0700)]
Add SMP in the License Header (#402)

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years agoSMP version (#401)
Gaurav-Aggarwal-AWS [Thu, 14 Oct 2021 01:23:03 +0000 (18:23 -0700)]
SMP version (#401)

* Update version number for SMP

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years agoUpdate SMP docs (#400)
Gaurav-Aggarwal-AWS [Mon, 11 Oct 2021 06:16:16 +0000 (23:16 -0700)]
Update SMP docs (#400)

This commit adds the docs for newly added SMP APIs.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years agoUpdate xSTATIC_TCB layout in line with tskTCB (#375)
N3xed [Mon, 9 Aug 2021 22:14:10 +0000 (00:14 +0200)]
Update xSTATIC_TCB layout in line with tskTCB (#375)

4 years agoMove uxCoreAffinityMask after xMPUSettings (#372)
N3xed [Fri, 30 Jul 2021 06:58:47 +0000 (08:58 +0200)]
Move uxCoreAffinityMask after xMPUSettings (#372)

Allows for much easier assembly access to the field.

4 years agoRp2040 smp (#342)
Graham Sanderson [Tue, 6 Jul 2021 17:53:49 +0000 (12:53 -0500)]
Rp2040 smp (#342)

* Add RP2040 support (#341)

* Add RP2040 support

* remove spurious tab/spaces comments

* add .cmake to ignored kernel checks

* Apply suggestions from code review

Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
* license and end of file newline fixes

* Rename LICENSE.TXT to LICENSE.md

Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
* RP2040 updates for SMP

* whitepsace fix

Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
* whitespace fix

Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
Co-authored-by: Paul Bartell <paul.bartell@gmail.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
4 years agoFix XCore DP/CP register corruption bug (#352)
Michael Bruno [Mon, 28 Jun 2021 15:44:24 +0000 (11:44 -0400)]
Fix XCore DP/CP register corruption bug (#352)

The kernel code that runs within RTOS ISRs requires that DP and CP not
be changed from their initial values. If a task changes them and is
interrupted while they are changed, then they must be restored for the
ISR. This commit implements this.

This relies on a corresponding change to the xcore lib_rtos_support.

4 years agoChange XCC to xClang for XCore ports (#332)
Michael Bruno [Fri, 21 May 2021 21:59:03 +0000 (17:59 -0400)]
Change XCC to xClang for XCore ports (#332)

4 years agofixed CI repo branch (#330)
Joseph Julicher [Thu, 20 May 2021 00:01:54 +0000 (17:01 -0700)]
fixed CI repo branch (#330)

4 years agoadding a minimal idle hook to the SMP port (#329)
Joseph Julicher [Wed, 19 May 2021 23:19:57 +0000 (16:19 -0700)]
adding a minimal idle hook to the SMP port (#329)

* adjusting the kernel checks repo

* Added a minimal idle hook for all idle tasks

4 years agoMerge branch 'smp' into smp
Joseph Julicher [Wed, 19 May 2021 17:10:36 +0000 (10:10 -0700)]
Merge branch 'smp' into smp

4 years agoUpdated from upstream
Joseph Julicher [Wed, 19 May 2021 17:02:49 +0000 (10:02 -0700)]
Updated from upstream

4 years agoStatic allocation and lightweight idle tasks (#323)
Joseph Julicher [Thu, 13 May 2021 22:42:57 +0000 (15:42 -0700)]
Static allocation and lightweight idle tasks (#323)

* added multiple idle tasks

* Added multiple IDLE tasks to non-static allocation

* Adjustments to tasks from PR review

4 years agoUncrustified tasks.c
Joseph Julicher [Wed, 19 May 2021 15:38:58 +0000 (08:38 -0700)]
Uncrustified tasks.c

4 years agoAdjustments to tasks from PR review
Joseph Julicher [Thu, 13 May 2021 00:01:00 +0000 (17:01 -0700)]
Adjustments to tasks from PR review

4 years agoadded multiple idle tasks
Joseph Julicher [Wed, 12 May 2021 19:03:08 +0000 (12:03 -0700)]
added multiple idle tasks

4 years agoStatic allocation and lightweight idle tasks (#323)
Joseph Julicher [Thu, 13 May 2021 22:42:57 +0000 (15:42 -0700)]
Static allocation and lightweight idle tasks (#323)

* added multiple idle tasks

* Added multiple IDLE tasks to non-static allocation

* Adjustments to tasks from PR review

4 years agoremoved extra parameter in TCB structure
Joseph Julicher [Wed, 19 May 2021 16:03:59 +0000 (09:03 -0700)]
removed extra parameter in TCB structure

4 years agomissed taskYield in minimalIDLE task 326/head
Joseph Julicher [Wed, 19 May 2021 15:54:22 +0000 (08:54 -0700)]
missed taskYield in minimalIDLE task

4 years agoUncrustified tasks.c
Joseph Julicher [Wed, 19 May 2021 15:38:58 +0000 (08:38 -0700)]
Uncrustified tasks.c

4 years agoFixed static allocation internal array
Joseph Julicher [Wed, 19 May 2021 02:49:02 +0000 (19:49 -0700)]
Fixed static allocation internal array

4 years agofixed additional bit mask test errors 325/head
Joseph Julicher [Tue, 18 May 2021 22:17:50 +0000 (15:17 -0700)]
fixed additional bit mask test errors

4 years agoFixed bit mask compare bug
Joseph Julicher [Tue, 18 May 2021 22:07:26 +0000 (15:07 -0700)]
Fixed bit mask compare bug

4 years agoconverted exclusion to affinity
Joseph Julicher [Fri, 14 May 2021 00:20:41 +0000 (17:20 -0700)]
converted exclusion to affinity

4 years agoStatic allocation and lightweight idle tasks (#323)
Joseph Julicher [Thu, 13 May 2021 22:42:57 +0000 (15:42 -0700)]
Static allocation and lightweight idle tasks (#323)

* added multiple idle tasks

* Added multiple IDLE tasks to non-static allocation

* Adjustments to tasks from PR review

4 years agoAdjustments to tasks from PR review 323/head
Joseph Julicher [Thu, 13 May 2021 00:01:00 +0000 (17:01 -0700)]
Adjustments to tasks from PR review

4 years agoAdded multiple IDLE tasks to non-static allocation
Joseph Julicher [Wed, 12 May 2021 19:13:44 +0000 (12:13 -0700)]
Added multiple IDLE tasks to non-static allocation

4 years agoadded multiple idle tasks
Joseph Julicher [Wed, 12 May 2021 19:03:08 +0000 (12:03 -0700)]
added multiple idle tasks

4 years agoRemoved Xtensa port from XCC folder
Joseph Julicher [Mon, 22 Mar 2021 17:11:29 +0000 (10:11 -0700)]
Removed Xtensa port from XCC folder

4 years agomoved XMOS ports to thirdparty
Joseph Julicher [Mon, 22 Mar 2021 17:06:22 +0000 (10:06 -0700)]
moved XMOS ports to thirdparty

4 years agoignoring build artifacts
Joseph Julicher [Wed, 17 Mar 2021 15:30:07 +0000 (08:30 -0700)]
ignoring build artifacts

4 years agofixed line endings for stream_buffer
Joseph Julicher [Wed, 17 Mar 2021 15:24:54 +0000 (08:24 -0700)]
fixed line endings for stream_buffer

4 years agoMerge github.com:FreeRTOS/FreeRTOS-Kernel into HEAD
Joseph Julicher [Wed, 17 Mar 2021 15:22:55 +0000 (08:22 -0700)]
Merge github.com:FreeRTOS/FreeRTOS-Kernel into HEAD

4 years agoRun CMock unit tests on each pull request with a github action. (#279)
Paul Bartell [Wed, 17 Mar 2021 01:31:37 +0000 (18:31 -0700)]
Run CMock unit tests on each pull request with a github action. (#279)

Run CMock unit tests on each pull request with a github action.
Include coverage information reported by codecov.io

4 years agoAdded a cmakelists to memmang to facilitate a cmake build
Joseph Julicher [Tue, 16 Mar 2021 23:18:17 +0000 (16:18 -0700)]
Added a cmakelists to memmang to facilitate a cmake build

4 years agoAdded a rough pico support. Remove rtos_prints from task.c
Joseph Julicher [Tue, 16 Mar 2021 23:06:23 +0000 (16:06 -0700)]
Added a rough pico support.  Remove rtos_prints from task.c

4 years agoSMP Documentation (#280)
Joseph Julicher [Tue, 16 Mar 2021 20:57:22 +0000 (13:57 -0700)]
SMP Documentation (#280)

* Add XMOS XCore ports

Some minor modifications are also made to the kernel to support the
XCore compiler's automatic stack size calculation.

* Update kernel to support SMP

The XMOS XCore ports are also updated to support SMP.

* Fix compiler warnings in xcore ports

The port set and clear interrupt mask from ISR macros were removed from
the ports so that the default macros found in FreeRTOS.h are used
instead. The default macros do not result in warnings when they are
used.

* Remove inline function from timers.h

Inline function converted to macro. This should now build when
optimizations are off and inlining is disabled.

* Fix compiler warnings in xcore ports and tasks.c

* fixed documentation for ulTaskNotifyTake() and ulTaskNotifyTakeIndexed()

* spelling fixes for tasks.c

* adding the kernel SMP documentation

Co-authored-by: Michael Bruno <mikeb@xmos.com>
4 years agoImprove comments and assertions in stream buffer (#277)
Ravishankar Bhagavandas [Tue, 16 Mar 2021 01:01:42 +0000 (18:01 -0700)]
Improve comments and assertions in stream buffer (#277)

* Improve comments and assertions in stream buffer

* Add back null check instead of assert

* Adding config assert back

4 years agoFeature: SMP (#278)
Joseph Julicher [Tue, 16 Mar 2021 00:29:08 +0000 (17:29 -0700)]
Feature: SMP (#278)

* Add XMOS XCore ports

Some minor modifications are also made to the kernel to support the
XCore compiler's automatic stack size calculation.

* Update kernel to support SMP

The XMOS XCore ports are also updated to support SMP.

* Fix compiler warnings in xcore ports

The port set and clear interrupt mask from ISR macros were removed from
the ports so that the default macros found in FreeRTOS.h are used
instead. The default macros do not result in warnings when they are
used.

* Remove inline function from timers.h

Inline function converted to macro. This should now build when
optimizations are off and inlining is disabled.

* Fix compiler warnings in xcore ports and tasks.c

* fixed documentation for ulTaskNotifyTake() and ulTaskNotifyTakeIndexed()

* spelling fixes for tasks.c

Co-authored-by: Michael Bruno <mikeb@xmos.com>
4 years agoupdated lexicon for new vocabulary words
Joseph Julicher [Mon, 15 Mar 2021 23:37:07 +0000 (16:37 -0700)]
updated lexicon for new vocabulary words

4 years agoUpdate comment in list.c (#276)
Gaurav-Aggarwal-AWS [Fri, 12 Mar 2021 20:11:19 +0000 (12:11 -0800)]
Update comment in list.c (#276)

The tick interrupt priority must be configured to ensure that it cannot
interrupt a critical section. This change updates the comment to help
the application writer while debugging.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years agoAdd some assertions and coverage exceptions to queue.c (#273)
Paul Bartell [Sat, 6 Mar 2021 02:46:49 +0000 (18:46 -0800)]
Add some assertions and coverage exceptions to queue.c (#273)

* Add an LCOV_BRANCH exception for the check that sizeof( StaticQueue_t ) == sizeof( Queue_t )
* Add LCOV_BRANCH coverage exception for a configASSERT on pxQueueSetContainer with a condition that is unreachable.
* Add configASSERTs to alert when invalid parameters are passed into Queue Registry related functions.
* Assert that the semaphore handle passed into xQueueGetMutexHolder is not NULL.
* Correct some typos in queue.c
* Update lexicon.txt

4 years agoMoved git-secrets check to a different workflow (#271)
xuelix [Fri, 5 Mar 2021 22:00:57 +0000 (22:00 +0000)]
Moved git-secrets check to a different workflow (#271)

git-secrets check is now performed on all PR branches

4 years agoComment: fix code comment for xTaskAbortDelay (#272)
alfred gedeon [Fri, 5 Mar 2021 17:13:03 +0000 (09:13 -0800)]
Comment: fix code comment for xTaskAbortDelay (#272)

4 years agoAdded git-secrets check to Github Actions (#270)
xuelix [Thu, 4 Mar 2021 21:00:22 +0000 (21:00 +0000)]
Added git-secrets check to Github Actions (#270)

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
4 years agofixed documentation for ulTaskNotifyTake() and ulTaskNotifyTakeIndexed() (#269)
Joseph Julicher [Wed, 3 Mar 2021 17:38:12 +0000 (10:38 -0700)]
fixed documentation for ulTaskNotifyTake() and ulTaskNotifyTakeIndexed() (#269)

4 years agoAdd description for vTaskList (#206)
gomonovych [Tue, 2 Mar 2021 01:10:00 +0000 (02:10 +0100)]
Add description for vTaskList (#206)

Describe each column which vTaskList print:
task name, task status, task priority, task stack unused watermark lewel, task number

Co-authored-by: David Chalco <59750547+dachalco@users.noreply.github.com>
4 years agoSupport allocating stack from separate heap (#267)
Gaurav-Aggarwal-AWS [Wed, 24 Feb 2021 02:36:27 +0000 (18:36 -0800)]
Support allocating stack from separate heap (#267)

The change adds support for allocating task stacks from separate heap.
When configSTACK_ALLOCATION_FROM_SEPARATE_HEAP is defined as 1 in
FreeRTOSConfig.h, task stacks are allocated and freed using
pvPortMallocStack and vPortFreeStack functions. This allows the
application writer to provide a separate allocator for task stacks.

When configSTACK_ALLOCATION_FROM_SEPARATE_HEAP is defined as 0, task
stacks are allocated and freed using FreeRTOS heap functions
pvPortMalloc and vPortFree.

For backward compatibility, configSTACK_ALLOCATION_FROM_SEPARATE_HEAP
defaults to 0.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years agoUpdate python version to 3.7.10 (#265)
Carl Lundin [Fri, 19 Feb 2021 02:48:11 +0000 (18:48 -0800)]
Update python version to 3.7.10 (#265)

4 years agoUpdate URL in history.txt (#259)
Jeff Tenney [Mon, 15 Feb 2021 22:00:20 +0000 (15:00 -0700)]
Update URL in history.txt (#259)

* Update URL in history.txt

* Configure CI header checker to ignore .txt files

Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>
4 years agoRemove unmatched braces in MessageBuffer pre tags (#256)
milesfrain [Thu, 11 Feb 2021 05:41:05 +0000 (21:41 -0800)]
Remove unmatched braces in MessageBuffer pre tags (#256)

Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
4 years agoCheck: improve verbosity of url verifier (#260)
alfred gedeon [Thu, 11 Feb 2021 00:04:08 +0000 (16:04 -0800)]
Check: improve verbosity of url verifier (#260)

* Check: improve verbosity of url verifier

* Fix Renesas url

* Fix Renesas url

* URL add Renesas full url

* Fix more Renesas URLs

* Fix Renesas url in IAR directory

* Testing new curl command for url checks

* Fix url_checker

* Fix url_verifier

* Revert Renesas url changes

* add txt to the ignored header checker extentions

4 years agoUpdate issue templates
Cobus van Eeden [Wed, 10 Feb 2021 23:27:16 +0000 (15:27 -0800)]
Update issue templates

4 years agoincorporate updates from common (#255)
David Chalco [Sat, 30 Jan 2021 02:58:55 +0000 (18:58 -0800)]
incorporate updates from common (#255)

* incorporate updates from common

* empty commit to rerun check

4 years agoTypos (#248)
nazar01 [Fri, 29 Jan 2021 20:05:04 +0000 (23:05 +0300)]
Typos (#248)

* Fix typos in FreeRTOS.h

* Fix typos in task.h

* Fix typos in tasks.c

4 years agoDelete gitattributes (#253)
David Chalco [Wed, 27 Jan 2021 17:38:20 +0000 (09:38 -0800)]
Delete gitattributes (#253)

4 years agoFix typo in comment in task.h (#244)
Evgeny Ermakov [Wed, 20 Jan 2021 02:55:34 +0000 (21:55 -0500)]
Fix typo in comment in task.h (#244)

4 years agoFix Github checks after move from master to main (#246)
alfred gedeon [Tue, 19 Jan 2021 23:32:01 +0000 (15:32 -0800)]
Fix Github checks after move from master to main (#246)

4 years agoAdd git attributes (#245)
David Chalco [Fri, 15 Jan 2021 19:04:31 +0000 (11:04 -0800)]
Add git attributes (#245)

* Add .gitattributes configured to normailze line endings to LF

* replace crlf with lf, per .gitattributes

4 years agoPosix: fix build failure (#235)
Thomas Pedersen [Fri, 8 Jan 2021 22:19:15 +0000 (14:19 -0800)]
Posix: fix build failure (#235)

Fixes: a48f137896b9 ("Posix Port: Comment and remove unused variables (#230)")
Authored-by: Thomas Pedersen <thomas@adapt-ip.com>
5 years agoUpdate ESP32 port to ESP-IDF release v4.2 and add ESP-IDF version check (#231)
Shubham Kulkarni [Tue, 22 Dec 2020 21:00:45 +0000 (02:30 +0530)]
Update ESP32 port to ESP-IDF release v4.2 and add ESP-IDF version check (#231)

* Revert "Reintroduce Espressif's IDF v4.2 changes to ESP32 port (#193)"

This reverts commit 3d4d17178fe70621e129ec564494f823ef0253dd.

* Update ESP32 port files to work with ESP-IDF v4.2 as well as ESP-IDF v3.3

Add changes required to support ESP32-S2

* portmacro.h: Change return type of vApplicationSleep to void

This fixes build failure when automatic light sleep is enabled

* prevent header checks for files with different licensing

Co-authored-by: David Chalco <david@chalco.io>
5 years agoupdate version in version checker (#239)
David Chalco [Tue, 22 Dec 2020 20:57:39 +0000 (12:57 -0800)]
update version in version checker (#239)

5 years agoAutoRelease + Header Checker Upgrades (#236)
David Chalco [Tue, 22 Dec 2020 18:06:59 +0000 (10:06 -0800)]
AutoRelease + Header Checker Upgrades (#236)

* decouple kernel check configs from fr/fr + checker sources from PR ref

* Combo of various small edits

* enable compatibility with git action + create autorelease action

5 years agoAlign the TF-M version of the integration with kernel to version TF-Mv1.2.0 (#228)
sherryzhang [Tue, 15 Dec 2020 17:17:20 +0000 (01:17 +0800)]
Align the TF-M version of the integration with kernel to version TF-Mv1.2.0 (#228)

Change-Id: I6d5f0732f4cb123df54b9df0b9820ef4dcf70fa4
Signed-off-by: Sherry Zhang <sherry.zhang2@arm.com>
5 years agoUpdate History.txt V10.4.3
Cobus van Eeden [Tue, 15 Dec 2020 15:18:49 +0000 (07:18 -0800)]
Update History.txt

5 years agoUpdated History.txt for V10.4.3 (#233)
Joseph Julicher [Tue, 15 Dec 2020 14:51:11 +0000 (07:51 -0700)]
Updated History.txt for V10.4.3 (#233)

5 years ago[AUTO][RELEASE]: Bump task.h version macros to "10.4.3"
Cobus van Eeden [Mon, 14 Dec 2020 18:13:41 +0000 (10:13 -0800)]
[AUTO][RELEASE]: Bump task.h version macros to "10.4.3"

5 years ago[AUTO][RELEASE]: Bump file header version to "10.4.3"
Cobus van Eeden [Mon, 14 Dec 2020 18:13:39 +0000 (10:13 -0800)]
[AUTO][RELEASE]: Bump file header version to "10.4.3"

5 years agoUpdated History.txt for V10.4.3 (#232)
Joseph Julicher [Mon, 14 Dec 2020 18:10:55 +0000 (11:10 -0700)]
Updated History.txt for V10.4.3 (#232)

5 years agoPosix Port: Comment and remove unused variables (#230)
alfred gedeon [Mon, 14 Dec 2020 01:33:45 +0000 (17:33 -0800)]
Posix Port: Comment and remove unused variables (#230)

* Posix Port: Comment and remove unused variables
* Fix header, replace tabs with spaces

5 years agoadd assert for addition overflow on queue creation (#225)
Cobus van Eeden [Mon, 7 Dec 2020 19:48:51 +0000 (11:48 -0800)]
add assert for addition overflow on queue creation (#225)

5 years agoAdd addition overflow check for stream buffer (#226)
Cobus van Eeden [Mon, 7 Dec 2020 19:07:31 +0000 (11:07 -0800)]
Add addition overflow check for stream buffer (#226)

5 years agoImprove heap2 bounds checking (#224)
Cobus van Eeden [Mon, 7 Dec 2020 18:36:27 +0000 (10:36 -0800)]
Improve heap2 bounds checking (#224)

* Improve heap bounds checking in pvPortMalloc

5 years agoPrevent unprivileged task from altering MPU configuration (#227)
Gaurav-Aggarwal-AWS [Mon, 7 Dec 2020 17:53:22 +0000 (09:53 -0800)]
Prevent unprivileged task from altering MPU configuration (#227)

This change removes the FreeRTOS System Calls (aka MPU wrappers) for the
following kernel APIs:
- xTaskCreateRestricted
- xTaskCreateRestrictedStatic
- vTaskAllocateMPURegions

A system call allows an unprivileged task to execute a kernel API which
is otherwise accessible to privileged software only. The above 3 APIs
can create a new task with a different MPU configuration or alter the
MPU configuration of an existing task. This an be (mis)used by an
unprivileged task to grant itself access to a region which it does not
have access to.

Removing the system calls for these APIs ensures that an unprivileged
task cannot execute this APIs. If an unprivileged task attempts to
execute any of these API, it will result in a Memory Fault.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
5 years agoUpdate branch of c-sdk repo to main (#223)
Gaurav-Aggarwal-AWS [Wed, 2 Dec 2020 22:12:16 +0000 (14:12 -0800)]
Update branch of c-sdk repo to main (#223)

Also add missing apostrophe to stdint.readme

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
5 years agoAdd kernel header check workflow (#219)
David Chalco [Tue, 17 Nov 2020 23:40:10 +0000 (15:40 -0800)]
Add kernel header check workflow (#219)

5 years ago[AUTO][RELEASE]: Bump task.h version macros to "10.4.2" V10.4.2
David Chalco [Tue, 10 Nov 2020 22:42:58 +0000 (14:42 -0800)]
[AUTO][RELEASE]: Bump task.h version macros to "10.4.2"

5 years ago[AUTO][RELEASE]: Bump file header version to "10.4.2"
David Chalco [Tue, 10 Nov 2020 22:42:58 +0000 (14:42 -0800)]
[AUTO][RELEASE]: Bump file header version to "10.4.2"

5 years agoUpdate release date (#217)
David Chalco [Mon, 9 Nov 2020 23:46:02 +0000 (15:46 -0800)]
Update release date (#217)

5 years agoUpdate History.txt for 10.4.2 (#216)
David Chalco [Mon, 9 Nov 2020 16:37:54 +0000 (08:37 -0800)]
Update History.txt for 10.4.2 (#216)

* Update History.txt for 10.4.2

* Update History.txt

Co-authored-by: RichardBarry <3073890+RichardBarry@users.noreply.github.com>
5 years agoEnsure interrupts are enabled at first task start (#214)
Gaurav-Aggarwal-AWS [Thu, 5 Nov 2020 17:26:56 +0000 (09:26 -0800)]
Ensure interrupts are enabled at first task start (#214)

Critical sections in FreeRTOS are implemented using the following two
functions:

void vPortEnterCritical( void )
{
    portDISABLE_INTERRUPTS();
    uxCriticalNesting++;
}

void vPortExitCritical( void )
{
    uxCriticalNesting--;

    if( uxCriticalNesting == 0 )
    {
        portENABLE_INTERRUPTS();
    }
}

uxCriticalNesting is initialized to a large value at the start and set
to zero when the scheduler is started (xPortStartScheduler). As a
result, before the scheduler is started, a pair of enter/exit critical
section will leave the interrupts disabled because uxCriticalNesting
will not reach zero in the vPortExitCritical function. This is done to
ensure that the interrupts remain disabled from the time first FreeRTOS
API is called to the time when the scheduler is started. The scheduler
starting code is expected to enure that interrupts are enabled before
the first task starts executing.

Cortex-M33 ports were not enabling interrupts before starting the first
task and as a result, the first task was started with interrupts
disabled. This PR fixes the issue by ensuring that interrupts are
enabled before the first task is started.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
5 years agoporthardware.h file update for AVR Mega0 and Dx (#212)
filipgeorge [Tue, 27 Oct 2020 19:26:52 +0000 (21:26 +0200)]
porthardware.h file update for AVR Mega0 and Dx (#212)

* Added guard for ioavr.h include in AVR Dx porthardware.h file.
* Added guard for ioavr.h include in AVR Mega0 porthardware.h file.

5 years agoUpstream stack masking fix to GCC ports. (#210)
Carl Lundin [Tue, 27 Oct 2020 18:32:09 +0000 (11:32 -0700)]
Upstream stack masking fix to GCC ports. (#210)

Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
5 years agoupdate interrupt vector names for ATMega32 (#196)
Jon Snow [Mon, 26 Oct 2020 20:31:15 +0000 (16:31 -0400)]
update interrupt vector names for ATMega32 (#196)

5 years agoAdded CODEOWNERS file (#209)
Cobus van Eeden [Mon, 26 Oct 2020 20:24:55 +0000 (13:24 -0700)]
Added CODEOWNERS file (#209)

5 years agoXtensa: fix the coproc_area incorrect issue (#117)
magicse7en [Mon, 26 Oct 2020 18:47:21 +0000 (02:47 +0800)]
Xtensa: fix the coproc_area incorrect issue (#117)

* Xtensa: fix the coproc_area incorrect issue

foss-xtensa/amazon-freertos#2 mentioned a issue:
1.
In function pxPortInitialiseStack(StackType_t *pxTopOfStack....)
p = (uint32_t *)(((uint32_t) pxTopOfStack - XT_CP_SIZE) & ~0xf);

In function prvInitialiseNewTask (file: task.c)
pxTopOfStack = (pxStack + (ulStackDepth - 1)) & (~portBYTE_ALIGNMENT_MASK)

So the co-processor area is at
p = (uint32_t *)(((uint32_t)((pxStack + (ulStackDepth - 1)) & (~portBYTE_ALIGNMENT_MASK)) - XT_CP_SIZE) & ~0xf);

2.
In function vPortStoreTaskMPUSettings( .... , StackType_t pxBottomOfStack ...)
xMPUSettings->coproc_area = (StackType_t)((((uint32_t)(pxBottomOfStack + usStackDepth - 1)) - XT_CP_SIZE) & ~0xf);

pxBottomOfStack = pxStack

=> xMPUSettings->coproc_area = (StackType_t*)((((uint32_t)(pxStack+ ulStackDepth - 1)) - XT_CP_SIZE ) & ~0xf);

The p is coproc_area that should be equal to xMPUSettings->coproc_area.

For example, assume pxStack is 0xa0000000, ulStackDepth is 0x2000,
portBYTE_ALIGNMENT_MASK is 0x7f, XT_CP_SIZE is 0x100.

The p = (uint32_t)(((uint32_t)((pxStack + (ulStackDepth - 1)) & (~portBYTE_ALIGNMENT_MASK)) - XT_CP_SIZE) & ~0xf)
      = 0xa0001e80
The xMPUSettings->coproc_area = (StackType_t)((((uint32_t)(pxStack+ usStackDepth - 1)) - XT_CP_SIZE ) & ~0xf)
                              = 0xa0001ef0
Obviously, the p is not equal to the xMPUSettings->coproc_area, which will cause context switching error.

Signed-off-by: magicse7en <magicse7en@outlook.com>
* Update port.c

Co-authored-by: Carl Lundin <53273776+lundinc2@users.noreply.github.com>