]> begriffs open source - freertos/log
freertos
3 years agoClean some spell check words. (#439)
Jon Enz [Fri, 7 Jan 2022 18:45:58 +0000 (10:45 -0800)]
Clean some spell check words. (#439)

3 years agoFeature: Add task top/end of stack to task info report (#436)
Joseph Julicher [Thu, 6 Jan 2022 19:03:56 +0000 (12:03 -0700)]
Feature: Add task top/end of stack to task info report (#436)

uncrustify

Co-authored-by: Shreyas Balakrishna <shreyasbharath@users.noreply.github.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
3 years agoAdd a cap to the queue locks (#435)
Gaurav-Aggarwal-AWS [Thu, 6 Jan 2022 05:14:01 +0000 (21:14 -0800)]
Add a cap to the queue locks (#435)

Add a cap to the queue locks

cRxLock and cTxLock members of the queue data structure count the
number items received and sent to the queue while the queue was locked.
These are later used to unblock tasks waiting on the queue when the
queue is unlocked. The data type of these members is int8_t and this can
trigger overflow check assert if an ISR continuously reads/writes to the
queue in a loop as reported in this issue: https://github.com/FreeRTOS/FreeRTOS-Kernel/issues/419.

Note due to the length of the operation is it not recommended to write to
the queue that many times from an ISR - stream buffers are a better option,
or alternatively, defer the operation to a task by just having the ISR send a
direct to task notification to unblock the task.

This PR caps the values of the cRxLock and cTxLock to the number of tasks in
the system because we cannot unblocks more tasks than there are in the system.
Note that the same assert could still be triggered is the application creates more
than 127 tasks.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
3 years agoAdd a Known Issues file in the Third Party folder (#434)
Gaurav-Aggarwal-AWS [Mon, 3 Jan 2022 21:26:43 +0000 (13:26 -0800)]
Add a Known Issues file in the Third Party folder (#434)

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years agofix alignment exception for ullPortInterruptNesting. (#317)
Amit Tomar [Wed, 29 Dec 2021 20:53:10 +0000 (02:23 +0530)]
fix alignment exception for ullPortInterruptNesting. (#317)

* fix alignment exception for ullPortInterruptNesting.

While loading (LDR X5, ullPortInterruptNestingConst) the ullPortInterruptNesting
variable, the program control seems to be stuck and there is no abort or stack
trace observed (as there is no exception handler is installed to catch unaligned
access exception).

Program control moves forward, if one just declares this varible to be 2 bytes
aligned but then varible is not updated properly.

One of my colleague, pointed out that issue is due to the fact that
ullPortInterruptNesting must be at 8 bytes aligned address but since
"vApplicationIRQHandler" (that has 4 bytes of address) is sitting between
two 8 bytes aligned addresses that forces ullPortInterruptNesting to be at
4 byte aligned address, causing all sort of mess.

It works on QEMU (on ARM64) as it is, since there is no such check for
unaligned access but on real hardware it is prohibited.

Workaround to this problem is, either we skip 4 byets (using .align 4) after
vApplicationIRQHandler declaration or declare it the end of all declarations.
This commit does the latter one.

Signed-off-by: Amit Singh Tomar <atomar25opensource@gmail.com>
* Update portASM.S

Remove 1 tab = 4 spaces

Co-authored-by: Amit Singh Tomar <atomar25opensource@gmail.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>
Co-authored-by: Joseph Julicher <jjulicher@mac.com>
4 years agofixed deadlock in event groups when a mutex is used for memory allocation (#284)
clemenskresser [Wed, 29 Dec 2021 16:58:24 +0000 (17:58 +0100)]
fixed deadlock in event groups when a mutex is used for memory allocation (#284)

Co-authored-by: Clemens Kresser <clemens.kresser@gmail.com>
Co-authored-by: Joseph Julicher <jjulicher@mac.com>
4 years agoDocumentation update for xEventGroupClearBitsFromISR (#432)
Joseph Julicher [Tue, 28 Dec 2021 21:20:33 +0000 (14:20 -0700)]
Documentation update for xEventGroupClearBitsFromISR (#432)

* Documented the correct use of xEventGroupClearBitsFromISR

* removed typo

4 years agoRISC-V: No #error on RV64 regarding byte alignment (#367)
Fabian [Tue, 28 Dec 2021 19:52:33 +0000 (20:52 +0100)]
RISC-V: No #error on RV64 regarding byte alignment (#367)

Co-authored-by: Joseph Julicher <jjulicher@mac.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
4 years agoFix: Interrut Handler Register Function and Exception Process (#41)
leona [Tue, 28 Dec 2021 17:54:23 +0000 (02:54 +0900)]
Fix: Interrut Handler Register Function and Exception Process (#41)

Signed-off-by: shiode <shiode@aptpod.co.jp>
Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
Co-authored-by: David Chalco <59750547+dachalco@users.noreply.github.com>
Co-authored-by: Joseph Julicher <jjulicher@mac.com>
4 years agouxAutoReload replaced with xAutoReload to improve MISRA compliance (#429)
Joseph Julicher [Mon, 27 Dec 2021 18:36:59 +0000 (11:36 -0700)]
uxAutoReload replaced with xAutoReload to improve MISRA compliance (#429)

* Created xTimerGetReloadMode and uxTimerGetReloadMode.

* Changed the use of uxAutoReload to xAutoReload

* updated history.txt

* Update History.txt

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

Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
* Added xTimerGetReloadMode to lexicon.txt

* uncrustified timers.c

* Fix formatting check

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years agoUpdate third party ports readme (#428)
Gaurav-Aggarwal-AWS [Tue, 21 Dec 2021 22:10:06 +0000 (14:10 -0800)]
Update third party ports readme (#428)

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years agoRP2040 fixes (#424)
Graham Sanderson [Tue, 21 Dec 2021 19:08:41 +0000 (13:08 -0600)]
RP2040 fixes (#424)

* 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

* RP2040: portIS_FREE_RTOS_CORE() returned an incorrect value prior to scheduler init when the application was compiled without multicore support

* RP2040: Bad initialization code was causing IRQs to get disabled before main() was called when using non static allocation

4 years agoRemove tickless idle mode dependency with include v task suspend (#422)
Pramith K V [Wed, 8 Dec 2021 23:47:07 +0000 (05:17 +0530)]
Remove tickless idle mode dependency with include v task suspend (#422)

* Fix Remove tickless idle feature dependency with INCLUDE_vTaskSuspend
* fix unused variable warning
* Fix CI fomatting check

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Authored-by: pramithkv <pramit@lifesignals.com>
4 years agoFix #415: Compiling tasks.c with configSUPPORT_DYNAMIC_ALLOCATION = 0 (#416)
R. Dunbar Poor [Thu, 18 Nov 2021 22:38:41 +0000 (14:38 -0800)]
Fix #415: Compiling tasks.c with configSUPPORT_DYNAMIC_ALLOCATION = 0 (#416)

* Fix #415: Compiling tasks.c with configSUPPORT_DYNAMIC_ALLOCATION = 0

4 years agoSimplify prvInitialiseNewTask() (#417)
RichardBarry [Thu, 18 Nov 2021 22:22:02 +0000 (14:22 -0800)]
Simplify prvInitialiseNewTask() (#417)

Memset newly allocated TCB structures to zero, and remove code
that set individual structure members to zero.

4 years agoFix keil compilation error (#418)
RichardBarry [Thu, 18 Nov 2021 19:04:57 +0000 (11:04 -0800)]
Fix keil compilation error (#418)

* Fix compilation error when using the Keil tools with the Keil compiler.

4 years agoFix formatting error
Gaurav Aggarwal [Fri, 12 Nov 2021 23:23:07 +0000 (23:23 +0000)]
Fix formatting error

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years agoAdd option to disable unprivileged critical sections
Gaurav Aggarwal [Thu, 7 Oct 2021 02:00:39 +0000 (19:00 -0700)]
Add option to disable unprivileged critical sections

This commit introduces a new config
configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS which enables developers to
prevent critical sections from unprivileged tasks. It defaults to 1 for
backward compatibility. Application should set it to 0 to disable
critical sections from unprivileged tasks.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years agoChange xPortRaisePrivilege and vPortResetPrivilege to macros
Gaurav Aggarwal [Thu, 7 Oct 2021 01:56:51 +0000 (18:56 -0700)]
Change xPortRaisePrivilege and vPortResetPrivilege to macros

This prevents non-kernel code from calling these functions.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years agoFix code example in timers.h (#412)
Gaurav-Aggarwal-AWS [Fri, 12 Nov 2021 18:36:49 +0000 (10:36 -0800)]
Fix code example in timers.h (#412)

The example was trying to create a timer with period 0 which is not a
valid period.

This was reported here - https://forums.freertos.org/t/multiple-timers/13884

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years agobugfix: Initialize uxTaskNumber at task initialization (#374)
Laukik Hase [Thu, 11 Nov 2021 22:17:21 +0000 (03:47 +0530)]
bugfix: Initialize uxTaskNumber at task initialization (#374)

* bugfix: Initialize uxTaskNumber at task initialization

4 years agoMention portMAX_DELAY in xEventGroupWaitBits docs (#411)
Tobias Nießen [Thu, 11 Nov 2021 01:39:01 +0000 (02:39 +0100)]
Mention portMAX_DELAY in xEventGroupWaitBits docs (#411)

The public function xEventGroupWaitBits passes xTicksToWait to the
function vTaskPlaceOnUnorderedEventList, which passes the number of
ticks to prvAddCurrentTaskToDelayedList and sets xCanBlockIndefinitely
to pdTRUE, causing the latter to block indefinitely if
xTicksToWait == portMAX_DELAY and INCLUDE_vTaskSuspend == 1.

4 years agoBuild with -Wmissing-prototypes flags vPortYieldFromISR() in the Posix port. (#409)
Kevin Thibedeau [Mon, 8 Nov 2021 21:51:25 +0000 (16:51 -0500)]
Build with -Wmissing-prototypes flags vPortYieldFromISR() in the Posix port. (#409)

There's already a portYIELD_FROM_ISR() macro that calls vPortYield() which wraps the FromISR code.
It doesn't appear that vPortYieldFromISR() is intended to be publicly accessible in this port so
I've marked it as private to silence the warning.

event_create() also got flagged due to missing void in prototype.

Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
4 years agoChange hyphen to ASCII character (#410)
Gaurav-Aggarwal-AWS [Mon, 8 Nov 2021 19:11:11 +0000 (11:11 -0800)]
Change hyphen to ASCII character (#410)

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years agoChange taskYIELD_FROM_ISR to portYIELD_FROM_ISR in docs (#408)
Gaurav-Aggarwal-AWS [Fri, 5 Nov 2021 21:33:15 +0000 (14:33 -0700)]
Change taskYIELD_FROM_ISR to portYIELD_FROM_ISR in docs (#408)

4 years agoFix documentation mistake (#407)
prplz [Fri, 5 Nov 2021 17:55:17 +0000 (04:55 +1100)]
Fix documentation mistake (#407)

ulTaskNotification -> ulTaskNotify

4 years agobugfix: Initialise stack correctly on dsPIC port (#405)
andrewtjs [Mon, 1 Nov 2021 19:38:37 +0000 (03:38 +0800)]
bugfix: Initialise stack correctly on dsPIC port (#405)

* Use compiler predefined constants.

Use of MPLAB_DSPIC_PORT is deprecated.

4 years agoFix prvWriteMessageToBuffer on big endian (#391)
Archit Gupta [Sat, 16 Oct 2021 23:36:44 +0000 (16:36 -0700)]
Fix prvWriteMessageToBuffer on big endian (#391)

prvWriteMessageToBuffer wrote the first sbBYTES_TO_STORE_MESSAGE_LENGTH
bytes of the size_t-typed length to the buffer as the data length. While
this functions on little endian, it copies the wrong bytes on big
endian. This fix converts the length to configMESSAGE_BUFFER_LENGTH_TYPE
first, and then copies the exact amount, thus fixing the issue.
Additionally it adds an assert to verify the size is not greater than
the max value of configMESSAGE_BUFFER_LENGTH_TYPE; previously this would
truncate silently.

Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
4 years agoUpdate comments for the ARM_CA53_64_BIT_SRE port (#403)
Gaurav-Aggarwal-AWS [Sat, 16 Oct 2021 20:45:03 +0000 (13:45 -0700)]
Update comments for the ARM_CA53_64_BIT_SRE port (#403)

Mention that FreeRTOS_IRQ_Handler should not be used for FIQs and the
reason for assuming Group 1 for Interrupt Acknowledge and End Of
Interrupt registers.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years agoHandle interrupt acknowledge register in Cortex-A53 SRE port (#392)
Stephane Viau [Fri, 15 Oct 2021 16:21:56 +0000 (18:21 +0200)]
Handle interrupt acknowledge register in Cortex-A53 SRE port (#392)

Let the FreeRTOS IRQ handler properly store and restore the ICCIAR
register value around the vApplicationIRQHandler() call.

Signed-off-by: Stephane Viau <stephane.viau@oss.nxp.com>
Co-authored-by: Stephane Viau <stephane.viau@oss.nxp.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
4 years agofix typo (#399)
swaldhoer [Wed, 6 Oct 2021 22:32:07 +0000 (00:32 +0200)]
fix typo (#399)

4 years agoFix the defect that Heap_1.c may waste first portBYTE_ALIGNMENT bytes of ucHeap[...
Qikai [Mon, 4 Oct 2021 18:15:00 +0000 (02:15 +0800)]
Fix the defect that Heap_1.c may waste first portBYTE_ALIGNMENT bytes of ucHeap[] (#238)

* Fix the defect that Heap_1.c may waste first 8 bytes of ucHeap[]

* Fix the same byte waste issue in heap_2

4 years agoFix typo in comment (#398)
Andres O. Vela [Thu, 30 Sep 2021 17:18:47 +0000 (19:18 +0200)]
Fix typo in comment (#398)

4 years agoXtensa_ESP32: Add definition for portMEMORY_BARRIER (#395)
Shubham Kulkarni [Thu, 16 Sep 2021 21:16:22 +0000 (02:46 +0530)]
Xtensa_ESP32: Add definition for portMEMORY_BARRIER (#395)

This fixes crash observed in Amazon FreeRTOS when optimisations are enabled

4 years agoRemove AVR ports from main repo (#394)
Gaurav-Aggarwal-AWS [Wed, 15 Sep 2021 02:25:46 +0000 (19:25 -0700)]
Remove AVR ports from main repo (#394)

These ports now exist in the
https://github.com/FreeRTOS/FreeRTOS-Kernel-Partner-Supported-Ports repo.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years agoFix spell-check failure
Gaurav Aggarwal [Fri, 10 Sep 2021 23:27:12 +0000 (23:27 +0000)]
Fix spell-check failure

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years agoUpdate History.txt
Gaurav Aggarwal [Fri, 10 Sep 2021 23:20:36 +0000 (23:20 +0000)]
Update History.txt

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years agoFix free secure context for Cortex-M23 ports
Gaurav Aggarwal [Tue, 10 Aug 2021 07:00:35 +0000 (00:00 -0700)]
Fix free secure context for Cortex-M23 ports

Update the branching condition to correctly free secure context when
there is one.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years agoImplement secure stack sealing as per ARM's recommendation
Gaurav Aggarwal [Wed, 4 Aug 2021 22:00:47 +0000 (15:00 -0700)]
Implement secure stack sealing as per ARM's recommendation

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years agoAssociate secure context with task handle
Gaurav Aggarwal [Wed, 4 Aug 2021 21:57:45 +0000 (14:57 -0700)]
Associate secure context with task handle

The secure side context management code now checks that the secure
context being saved or restored belongs to the task being switched-out
or switched-in respectively.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years agoPre-allocate secure-side context structures
Gaurav Aggarwal [Wed, 4 Aug 2021 21:52:22 +0000 (14:52 -0700)]
Pre-allocate secure-side context structures

This commit improves ARMv8-M security by pre-allocating secure-side task
context structures and changing how tasks reference a secure-side
context structure when calling a secure function. The new configuration
constant secureconfigMAX_SECURE_CONTEXTS sets the number of secure
context structures to pre-allocate. secureconfigMAX_SECURE_CONTEXTS
defaults to 8 if left undefined.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years agoReplace <pre> with @code - remaining files (#388)
Zim Kalinowski [Tue, 7 Sep 2021 19:03:12 +0000 (03:03 +0800)]
Replace <pre> with @code - remaining files (#388)

Co-authored-by: Paul Bartell <pbartell@amazon.com>
Co-authored-by: Ming Yue <mingyue86010@gmail.com>
4 years agoAdd freertos_risc_v_chip_specific_extensions.h for 64-bit ports (#385)
Gaurav-Aggarwal-AWS [Wed, 1 Sep 2021 22:38:07 +0000 (15:38 -0700)]
Add freertos_risc_v_chip_specific_extensions.h for 64-bit ports (#385)

* Add freertos_risc_v_chip_specific_extensions.h for 64-bit ports

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years agominor fix in stream buffer doc (#387)
Zim Kalinowski [Tue, 31 Aug 2021 18:24:56 +0000 (02:24 +0800)]
minor fix in stream buffer doc (#387)

Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
4 years agoReplace <pre> with @code{c} (#386)
Zim Kalinowski [Tue, 31 Aug 2021 16:04:36 +0000 (00:04 +0800)]
Replace <pre> with @code{c} (#386)

* replace <pre> with @code{c}

* endcode must pass spellcheck

4 years agoUpdate the README to align with TF-Mv1.4.0 in TF-M integration (#384)
sherryzhang [Fri, 27 Aug 2021 06:07:58 +0000 (14:07 +0800)]
Update the README to align with TF-Mv1.4.0 in TF-M integration (#384)

Change-Id: I41fc8e18657086e86eacd38ed70f474555739a3c
Signed-off-by: Sherry Zhang <sherry.zhang2@arm.com>
4 years agofixes in queue documentation (#382)
Zim Kalinowski [Fri, 13 Aug 2021 01:15:57 +0000 (09:15 +0800)]
fixes in queue documentation (#382)

Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
4 years agoXtensa_ESP32: Fix build issues when external SPIRAM is enabled (#381)
Shubham Kulkarni [Fri, 13 Aug 2021 00:46:25 +0000 (06:16 +0530)]
Xtensa_ESP32: Fix build issues when external SPIRAM is enabled (#381)

Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
4 years agofix example usage of xMessageBufferCreateStatic and xStreamBufferCrea… (#380)
Paul Adelsbach [Fri, 13 Aug 2021 00:06:41 +0000 (17:06 -0700)]
fix example usage of xMessageBufferCreateStatic and xStreamBufferCrea… (#380)

Example usage is actually correct, so remove the -1. but update
the incorrect parameter description for pucStreamBufferStorageArea
and pucMessageBufferStorageArea.

4 years agoTidy up the 8051 sdcc port (#376)
Jack Lam [Thu, 12 Aug 2021 18:50:52 +0000 (02:50 +0800)]
Tidy up the 8051 sdcc port (#376)

* Tidy up the 8051 sdcc port

* Replace tabs with spaces in SDCC Cygnal port.c file.

Co-authored-by: John Lin <shaojun.lin@delonghigroup.com>
Co-authored-by: Paul Bartell <pbartell@amazon.com>
4 years agofixed parameter names documentation (#378)
Zim Kalinowski [Thu, 12 Aug 2021 18:18:53 +0000 (02:18 +0800)]
fixed parameter names documentation (#378)

4 years agoIndent contents of a taskENTER_CRITICAL/taskEXIT_CRITICAL block. (#348)
RichardBarry [Wed, 4 Aug 2021 17:05:23 +0000 (10:05 -0700)]
Indent contents of a taskENTER_CRITICAL/taskEXIT_CRITICAL block. (#348)

* Indent contents of a taskENTER_CRITICAL/taskEXIT_CRITICAL block.
Move a few configASSERT() statements out of a path where they would always be triggered to prevent "condition is always true" compiler warnings.

* Replace configASSERT() positions due to unintended semantic change from the version where asserts were at the top of the file.

Co-authored-by: RichardBarry <richardbarry.c@gmail.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
4 years agoRun uncrustify with github workflows (#369)
alfred gedeon [Thu, 29 Jul 2021 00:53:10 +0000 (17:53 -0700)]
Run uncrustify with github workflows (#369)

* uncrustify with github workflows

* Fix find expression

* Add uncrustify configuration file

* Uncrustify some files

* uncrustify some more files

* uncrustify more files

* Fix whitespace at end of lines

Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
4 years agoAdd ReadMe for third party port contributions (#371)
Gaurav-Aggarwal-AWS [Wed, 28 Jul 2021 17:37:51 +0000 (10:37 -0700)]
Add ReadMe for third party port contributions (#371)

* Add ReadMe for third party port contributions

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years agodoc: fix function name typo (#368)
Craig Kewley [Wed, 21 Jul 2021 00:21:18 +0000 (01:21 +0100)]
doc: fix function name typo (#368)

4 years agoWarning fixes. (#356)
Kristine Jassmann [Tue, 20 Jul 2021 19:55:49 +0000 (15:55 -0400)]
Warning fixes. (#356)

* Use cast to fix warnings.

* Remove all empty definitions of portCLEAN_UP_TCB( pxTCB ) and
  portALLOCATE_SECURE_CONTEXT( ulSecureStackSize ) from ports.
  When these are undefined, the default empty definition is defined
  in FreeRTOS.h.

4 years agoFix description of vTaskDelay (#363)
Tobias Nießen [Tue, 6 Jul 2021 21:10:53 +0000 (23:10 +0200)]
Fix description of vTaskDelay (#363)

4 years agoReplace two dashes and one whitespace with their corresponding ASCII characters....
swaldhoer [Wed, 30 Jun 2021 22:07:55 +0000 (00:07 +0200)]
Replace two dashes and one whitespace with their corresponding ASCII characters. (#362)

4 years agoAdd RP2040 support (#341)
Graham Sanderson [Wed, 30 Jun 2021 20:20:54 +0000 (15:20 -0500)]
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>
4 years agoMove the community/partner supported ports to correct location (#361)
Archit Gupta [Wed, 30 Jun 2021 01:36:49 +0000 (18:36 -0700)]
Move the community/partner supported ports to correct location (#361)

4 years agoFix C90 Compilation Failure (#359)
Gaurav-Aggarwal-AWS [Wed, 23 Jun 2021 17:51:13 +0000 (10:51 -0700)]
Fix C90 Compilation Failure (#359)

This issue was reported here: https://github.com/FreeRTOS/FreeRTOS-Kernel/issues/358

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years agoAdd Cortex-A53 port with system register interface for CPU interface access (#357)
Gaurav-Aggarwal-AWS [Wed, 23 Jun 2021 01:51:58 +0000 (18:51 -0700)]
Add Cortex-A53 port with system register interface for CPU interface access (#357)

The difference between this port and portable/GCC/ARM_CA53_64_BIT is
that this port uses System Register interface to access CPU interface
while the other one uses Memory-mapped interface.

Signed-off-by: Gaurav Aggarwal
Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
4 years agoAdd new submodules for port contribution (#355)
Archit Gupta [Mon, 21 Jun 2021 19:33:33 +0000 (12:33 -0700)]
Add new submodules for port contribution (#355)

* Add new submodules

* Update submodule location

4 years agoUpdate spell checker exclusion. (#354)
Ming Yue [Tue, 15 Jun 2021 18:55:29 +0000 (11:55 -0700)]
Update spell checker exclusion. (#354)

4 years agoMake the type used to hold run-time counter values configurable (#350)
RichardBarry [Mon, 14 Jun 2021 19:17:41 +0000 (12:17 -0700)]
Make the type used to hold run-time counter values configurable (#350)

* Introduce configRUN_TIME_COUNTER_TYPE which enables developers to define the type used to hold run time statistic counters.  Defaults to uint32_t for backward compatibility.  #define configRUN_TIME_COUNTER_TYPE to a type (for example, uint64_t) in FreeRTOSConfig.h to override the default.

Introduce ulTaskGetIdleRunTimePercent() to complement the pre-existing ulTaskGetIdleRunTimeCounter().  Whereas the pre-existing function returns the raw run time counter value, the new function returns the percentage of the entire run time consumed by the idle task.  Note the amount of idle time is only a good measure of the slack time in a system if there are no other tasks executing at the idle priority, tickless
idle is not used, and configIDLE_SHOULD_YIELD is set to 0.

* Add ultaskgetidleruntimepercent to lexicon.txt.

* Update History file.
Add the MPU version of ulTaskGetIdleRunTimePercent().

* Update include/FreeRTOS.h to correct comment as per aggarg@ suggestion.
* Fix alignment in mpu_wrappers.h.
Commit changes to mpu_prototypes.h which were missed from the original commit.

4 years agoPosix: fix event_wait_timed() (#346)
Thomas Pedersen [Fri, 11 Jun 2021 00:15:47 +0000 (17:15 -0700)]
Posix: fix event_wait_timed() (#346)

event_wait_timed() was ignoring a timeout of 1000 ms.
Presumably this is because pthread_cond_timedwait() only
considers tv_nsec less than one second.

Convert the timeout in miliseconds to second and nanosecond
components to fix this.

Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>
4 years agoAdds SemphrGetCountFromISR with QMsgWaitingFromISR (#345)
Raul Rojas [Wed, 9 Jun 2021 00:48:52 +0000 (20:48 -0400)]
Adds SemphrGetCountFromISR with QMsgWaitingFromISR (#345)

* Adds SemphrGetCountFromISR with QMsgWaitingFromISR

4 years agoNormalize files with mixed line endings (introduced in commit 3a413d1)
Paul Bartell [Tue, 1 Jun 2021 19:01:32 +0000 (12:01 -0700)]
Normalize files with mixed line endings (introduced in commit 3a413d1)

4 years ago[AUTO][RELEASE]: Bump task.h version macros to "10.4.4+"
paulbartell [Fri, 28 May 2021 23:03:08 +0000 (23:03 +0000)]
[AUTO][RELEASE]: Bump task.h version macros to "10.4.4+"

4 years agoAdd history.txt for the 10.4.4 release (#336)
Joseph Julicher [Fri, 28 May 2021 22:48:53 +0000 (15:48 -0700)]
Add history.txt for the 10.4.4 release (#336)

* updated history.txt for 10.4.4

* Update the release date in History.txt

* added link to SMP branch to History.txt

* Added comment explaining the + in the version string

* corrected typos in the + comment

Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>
Co-authored-by: Paul Bartell <pbartell@amazon.com>
4 years agoUpdate github Auto-Release workflow to add an option to set the main branch version...
Paul Bartell [Fri, 28 May 2021 14:23:29 +0000 (07:23 -0700)]
Update github Auto-Release workflow to add an option to set the main branch version in task.h (#337)

Adding text into this new field updates the following macros in task.h in the main branch:
tskKERNEL_VERSION_NUMBER (alphanumeric string)
tskKERNEL_VERSION_MAJOR (numeric only)
tskKERNEL_VERSION_MINOR (numeric only)
tskKERNEL_VERSION_BUILD (numeric only)

4 years agoAdd license header to wait_for_event.c and wait_for_event.h
Paul Bartell [Thu, 27 May 2021 02:49:05 +0000 (19:49 -0700)]
Add license header to wait_for_event.c and wait_for_event.h

4 years agoCleanup license text in Xtensa XCC and Xtensa ESP32 GCC ports.
Paul Bartell [Thu, 27 May 2021 02:47:29 +0000 (19:47 -0700)]
Cleanup license text in Xtensa XCC and Xtensa ESP32 GCC ports.
Add SPXD license identifiers.

4 years agoAdd SPDX and MIT to lexicon
Paul Bartell [Wed, 26 May 2021 23:41:28 +0000 (16:41 -0700)]
Add SPDX and MIT to lexicon

4 years agoAdd SPDX-License-Identifier: MIT to MIT licensed files.
Paul Bartell [Wed, 26 May 2021 23:16:27 +0000 (16:16 -0700)]
Add SPDX-License-Identifier: MIT to MIT licensed files.

4 years agoUpdate license text for ports that were previously missed.
Paul Bartell [Wed, 26 May 2021 22:28:31 +0000 (15:28 -0700)]
Update license text for ports that were previously missed.

4 years agoRemove "1 tab == 4 spaces!" line from files that still contain it.
Paul Bartell [Wed, 26 May 2021 06:06:40 +0000 (23:06 -0700)]
Remove "1 tab == 4 spaces!" line from files that still contain it.

4 years agoUpdate tskKERNEL_VERSION_NUMBER and tskKERNEL_VERSION_BUILD to V10.4.999 to denote...
Paul Bartell [Wed, 26 May 2021 04:52:40 +0000 (21:52 -0700)]
Update tskKERNEL_VERSION_NUMBER and tskKERNEL_VERSION_BUILD to V10.4.999 to denote the development branch

4 years agoUpdate kernel_checker.py with new version and copyright date.
Paul Bartell [Wed, 26 May 2021 04:47:55 +0000 (21:47 -0700)]
Update kernel_checker.py with new version and copyright date.
Update kernel_checker.py to handle assembly and python files

4 years agoUpdate copyright year from 2020 to 2021
Paul Bartell [Wed, 26 May 2021 04:46:15 +0000 (21:46 -0700)]
Update copyright year from 2020 to 2021

4 years agoChange kernel revision in each file header from V10.4.3 to <DEVELOPMENT BRANCH>
Paul Bartell [Wed, 26 May 2021 04:44:10 +0000 (21:44 -0700)]
Change kernel revision in each file header from V10.4.3 to <DEVELOPMENT BRANCH>

4 years agoqueue.c: Change some asserts into conditionals and improve overflow checks (#328)
Dan Good [Thu, 27 May 2021 23:17:59 +0000 (19:17 -0400)]
queue.c: Change some asserts into conditionals and improve overflow checks (#328)

4 years agoCode: Fix stream buffer warning (#335)
alfred gedeon [Thu, 27 May 2021 16:11:35 +0000 (09:11 -0700)]
Code: Fix stream buffer warning (#335)

4 years agodeprecating the mcf5235 port (#334)
Joseph Julicher [Wed, 26 May 2021 23:26:19 +0000 (16:26 -0700)]
deprecating the mcf5235 port (#334)

4 years agoWrap macros in do { ... } while( 0 ) (#240)
j4cbo [Mon, 24 May 2021 21:41:58 +0000 (14:41 -0700)]
Wrap macros in do { ... } while( 0 ) (#240)

4 years agoPosix: fix copyright (#250)
Evgeny Ermakov [Wed, 21 Apr 2021 23:08:46 +0000 (19:08 -0400)]
Posix: fix copyright (#250)

4 years agoCreate macro versions of uxListRemove() and vListInsertEnd() for use in xTaskIncremen...
RichardBarry [Mon, 19 Apr 2021 21:16:10 +0000 (14:16 -0700)]
Create macro versions of uxListRemove() and vListInsertEnd() for use in xTaskIncrementTick().  This provides a minor optimisation to remove the need for a few function calls. (#241)

Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
4 years agoFix regression in vQueueAddToRegistry. (#315)
Paul Bartell [Mon, 19 Apr 2021 18:20:23 +0000 (11:20 -0700)]
Fix regression in vQueueAddToRegistry. (#315)

4 years ago[kernel & MemMang] use space to replace tab and remove meaningless space in the end...
Meco Jianting Man [Mon, 19 Apr 2021 16:58:55 +0000 (00:58 +0800)]
[kernel & MemMang] use space to replace tab and remove meaningless space in the end of each line (#314)

Signed-off-by: Meco Man <920369182@qq.com>
Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>
4 years agoReplace configASSERT( pcQueueName ) in vQueueAddToRegistry with a NULL pointer check...
Paul Bartell [Sat, 17 Apr 2021 16:57:16 +0000 (09:57 -0700)]
Replace configASSERT( pcQueueName ) in vQueueAddToRegistry with a NULL pointer check. (#313)

* Replace configASSERT( pcQueueName ) in vQueueAddToRegistry with a NULL pointer check.

Fixes FreeRTOS/FreeRTOS-Kernel#311

* Make NULL checks consistent.

4 years agosimplify and beautify portBYTE_ALIGNMENT (#309)
Meco Jianting Man [Wed, 14 Apr 2021 14:46:46 +0000 (22:46 +0800)]
simplify and beautify portBYTE_ALIGNMENT (#309)

4 years agoRemove support for tmrCOMMAND_START_DONT_TRACE (#305)
Jeff Tenney [Tue, 13 Apr 2021 18:05:46 +0000 (11:05 -0700)]
Remove support for tmrCOMMAND_START_DONT_TRACE (#305)

* Remove support for tmrCOMMAND_START_DONT_TRACE

Prior to this commit, the timer task used tmrCOMMAND_START_DONT_TRACE
to reload a "backlogged" auto-reload timer -- one for which a reload
operation would have started a period that had already elapsed.  If the
command queue contained a stop or delete command when
tmrCOMMAND_START_DONT_TRACE was put into the queue for a reload, the
timer unexpectedly restarted when the timer task processed
tmrCOMMAND_START_DONT_TRACE.  This commit implements a new method of
reloading auto-reload timers and eliminates support for
tmrCOMMAND_START_DONT_TRACE.  No other code sends this private command.

However, the symbol tmrCOMMAND_START_DONT_TRACE remains defined, with
its original command value, so as not to impact trace applications.

Also fix one-shot timers that were not reliably being marked as not
active:
- when they expired before the start command could be processed
- when the expiration was processed during the timer list switch

Also improve consistency:
- Always reload auto-reload timers *before* calling the callback.
- Always call traceTIMER_EXPIRED() just prior to the callback.

* fix indent

* Revert unnecessary change to prvTimerTask()

Change was intended to faithfully work through a backlog that spanned a
list switch, and before processing a stop or delete command.  But, (1)
it isn't important to do that, and (2) the code didn't accomplish the
intention when *two* auto-reload timers were backlogged across a list
switch.  Best to simply leave this part of the code as it was before.

* fix style

Co-authored-by: Joseph Julicher <jjulicher@mac.com>
4 years agoOverwrite existing QueueRegistry entries when a handle is added multiple times. ...
Paul Bartell [Sat, 10 Apr 2021 00:06:58 +0000 (17:06 -0700)]
Overwrite existing QueueRegistry entries when a handle is added multiple times. (#306)

Overwrite an existing entry for a given xQueue handle when vQueueAddToRegistry is called with an xQueue handle of a queue that is already in the QueueRegistry.

4 years agoUpdate parent repository primary branch name from "master" to "main". (#304)
Paul Bartell [Fri, 9 Apr 2021 16:42:35 +0000 (09:42 -0700)]
Update parent repository primary branch name from "master" to "main". (#304)

4 years agoCode cleanup (#288)
carlo-dev-git [Wed, 7 Apr 2021 21:19:31 +0000 (23:19 +0200)]
Code cleanup (#288)

* Update port.c

* Code cleanup

Misc coding style cleanup and typo fixes

* Fix ASM style

Fix ASM style

* Fix header check

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Carl Lundin <53273776+lundinc2@users.noreply.github.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
4 years agoDefine default values of macros before first use (#298)
Gaurav-Aggarwal-AWS [Fri, 2 Apr 2021 14:35:52 +0000 (07:35 -0700)]
Define default values of macros before first use (#298)

configSTACK_ALLOCATION_FROM_SEPARATE_HEAP was added recently in
https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/267. This macro was
used in portable.h before its default value was defined, resulting in a
warning when built with -Wundef. This changes moves the default value
definition for configSTACK_ALLOCATION_FROM_SEPARATE_HEAP to portable.h
to ensure that it is defined before first use.

portUSING_MPU_WRAPPERS check in mpu_wrappers.h was updated in
https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/285. The new check
results in a warning when built with -Wundef because
portUSING_MPU_WRAPPERS is not defined yet. This changes adds the default
value definition for portUSING_MPU_WRAPPERS to portable.h to ensure that
it is defined before first use.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years agoCheck NULL pointer input for vEventGroupDelete. (#293)
Ming Yue [Thu, 25 Mar 2021 22:57:42 +0000 (15:57 -0700)]
Check NULL pointer input for vEventGroupDelete. (#293)

* Check NULL pointer input for vEventGroupDelete.

* Change the input parameter check with assertion.

Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
4 years agoFix comments in list.h and clarify list usage in xTaskRemoveFromEventList (#289)
Paul Bartell [Thu, 25 Mar 2021 19:39:08 +0000 (12:39 -0700)]
Fix comments in list.h and clarify list usage in xTaskRemoveFromEventList (#289)

* Change instances of "descending" to "ascending" to match implementation.

* Uncrustify

* Clarify list usage in xTaskRemoveFromEventList

4 years agoAdd assert to catch invalid task priority (#292)
Gaurav-Aggarwal-AWS [Thu, 25 Mar 2021 00:04:20 +0000 (17:04 -0700)]
Add assert to catch invalid task priority (#292)

* Add assert to catch invalid task priority

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years agoBuild the posix port on pushes and PRs to the Kernel repository (#290)
Paul Bartell [Tue, 23 Mar 2021 17:33:47 +0000 (10:33 -0700)]
Build the posix port on pushes and PRs to the Kernel repository (#290)

* Run posix build action when new commits are pushed to the FreeRTOS/Kernel repository

* Run kernel unit tests on push and pull_request actions