Commit Graph

58 Commits

Author SHA1 Message Date
Monika Singh
11c72bc075
Add support for MISRA rule 20.7 (#546)
Misra rule 20.7 requires parenthesis to all parameter names
in macro definitions.

The issue was reported here : https://forums.freertos.org/t/misra-20-7-compatibility/15385
2022-08-19 15:51:57 +05:30
Gaurav-Aggarwal-AWS
95669cc1a1
Generalize Thread Local Storage (TLS) support (#540)
* Generalize Thread Local Storage (TLS) support

FreeRTOS's Thread Local Storage (TLS) support used variables and
functions from newlib, thereby making the TLS support specific to
newlib. This commit generalizes the TLS support so that it can be used
with other c-runtime libraries also. The default behavior for newlib
support is still kept same for backward compatibility.

The application writer would need to set configUSE_C_RUNTIME_TLS_SUPPORT
to 1 in their FreeRTOSConfig.h and define the following macros to
support TLS for a c-runtime library:

1. configTLS_BLOCK_TYPE - Type used to define the TLS block in TCB.
2. configINIT_TLS_BLOCK( xTLSBlock ) - Allocate and initialize memory
   block for the task's TLS Block.
3. configSET_TLS_BLOCK( xTLSBlock ) - Switch C-Runtime's TLS Block to
   point to xTLSBlock.
4. configDEINIT_TLS_BLOCK( xTLSBlock ) - Free up the memory allocated
   for the task's TLS Block.

The following is an example to support TLS for picolibc:

 #define configUSE_C_RUNTIME_TLS_SUPPORT        1
 #define configTLS_BLOCK_TYPE                   void*
 #define configINIT_TLS_BLOCK( xTLSBlock )      _init_tls( xTLSBlock )
 #define configSET_TLS_BLOCK( xTLSBlock )       _set_tls( xTLSBlock )
 #define configDEINIT_TLS_BLOCK( xTLSBlock )

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2022-08-08 21:23:29 +05:30
Paul Bartell
2070d9d3e5 Update codecov action to v3.1.0 2022-08-03 11:42:42 -07:00
Xin Lin
c22f40d9a5
Add SBOM Generation in auto_release.yml (#524) 2022-07-28 10:35:29 -07:00
Ravishankar Bhagavandas
0b46492740
Add callback overrides for stream buffer and message buffers (#437)
* Let each stream/message can use its own sbSEND_COMPLETED

In FreeRTOS.h, set the default value of configUSE_SB_COMPLETED_CALLBACK
to zero, and add additional space for the function pointer when
the buffer created statically.

In stream_buffer.c, modify the macro of sbSEND_COMPLETED which let
the stream buffer to use its own implementation, and then add an
pointer to the stream buffer's structure, and modify the
implementation of the buffer creating and initializing

Co-authored-by: eddie9712 <qw1562435@gmail.com>
2022-06-20 17:48:34 -07:00
Tanmoy Sen
49cb8e8b28
Update feature_request.md (#500)
* Update feature_request.md

* Remove trailing spaces

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2022-06-08 22:39:39 +05:30
alfred gedeon
719ceee352
Add suppport for ARM CM55 (#494)
* Add supposrt for ARM CM55

* Fix file header

* Remove duplicate code

* Refactor portmacro.h

1. portmacro.h is re-factored into 2 parts - portmacrocommon.h which is
   common to all ARMv8-M ports and portmacro.h which is different for
   different compiler and architecture. This enables us to provide
   Cortex-M55 ports without code duplication.
2. Update copy_files.py so that it copies Cortex-M55 ports correctly -
   all files except portmacro.h are used from Cortex-M33 ports.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2022-06-01 15:00:10 -07:00
pierrenoel-bouteville-act
e73fabce9a
Declare vApplicationMallocFailedHook function in task.h instead in each C heap file (#483)
vApplicationMallocFailedHook was declared in each Heap file. which forces users to declare it and can cause problems if the prototype of the function changes.

Co-authored-by: Pierre-Noel Bouteville <pnb990@gmail.com>
2022-04-13 10:44:14 -07:00
swaldhoer
89e4823a49
Update uncrustify configuration to 0.69 (#445)
The configuration was updated using

    uncrustify -c .github/uncrustify.cfg -o .github/uncrustify.cfg --update-config-with-doc

to align with the actually used uncrustify version used, i.e., all
configuration is now explicitly set (and no longer implicit).

The files that are common to all ports ("portable/MemMang*" and
"portable/Common/mpu_wrappers.c" are now also autoformatted.

Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>
2022-01-28 10:48:03 -08:00
Paul Bartell
dca4f80a6b
Add configUSE_MINI_LIST_ITEM configuration option to enable the MiniListItem_t type. (#433)
* Add configUSE_MINI_LIST_ITEM configuration option to enable the MiniListItem_t type.

When configUSE_MINI_LIST_ITEM == 0:
	MiniListItem_t and ListItem_t are both typedefs of struct xLIST_ITEM.

When configUSE_MINI_LIST_ITEM == 1 (the default in projdefs.h):
	MiniListItem_t is a typedef of struct xMINI_LIST_ITEM, which contains 3 fewer fields than a struct xLIST_ITEM.
	This configuration saves approximately sizeof(TickType_t) + 2 * sizeof( void * ) bytes of ram, however it also violates strict aliasing rules which some compilers depend on for optimization.

configUSE_MINI_LIST_ITEM defaults to 1 when not defined.

* Add pp_indent_brace option to uncrustify config

Improves compliance with the FreeRTOS code style guide:
https://www.freertos.org/FreeRTOS-Coding-Standard-and-Style-Guide.html
2022-01-19 13:12:57 -08:00
Jon Enz
abd887c687
Clean some spell check words. (#439) 2022-01-07 10:45:58 -08:00
Joseph Julicher
455df7a07a
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>
2021-12-27 11:36:59 -07:00
Laukik Hase
683811bd8c
bugfix: Initialize uxTaskNumber at task initialization (#374)
* bugfix: Initialize uxTaskNumber at task initialization
2021-11-11 14:17:21 -08:00
prplz
a40d52dc05
Fix documentation mistake (#407)
ulTaskNotification -> ulTaskNotify
2021-11-05 10:55:17 -07:00
swaldhoer
a030d0a02b
fix typo (#399) 2021-10-06 15:32:07 -07:00
Gaurav Aggarwal
384ffc5b91 Fix spell-check failure
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2021-09-10 16:44:36 -07:00
Zim Kalinowski
ae73f0de41
Replace <pre> with @code{c} (#386)
* replace <pre> with @code{c}

* endcode must pass spellcheck
2021-08-31 09:04:36 -07:00
alfred gedeon
ce81bcb33f
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>
2021-07-28 17:53:10 -07:00
swaldhoer
46338705bd
Replace two dashes and one whitespace with their corresponding ASCII characters. (#362) 2021-06-30 15:07:55 -07:00
Graham Sanderson
9af72db3ec
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>
2021-06-30 13:20:54 -07:00
Ming Yue
9e85006fc9
Update spell checker exclusion. (#354) 2021-06-15 11:55:29 -07:00
RichardBarry
ddc840fd28
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.
2021-06-14 12:17:41 -07:00
Raul Rojas
bad8f01afd
Adds SemphrGetCountFromISR with QMsgWaitingFromISR (#345)
* Adds SemphrGetCountFromISR with QMsgWaitingFromISR
2021-06-08 17:48:52 -07:00
Paul Bartell
6425e584bd
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)
2021-05-28 07:23:29 -07:00
Paul Bartell
1041b63586 Add SPDX and MIT to lexicon 2021-05-27 19:57:55 -07:00
Paul Bartell
9a3a5a89f2 Update kernel_checker.py with new version and copyright date.
Update kernel_checker.py to handle assembly and python files
2021-05-27 19:57:55 -07:00
j4cbo
f37bcd5c14
Wrap macros in do { ... } while( 0 ) (#240) 2021-05-24 14:41:58 -07:00
Evgeny Ermakov
ac2c383bc1
Posix: fix copyright (#250) 2021-04-21 19:08:46 -04:00
Paul Bartell
a31018d025
Update parent repository primary branch name from "master" to "main". (#304) 2021-04-09 09:42:35 -07:00
Paul Bartell
4ad84923a0
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
2021-03-23 10:33:47 -07:00
Paul Bartell
95433d0284
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
2021-03-16 18:31:37 -07:00
Paul Bartell
18d4ba9c07
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
2021-03-05 18:46:49 -08:00
xuelix
de19eeb7d3
Moved git-secrets check to a different workflow (#271)
git-secrets check is now performed on all PR branches
2021-03-05 14:00:57 -08:00
xuelix
98eba938e2
Added git-secrets check to Github Actions (#270)
Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
2021-03-04 13:00:22 -08:00
Gaurav-Aggarwal-AWS
2a604f4a28
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>
2021-02-23 18:36:27 -08:00
Carl Lundin
81f5892105
Update python version to 3.7.10 (#265) 2021-02-18 18:48:11 -08:00
alfred gedeon
a4b2e0c3f3
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
2021-02-10 16:04:08 -08:00
Cobus van Eeden
21b1058bf7 Update issue templates 2021-02-10 15:27:16 -08:00
David Chalco
0345a20202
incorporate updates from common (#255)
* incorporate updates from common

* empty commit to rerun check
2021-01-29 18:58:55 -08:00
nazar01
6b4a3d0a6e
Typos (#248)
* Fix typos in FreeRTOS.h

* Fix typos in task.h

* Fix typos in tasks.c
2021-01-29 12:05:04 -08:00
alfred gedeon
d060479353
Fix Github checks after move from master to main (#246) 2021-01-19 15:32:01 -08:00
Shubham Kulkarni
ef4c305244
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 3d4d17178f.

* 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>
2020-12-22 13:00:45 -08:00
David Chalco
341e9f06d0
update version in version checker (#239) 2020-12-22 12:57:39 -08:00
David Chalco
6349871ce6
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
2020-12-22 10:06:59 -08:00
Gaurav-Aggarwal-AWS
68ca3a9b2a
Update branch of c-sdk repo to main (#223)
Also add missing apostrophe to stdint.readme

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2020-12-02 14:12:16 -08:00
David Chalco
d0933fd6cb
Add kernel header check workflow (#219) 2020-11-17 15:40:10 -08:00
Cobus van Eeden
94ffcac27c
Added CODEOWNERS file (#209) 2020-10-26 13:24:55 -07:00
alfred gedeon
f376c3bd71
Fix: Pass lexicon.txt as a parameter (#208)
* Fix: pass lexicon.txt as a parameter

* Fix lexicon location
2020-10-23 11:33:41 -07:00
alfred gedeon
c6636f465f
Move markdown files and lexicon into .github directory (#205)
* Move markdown files and lexicon into .github directory
2020-10-21 18:40:43 -07:00
Cobus van Eeden
a4625fbd4d Update issue templates 2020-09-30 17:58:12 -07:00