]> begriffs open source - freertos/log
freertos
19 months agoChange UBaseType_t to BaseType_t for a boolean variable (#1072)
Rahul Kar [Fri, 24 May 2024 07:23:54 +0000 (12:53 +0530)]
Change UBaseType_t to BaseType_t for a boolean variable (#1072)

19 months agotypo: add space to examples/template_configuration/FreeRTOSConfig.h (#1069)
Florian La Roche [Thu, 23 May 2024 09:51:29 +0000 (11:51 +0200)]
typo: add space to examples/template_configuration/FreeRTOSConfig.h (#1069)

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
19 months agoUpdate documentation of prvGetExpectedIdleTime (#1061)
Gaurav-Aggarwal-AWS [Mon, 20 May 2024 08:54:54 +0000 (14:24 +0530)]
Update documentation of prvGetExpectedIdleTime (#1061)

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
19 months agoAdd Noreturn attribute in template port for static analysis (#1060)
Rahul Kar [Thu, 16 May 2024 15:41:05 +0000 (21:11 +0530)]
Add Noreturn attribute in template port for static analysis (#1060)

* Add _Noreturn attribute in the template function to fix MISRA 17.11 advisory warnings

* Add _Noreturn attribute in function declaration

* Code review suggestions

19 months agoadded configUSE_POSIX_ERRNO to the template FreeRTOSConfig.h (#1052)
Joseph Julicher [Wed, 15 May 2024 03:58:41 +0000 (20:58 -0700)]
added configUSE_POSIX_ERRNO to the template FreeRTOSConfig.h (#1052)

* added a reference to configUSE_POSIX_ERRNO

* fixed formatting

* format changes from PR check

19 months agoRevert the change introduced in PR #1051 (#1056)
Gaurav-Aggarwal-AWS [Tue, 14 May 2024 10:54:49 +0000 (16:24 +0530)]
Revert the change introduced in PR #1051 (#1056)

As pointed out by Jeff Tenney, the comment introduced in the PR is not
accurate.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
19 months agoFix race in prvProcessSimulatedInterrupts (#1055)
Gaurav-Aggarwal-AWS [Tue, 14 May 2024 10:45:54 +0000 (16:15 +0530)]
Fix race in prvProcessSimulatedInterrupts (#1055)

Earlier the code was suspending the current thread after calling
vTaskSwitchContext. This left a gap where the current thread could
access incorrect pxCurrentTCB after it was changed by
vTaskSwitchContext.

This commit addresses the problem by suspending the current thread
before calling vTaskSwitchContext.

It was reported here - https://github.com/FreeRTOS/FreeRTOS-Kernel/issues/1054.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
19 months agolist.c: improve code comments to point to official documentation about problems which...
Gabriel Staples [Mon, 13 May 2024 11:19:50 +0000 (04:19 -0700)]
list.c: improve code comments to point to official documentation about problems which may cause code to get stuck inside of list.c (#1051)

list.c: improve documentation about initializing binary semaphores

19 months agoAdd configUSE_TASK_FPU_SUPPORT to AARCH64 port (#1048)
StefanBalt [Wed, 8 May 2024 11:37:52 +0000 (13:37 +0200)]
Add configUSE_TASK_FPU_SUPPORT to AARCH64 port (#1048)

* Add configUSE_TASK_FPU_SUPPORT to AARCH64 port

NEON SIMD is required by standard AARCH64 and its registers are
frequently utilized by standard functions such as memcpy().
This means that even simple tasks that do not use any floating point
arithmetics may still alter the contents of the FPU registers.

For this reason it makes sense to add support for
configUSE_TASK_FPU_SUPPORT to be able to enforce FPU register saving and
restoring globally.

The implementation was largely adopted from the ARM_CA9 port. However,
the FPU registers must be placed on the stack before the critical
nesting count to match the AARCH64 portASM.S.

19 months agoAdd vPortGenerateSimulatedInterruptFromWindowsThread in MSVC port (#1044)
chinglee-iot [Wed, 8 May 2024 06:33:11 +0000 (14:33 +0800)]
Add vPortGenerateSimulatedInterruptFromWindowsThread in MSVC port (#1044)

Add vPortGenerateSimulatedInterruptFromWindowsThread  in MSVC port
to enable native windows threads to notify FreeRTOS tasks.

19 months agoUpdate xPortRunning before resuming first task (#1049)
Gaurav-Aggarwal-AWS [Tue, 7 May 2024 15:17:14 +0000 (20:47 +0530)]
Update xPortRunning before resuming first task (#1049)

The variable `xPortRunning` is now updated before starting the first
task.

It fixes the following issue -
https://forums.freertos.org/t/possible-bug-in-the-way-prvtimertask-thread-function-is-started-in-win32-port/19959/

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
19 months agoMove header includes before extern c (#1047)
Holden [Tue, 7 May 2024 00:24:05 +0000 (17:24 -0700)]
Move header includes before extern c (#1047)

20 months agoFix wrong source file list in CMake of GCC_ARM_CM0 port. (#1045)
0mhu [Mon, 29 Apr 2024 15:21:35 +0000 (17:21 +0200)]
Fix wrong source file list in CMake of GCC_ARM_CM0 port. (#1045)

Add GCC/ARM_CM0/mpu_wrappers_v2_asm.c and GCC/ARM_CM0/portasm.c as source files to 'freertos_kernel_port' library.
This fixes the FREERTOS_PORT "GCC_ARM_CM0" CMake configuration.

20 months agoUpdate kernel version v11.1.0+ in tasks.h (#1043)
chinglee-iot [Mon, 22 Apr 2024 09:48:45 +0000 (17:48 +0800)]
Update kernel version v11.1.0+ in tasks.h (#1043)

20 months agoUpdate History.txt for V11.1.0 (#1042)
chinglee-iot [Mon, 22 Apr 2024 07:35:18 +0000 (15:35 +0800)]
Update History.txt for V11.1.0 (#1042)

20 months agoUse suffix "U" for unsigned constant (#1041)
chinglee-iot [Fri, 19 Apr 2024 09:11:16 +0000 (17:11 +0800)]
Use suffix "U" for unsigned constant (#1041)

* Fix the constant suffix to U

* Fix more unsigned contant suffix

---------

Co-authored-by: Ubuntu <ubuntu@ip-172-31-34-245.ap-northeast-1.compute.internal>
20 months agoAdding SMP coverity example (#1039)
chinglee-iot [Fri, 19 Apr 2024 04:48:00 +0000 (12:48 +0800)]
Adding SMP coverity example (#1039)

* Adding SMP coverity example

* Add coverity scan flow

* Fix format

* Update README.md

* Code review suggestions

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

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-34-245.ap-northeast-1.compute.internal>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
20 months agoUpdate submodule pointer (#1040)
chinglee-iot [Fri, 19 Apr 2024 04:39:36 +0000 (12:39 +0800)]
Update submodule pointer (#1040)

20 months agoarmv8-m: Remove redundant constant pools (#1035)
Devaraj Ranganna [Thu, 18 Apr 2024 18:45:04 +0000 (19:45 +0100)]
armv8-m: Remove redundant constant pools (#1035)

Currently in Armv8-M GCC/ArmClang ports, constant pool is used to
define literals needed for `ldr` instructions. However, those
constant pools are defined with `.align 4` which increases code size.
Instead of defining the constant pool with `.align 4`, let the
compiler hanlde the constant pool and the required alignment.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
20 months agoFix cmake example errors (#1037)
Rahul Kar [Thu, 18 Apr 2024 13:38:51 +0000 (19:08 +0530)]
Fix cmake example errors (#1037)

Add typecasts to prevent compiler warnings. Remove ULL suffix to adhere
to C90.

20 months agotf-m: Update tf-m to TF-Mv2.0.0 release (#1038)
Devaraj Ranganna [Thu, 18 Apr 2024 12:25:14 +0000 (13:25 +0100)]
tf-m: Update tf-m to TF-Mv2.0.0 release (#1038)

The `portable/ThirdParty/GCC/ARM_TFM/README.md` and
`portable/ThirdParty/GCC/ARM_TFM/os_wrapper_freertos.c` are updated to
support `TF-Mv2.0.0` of trusted-firmware-m release.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
20 months agoFix build with C90 (#1036)
Tony Josi [Thu, 18 Apr 2024 09:12:53 +0000 (14:42 +0530)]
Fix build with C90 (#1036)

* Fix build with C90

* Fix formatting

20 months agoAdd Stream Batching Buffer (#916)
Caleb Perkinson [Wed, 17 Apr 2024 14:54:00 +0000 (10:54 -0400)]
Add Stream Batching Buffer (#916)

The difference between a stream buffer and a stream batching buffer is when
a task performs read on a non-empty buffer:
- The task reading from a non-empty stream buffer returns immediately
   regardless of the amount of data in the buffer.
- The task reading from a non-empty steam batching buffer blocks until the
   amount of data in the buffer exceeds the trigger level or the block time
   expires.

20 months agoAdd MPU wrapper from xStreamBufferResetFromISR (#1034)
Rahul Kar [Wed, 17 Apr 2024 08:57:58 +0000 (14:27 +0530)]
Add MPU wrapper from xStreamBufferResetFromISR (#1034)

* Add MPU wrapper from xStreamBufferResetFromISR in V10.6.x

* Code review suggestions

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

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
20 months agoAdd IRQ safe API for message buffer reset (#1033)
HagaiMoshe [Tue, 16 Apr 2024 22:41:55 +0000 (01:41 +0300)]
Add IRQ safe API for message buffer reset (#1033)

* Add API xStreamBufferResetFromISR

Allow reseting the stream buffer from ISR context

Signed-off-by: hagai.moshe <hagaimoshe@outlook.com>
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: hagai.moshe <hagai.moshe@tandemg.com>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: kar-rahul-aws <karahulx@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
20 months agoAdd readme to example directory (#1032)
Aniruddha Kanhere [Tue, 16 Apr 2024 04:41:50 +0000 (21:41 -0700)]
Add readme to example directory (#1032)

* Add readme to example directory

* Add readme to example directory

* Add readme to example directory

* Add readme to example directory

* remove whitespace

* Update wording

* Update examples/README.md

Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com>
* Add Coverity webpage link

---------

Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com>
20 months agoFix the pxTopcOfStack typo in the RISC-V ports. (#1030)
Soren Ptak [Mon, 15 Apr 2024 04:40:10 +0000 (00:40 -0400)]
Fix the pxTopcOfStack typo in the RISC-V ports. (#1030)

* Fix the pxTopcOfStack typo in the RISC-V ports.

* Add a missing o to to

20 months agoFix vTaskSuspendAll assert for critical nesting count (#1029)
chinglee-iot [Thu, 11 Apr 2024 07:12:03 +0000 (15:12 +0800)]
Fix vTaskSuspendAll assert for critical nesting count (#1029)

* Accessing the critical nesting count in current task's TCB is performed with interrupt disabled to ensure atomicity.

20 months agoRemove unwanted volatile keyword (#1028)
Rahul Kar [Thu, 11 Apr 2024 06:00:29 +0000 (11:30 +0530)]
Remove unwanted volatile keyword (#1028)

* Remove unwanted volatile keyword

* Declare variable initially

20 months agoReplace volatile with configLIST_VOLATILE (#1027)
Rahul Kar [Wed, 10 Apr 2024 15:28:48 +0000 (20:58 +0530)]
Replace volatile with configLIST_VOLATILE (#1027)

20 months agoAdd event group and stream buffer config option in template (#1026)
Rahul Kar [Tue, 9 Apr 2024 09:56:34 +0000 (15:26 +0530)]
Add event group and stream buffer config option in template (#1026)

* Add config descriptions in template configuration file

---------

Co-authored-by: GitHub Action <action@github.com>
20 months agoUpdate the memory alignment within the Cortex-R5 port asm code (#1023)
Florian La Roche [Tue, 9 Apr 2024 05:21:12 +0000 (07:21 +0200)]
Update the memory alignment within the Cortex-R5 port asm code (#1023)

Update alignment in ARM_CR5 port.

This is the same patch as 553caa18ced4906cf5060823ada7a10e73c7b535
provided by Richard Barry for issue #426 (ARM_CA9).

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
20 months agoAdd configCHECK_HANDLER_INSTALLATION description in template file (#1025)
Rahul Kar [Tue, 9 Apr 2024 05:01:53 +0000 (10:31 +0530)]
Add configCHECK_HANDLER_INSTALLATION description in template file (#1025)

Add configconfigCHECK_HANDLER_INSTALLATION description in template
configuration file

20 months agoFix spelling in comment (#1024)
Rahul Kar [Tue, 9 Apr 2024 04:30:23 +0000 (10:00 +0530)]
Fix spelling in comment (#1024)

Co-authored-by: ActoryOu <jay2002824@gmail.com>
20 months agofix typos in comments: interace -> interface, swtich -> switch (#1022)
Florian La Roche [Tue, 9 Apr 2024 00:50:55 +0000 (02:50 +0200)]
fix typos in comments: interace -> interface, swtich -> switch (#1022)

Fix typos in comments: interace -> interface, swtich -> switch.

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
20 months agoFix TFM about link (#1021)
Kody Stribrny [Fri, 5 Apr 2024 05:10:43 +0000 (22:10 -0700)]
Fix TFM about link (#1021)

This page does not look to
exist anymore which is
failing our link verifier
check.

20 months agoUpdate coverity example README (#1020)
chinglee-iot [Thu, 4 Apr 2024 06:29:36 +0000 (14:29 +0800)]
Update coverity example README (#1020)

* Update coverity example README

* Update main.c for comment

---------

Co-authored-by: Ubuntu <ubuntu@ip-172-31-34-245.ap-northeast-1.compute.internal>
21 months agoAdd in CI-CD builds of the Cortex-Rx MPU Demos (#1018)
Soren Ptak [Fri, 29 Mar 2024 05:37:38 +0000 (22:37 -0700)]
Add in CI-CD builds of the Cortex-Rx MPU Demos (#1018)

21 months agoUpdate checkout action used in workflow files (#1017)
Soren Ptak [Thu, 28 Mar 2024 17:47:34 +0000 (10:47 -0700)]
Update checkout action used in workflow files (#1017)

* Use the latest tagged release of the checkout action.
* Cleanup some of the echo group prints in the workflow files

21 months agoAdd config option for event groups and stream buffers (#994)
Rahul Kar [Wed, 27 Mar 2024 09:19:47 +0000 (14:49 +0530)]
Add config option for event groups and stream buffers (#994)

* Add configUSE_EVENT_GROUPS in source files

* Add configUSE_EVENT_GROUPS macro in MPU wrapper files

* Add configUSE_EVENT_GROUPS macro in MPU port files for GCC and RVDS compilers

* Fix Formatting

* Add configUSE_STREAM_BUFFERS in source files

* Add configUSE_STREAM_BUFFERS  macro in MPU wrapper files

* Add configUSE_STREAM_BUFFERS macro in MPU port files for GCC and RVDS compilers

* Update FreeRTOS.h post latest commit

* Update the ARM_CRx_MPU Port to account for the new configuration changes

* Formatting suggestions

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
* Code review suggestions

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: joshzarr <joshzarr@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
21 months agoAllow xPortIsAuthorizedToAccessBuffer() API call only from mpu_wrappers_v2 (#992)
Rahul Kar [Wed, 27 Mar 2024 08:35:20 +0000 (14:05 +0530)]
Allow xPortIsAuthorizedToAccessBuffer() API call only from mpu_wrappers_v2 (#992)

* Add support to call xPortxPortIsAuthorizedToAccessBuffer function only when using latest MPU wrappers

* Fix build issue in ARM CM3 MPU port

* Code review suggestions

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

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
21 months agoAdd removed unprivileged access check to ARM_CRx_MPU xPortIsAuthorizedToAccessBuffer...
Soren Ptak [Wed, 27 Mar 2024 05:07:11 +0000 (22:07 -0700)]
Add removed unprivileged access check to ARM_CRx_MPU xPortIsAuthorizedToAccessBuffer() (#1016)

* Add in a removed check for if a task is attempting to read a variable from a location it has write access to in xPortIsAuthorizedToAccessBuffer.

* Add in a portDONT_DISCARD symbol as well.

21 months agoARM CM0+ MPU Port (#1005)
Soren Ptak [Tue, 26 Mar 2024 20:25:07 +0000 (13:25 -0700)]
ARM CM0+ MPU Port (#1005)

* Add MPU Support to the ARM CM0+ GCC Port.
* Co-authored by @aggarg

21 months agoRemove duplicate pop from MPU Wrappers ASM Files (#1008)
Soren Ptak [Mon, 18 Mar 2024 10:51:21 +0000 (03:51 -0700)]
Remove duplicate pop from MPU Wrappers ASM Files (#1008)

* Remove duplicate pop instruction from portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/mpu_wrappers_v2_asm.c

* Remove duplicate pop instruction from portable/ARMv8M/non_secure/portable/GCC/ARM_CM23_NTZ/mpu_wrappers_v2_asm.c

* Remove duplicate pop instruction from portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/mpu_wrappers_v2_asm.c

* Remove duplicate pop instruction from portable/ARMv8M/non_secure/portable/GCC/ARM_CM33_NTZ/mpu_wrappers_v2_asm.c

* Remove duplicate pop instruction from portable/ARMv8M/non_secure/portable/IAR/ARM_CM23/mpu_wrappers_v2_asm.S

* Remove duplicate pop instruction from portable/ARMv8M/non_secure/portable/IAR/ARM_CM23_NTZ/mpu_wrappers_v2_asm.S

* Remove duplicate pop instruction from portable/ARMv8M/non_secure/portable/IAR/ARM_CM33/mpu_wrappers_v2_asm.S

* Remove duplicate pop instruction from portable/ARMv8M/non_secure/portable/IAR/ARM_CM33_NTZ/mpu_wrappers_v2_asm.S

* Run the copy_files.py script to update the ARMv8M ports to remove the duplicate pop instruction in mpu_wrappers_v2_asm

* Remove duplicate pop instruction from portable/GCC/ARM_CM3_MPU/mpu_wrappers_v2_asm.c

* Remove duplicate pop instruction from portable/GCC/ARM_CM4_MPU/mpu_wrappers_v2_asm.c

* Remove duplicate pop instruction from portable/IAR/ARM_CM4F_MPU/mpu_wrappers_v2_asm.S

* Remove duplicate pop instruction from portable/RVDS/ARM_CM4_MPU/mpu_wrappers_v2_asm.c

---------

Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
21 months agoImprovement for 64bit Windows port (#1011)
wat [Mon, 18 Mar 2024 06:09:49 +0000 (15:09 +0900)]
Improvement for 64bit Windows port (#1011)

* 64bit TickType_t is supported on Windows port.(MSVC and MinGW)
Especially it is introduced for 64bit compiler.(x64 platform on MSVC and MinGW-w64)

* Unnecessary compiler warning for the cast operation is disabled locally.(MinGW-w64 only)

* Modify the condition for ignoring compiler warning for the cast operation.

Before modification: Compiler warning was ignored only on MinGW64
After modification: Compiler warning is ignored on MinGW32 and MinGW64
Reason of modification: The cast warning here is unavoidable not only on MinGW64 but also on MinGW32.
"__GNUC__" macro is used because MSVC does not recognize this #pragma directive.

21 months agoAdd daemon task startup hook / timer task creation consistency check (#1009)
RichardBarry [Thu, 7 Mar 2024 07:08:15 +0000 (23:08 -0800)]
Add daemon task startup hook / timer task creation consistency check (#1009)

Add a compile time check that emits a helpful error message if the user
attempts to create a daemon task startup hook without also creating the
timer/daemon task.

The timer/daemon task startup hook runs in the context of the timer/daemon
task.  Therefore, it won't run even if configUSE_DAEMON_TASK_STARTUP_HOOK
is set to 1 if the timer task isn't created.  The timer task is only created if
configUSE_TIMERS is not equal to 0.

21 months agoDefine portNOP in RP2040 port (#1003)
chinglee-iot [Wed, 6 Mar 2024 08:24:19 +0000 (16:24 +0800)]
Define portNOP in RP2040 port (#1003)

21 months agoNot using pxIndex to iterate ready list in trace utility (#1000)
chinglee-iot [Wed, 6 Mar 2024 07:34:21 +0000 (15:34 +0800)]
Not using pxIndex to iterate ready list in trace utility (#1000)

* pxIndex should only be used when selecting next task. Altering pxIndex
  of a ready list will cause the scheduler to be unable to select the
  right task to run. Using a for loop if traversing the list for trace
  utility is required.
* Not defining listGET_OWNER_OF_NEXT_ENTRY when using SMP scheduler

---------

Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
21 months agoUpdate comment in template FreeRTOSConfig.h (#1007)
Gaurav-Aggarwal-AWS [Mon, 4 Mar 2024 05:18:05 +0000 (10:48 +0530)]
Update comment in template FreeRTOSConfig.h (#1007)

Update the comment for configKERNEL_INTERRUPT_PRIORITY in the template
FreeRTOSConfig.h.

It was reported here - https://forums.freertos.org/t/migration-from-v10-5-1-to-v11-0-1-fails-with-new-freertosconfig-h-file/19276/

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
22 months agoFix typo in croutine.c (#1004)
Asmeili [Wed, 28 Feb 2024 11:21:29 +0000 (12:21 +0100)]
Fix typo in croutine.c (#1004)

22 months agoAdd ARMv7-R MPU Port (#938)
Soren Ptak [Mon, 26 Feb 2024 19:01:25 +0000 (14:01 -0500)]
Add ARMv7-R MPU Port (#938)

* Apply git review patch created by @aggargr
* Add necessary changes to the CMakeLists.txt file to build the port

22 months agoUse Regex for Copyright Year in Header Check (#1002)
Soren Ptak [Mon, 26 Feb 2024 17:26:42 +0000 (12:26 -0500)]
Use Regex for Copyright Year in Header Check (#1002)

22 months agoFix small bugs in Kernel (#998)
Aniruddha Kanhere [Tue, 20 Feb 2024 16:49:41 +0000 (08:49 -0800)]
Fix small bugs in Kernel (#998)

* Fix small bugs

* Cast sizeof to BaseType_t

* Test removing assert to fix UT

* Revert change to tasks.c

Since configIDLE_TASK_NAME must be defined as a string according to
the documentation, the macro will always be NULL terminated. Which
means that the check `if( cIdleName[ xIdleTaskNameIndex ] == ( char ) 0x00 )`
will catch the end of string.

* Update coverity config; Add coverity version; Update pvPortMalloc declaration to match the definitions.

* Add port files to sed command

* Remove warnings about unused parameters in port code

---------

Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
22 months agoSupport reset kernel state for restarting scheduler (#944)
chinglee-iot [Mon, 19 Feb 2024 06:39:31 +0000 (14:39 +0800)]
Support reset kernel state for restarting scheduler (#944)

* Adding the following functions to reset kernel state. These functions are only required for application which
needs to restart the scheduler.
 - void vTaskResetState( void )
 - void vTimerResetState( void )
 - void vPortHeapResetState( void )
 - void vCoRoutineResetState( void )

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Chris Morgan <cmorgan@boston-engineering.com>
Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
22 months agoAdd default core affinity config value. (#996)
Christoph Seitz [Fri, 16 Feb 2024 05:42:18 +0000 (06:42 +0100)]
Add default core affinity config value. (#996)

* Add default core affinity config value.

---------

Co-authored-by: Anubhav Rawal <rawalexe@amazon.com>
22 months agoFix MISRA C 2012 Rule 13.3 Violations (#988)
bradleysmith23 [Wed, 14 Feb 2024 06:18:35 +0000 (22:18 -0800)]
Fix MISRA C 2012 Rule 13.3 Violations (#988)

* MISRA Rule 13.3 Fixes

* Add semiicolons that were accidentally removed

* Add parentheses back around pxList->uxNumberOfItems where removed.

* Formatting fix

* Add Casts to UBaseType_t

---------

Co-authored-by: bjbsmith <bjbsmith@uafeb6a6bcdce55.ant.amazon.com>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
22 months agoRemove PRIVILEGED FUNCTION from function definiton (#989)
Rahul Kar [Tue, 13 Feb 2024 14:40:20 +0000 (20:10 +0530)]
Remove PRIVILEGED FUNCTION from function definiton (#989)

22 months agoFix MISRA C 2012 Rule 13.2 Violations (#979)
bradleysmith23 [Tue, 13 Feb 2024 05:11:30 +0000 (21:11 -0800)]
Fix MISRA C 2012 Rule 13.2 Violations (#979)

* Fix violations of MISRA rule 13.2

* Fix typo in UBaseType_t

* Uncrustify: triggered by comment.

* Run Github Actions.

* Remove temp variable for uxCurrentNumberOfTasks

Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com>
* Declare uxCurrentListLength at top of function, update comment.

* Update location of uxCurrentListLength Declaration

* Uncrustify: triggered by comment.

* Run Github Actions

* Uncrustify: triggered by comment.

* Run Github Actions.

* Update comment explaining use of temp variable

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
22 months agoUpdate default value of configSTACK_DEPTH_TYPE in config file (#987)
Rahul Kar [Tue, 13 Feb 2024 04:39:32 +0000 (10:09 +0530)]
Update default value of configSTACK_DEPTH_TYPE in config file (#987)

22 months agoUpdate task notification scheduler suspension usage (#982)
Darian [Wed, 7 Feb 2024 05:14:04 +0000 (13:14 +0800)]
Update task notification scheduler suspension usage (#982)

* Update task notification scheduler suspension

Previously ulTaskGenericNotifyTake() and xTaskGenericNotifyWait() would suspend
the scheduler while inside a critical section.

This commit changes the order by wrapping the critical sections in a scheduler
suspension block. This logic is more inuitive and allows the SMP scheduler
suspension logic to be simplified.

* tasks.c: Fix typo

* Use a complete sentence in comment

* Check portGET_CRITICAL_NESTING_COUNT when scheduler is running

* Prevent potential NULL pointer access when scheduler is not running

---------

Co-authored-by: Paul Bartell <pbartell@amazon.com>
Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com>
Co-authored-by: Ching-Hsin Lee <chinglee@amazon.com>
22 months agoFix SMP task self void run state change (#984)
chinglee-iot [Tue, 6 Feb 2024 12:41:34 +0000 (20:41 +0800)]
Fix SMP task self void run state change (#984)

* Request a task to yield after been suspended or deleted to prevent this task puts itself back to another list
* Fix volatile variable access order to ensure ensure compliance with MISRA C 2012 Rule 13.5

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
22 months agoUpdate version number (#983)
Paul Bartell [Tue, 6 Feb 2024 10:18:14 +0000 (02:18 -0800)]
Update version number (#983)

* Update version number to 11.0.1+ in task.h

* Update Third Party Port version to <DEVELOPMENT BRANCH>

* Update version to 11.0.1 in manifest.yml

22 months agoCorrect ARM port folder capitalization (#981)
Eric Jackson [Mon, 5 Feb 2024 18:31:52 +0000 (10:31 -0800)]
Correct ARM port folder capitalization (#981)

* Rename Arm_AARCH64 to ARM_AARCH64

* Rename Arm_AARCH64_SRE to ARM_AARCH64_SRE

* Update cmake for ARM port folder capitalization

* Update in portable/CmakeLists.txt
* Use capitalization name in port README.md

---------

Co-authored-by: Ching-Hsin Lee <chinglee@amazon.com>
22 months agoFix MISRA C 2012 Rule 10.4 Violations (#972)
bradleysmith23 [Mon, 5 Feb 2024 12:38:15 +0000 (04:38 -0800)]
Fix MISRA C 2012 Rule 10.4 Violations (#972)

Fixes for violations of MISRA rule 10.4

22 months agoFix MISRA C 2012 Rule 14.4 Violations. (#975)
bradleysmith23 [Fri, 2 Feb 2024 22:28:43 +0000 (14:28 -0800)]
Fix MISRA C 2012 Rule 14.4 Violations. (#975)

* Fix MISRA rule 14.4 violations.

* Use pdFALSE instead of 0 in comparison

Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com>
* Uncrustify: triggered by comment.

* Run Github Actions.

---------

Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
22 months agoEnable xTaskGetCurrentTaskHandleForCore() for single core builds (#978)
Darian [Fri, 2 Feb 2024 19:46:20 +0000 (03:46 +0800)]
Enable xTaskGetCurrentTaskHandleForCore() for single core builds (#978)

Enable xTaskGetCurrentTaskHandleForCore() for single core builds

---------
Co-authored-by: Paul Bartell <pbartell@amazon.com>
Co-authored-by: Ching-Hsin Lee <chinglee@amazon.com>
23 months agoFix MISRA C 2012 Rule 20.7 Violations (#971)
bradleysmith23 [Thu, 1 Feb 2024 19:57:22 +0000 (11:57 -0800)]
Fix MISRA C 2012 Rule 20.7 Violations (#971)

* Initial set of SA fixes

* Revert function parameter name changes

* Reverted parameter name for Static version of function by mistake

* Update mpu_wrappers_v2.c to only include 20.7 fixes

* Update queue.c to remove non-20.7 fixes

* Update tasks.c to remove non-20.7 fixes

---------

Co-authored-by: bjbsmith <bjbsmith@uafeb6a6bcdce55.ant.amazon.com>
Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com>
23 months agoFix MISRA directive 4.7 warning (#977)
Rahul Kar [Thu, 1 Feb 2024 12:08:24 +0000 (17:38 +0530)]
Fix MISRA directive 4.7 warning (#977)

23 months agoFix MISRA C 2012 Rule 10.3 Violations (#974)
bradleysmith23 [Thu, 1 Feb 2024 09:28:24 +0000 (01:28 -0800)]
Fix MISRA C 2012 Rule 10.3 Violations (#974)

* Resolve violations for MISRA Rule 10.3-b2

* Formatting fix

---------

Co-authored-by: bjbsmith <bjbsmith@uafeb6a6bcdce55.ant.amazon.com>
Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com>
23 months agoFix MISRA C 2012 Rule 9.3 violations (#973)
bradleysmith23 [Thu, 1 Feb 2024 09:01:53 +0000 (01:01 -0800)]
Fix MISRA C 2012 Rule 9.3 violations (#973)

Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
23 months agoFix MISRA Rule 10.1 violations (#976)
bradleysmith23 [Thu, 1 Feb 2024 07:06:56 +0000 (23:06 -0800)]
Fix MISRA Rule 10.1 violations (#976)

Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
23 months agoDelete kernel created task in vTaskEndScheduler (#962)
chinglee-iot [Thu, 1 Feb 2024 03:12:08 +0000 (11:12 +0800)]
Delete kernel created task in vTaskEndScheduler (#962)

* Update vTaskDelete() to delete a task directly when scheduler is stopped instead of putting it on the xTasksWaitingTermination list.
* Delete the idle tasks and timer task in vTaskEndScheduler().
* Reclaim resources for all the tasks on the xTasksWaitingTermination list in vTaskEndScheduler().
* Update POSIX to no longer delete FreeRTOS tasks in the port.

---------

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>
23 months agoUpdate ARMv8-M config definitions in template file (#970)
Rahul Kar [Wed, 31 Jan 2024 06:55:56 +0000 (12:25 +0530)]
Update ARMv8-M config definitions in template file (#970)

* Update ARMV8-M config definitions in template file

---------

Co-authored-by: GitHub Action <action@github.com>
23 months agoCmake: Create a single static library including port
barnatahmed [Tue, 30 Jan 2024 19:44:27 +0000 (20:44 +0100)]
Cmake: Create a single static library including port

Modify portable/CMakeLists.txt to create only one static library containing both the common kernel code and kernel port.

Change the freertos_kernel_port target from a STATIC library to an OBJECT library and introduce a new freertos_kernel_port_headers  INTERFACE library target.

---------

Co-authored-by: ABARNAT <ahmed.barnat@actia-engineering.tn>
Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
23 months agoFix ThirdParty/GCC/ATmega formatting (#965)
Phillip Stevens [Tue, 30 Jan 2024 05:42:20 +0000 (16:42 +1100)]
Fix ThirdParty/GCC/ATmega formatting (#965)

Unnecessary white space was introduced in PR #768
which affected the formatting of assembly code. This PR
returns the correct formatting. No functional change.

23 months agoAdd a check for configENABLE_MVE to M23, M33 ports (#968)
Gaurav-Aggarwal-AWS [Tue, 30 Jan 2024 05:13:53 +0000 (10:43 +0530)]
Add a check for configENABLE_MVE to M23, M33 ports (#968)

Add a check for configENABLE_MVE to M23, M33 ports

configENABLE_MVE is only applicable to Cortex-M55 and Cortex-M85 ports.
It must not be defined to 1 for other ARMv8_m ports.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
23 months agoRemove configTOTAL_MPU_REGIONS from M3 MPU port (#966)
Gaurav-Aggarwal-AWS [Mon, 29 Jan 2024 18:29:18 +0000 (23:59 +0530)]
Remove configTOTAL_MPU_REGIONS from M3 MPU port (#966)

The number of MPU regions is not configurable for Cortex-M3 port and
therefore, it is misleading to have configTOTAL_MPU_REGIONS in
portmacro.h.

It was added in PR #952.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
23 months agoAdd missing Task Notification IFDEF (#967)
Soren Ptak [Mon, 29 Jan 2024 17:19:09 +0000 (12:19 -0500)]
Add missing Task Notification IFDEF (#967)

Wrap the task notification check in vTaskGetInfo() in in a  #if ( configUSE_TASK_NOTIFICATIONS == 1 )

23 months agoAdd code to allow building for x64 in MSVC (#924)
José Simões [Mon, 29 Jan 2024 06:35:10 +0000 (06:35 +0000)]
Add code to allow building for x64 in MSVC (#924)

* Add code to allow building for x64 in MSVC

- Add code for x64 arch.
- Add initial value for local otherwise it won't get proper value in x64.

* Moving init local to portGET_HIGHEST_PRIORITY

- From code review.

* More changes following review

* Another style fix from review

* Update formatting

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

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
Co-authored-by: Nikhil Kamath <110539926+amazonKamath@users.noreply.github.com>
Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
23 months agoGCC: MSP430F449: Fix pxPortInitialiseStack on EABI (#947)
Forty-Bot [Mon, 29 Jan 2024 05:37:43 +0000 (00:37 -0500)]
GCC: MSP430F449: Fix pxPortInitialiseStack on EABI (#947)

According to the MSP430 EABI [1] section 3.3,

Arguments are assigned, in declared order, to the first available
register single, pair, or quad from the following list into which it
fits (with the following special exceptions). For MSP430 and
MSP430X, the argument registers are: R12, R13, R14, R15

Therefore, pvParameters should be passed in R12, as it is the first
argument, not R15. Keep passing the parameter in R15 for the
MSP430 EABI, if anyone is still using it.

[1] https://www.ti.com/lit/an/slaa534a/slaa534a.pdf

23 months agoFix MacOS Posix port (#957)
Soren Ptak [Sun, 28 Jan 2024 13:11:03 +0000 (08:11 -0500)]
Fix MacOS Posix port (#957)

PR #914 caused Posix Port to fail to build on MacOS. This PR fixes
teh build failure.

This PR also adds a Matrix configuration to the GitHub kernel-demo
workflow to build the Posix Demos on MacOS.
---------

Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
23 months agouse configSTACK_DEPTH_TYPE consequently (updated for 11.0.x) (#942)
Phillip Stevens [Sat, 27 Jan 2024 05:26:55 +0000 (16:26 +1100)]
use configSTACK_DEPTH_TYPE consequently (updated for 11.0.x) (#942)

* use configSTACK_DEPTH_TYPE consequently

* update default to uint32_t

* Update FreeRTOS.h

Revert for backwards compatibility

* Update portable.h

* configSTACK_DEPTH_TYPE - unify stack variable naming

* update lexicon.txt

* update typo lexicon.txt

* Update task.h

* Update timers.h

* fix merge typo

* fix stack type

* fix timer stack type

* fix timer stack more

* fix affinity set stack

* adjust ports to use configSTACK_DEPTH_TYPE

* fix vTaskListTasks

* set default stack depth type in portable.h

* fix History.txt

* update affinityset

* resolve reviewer comments

* fix prvTaskCheckFreeStackSpace for variable stack size type

* restore CoRoutine defines

* remove obsolete stack ttype casts

* fix (attempt) for format portable.h

* Formatting fixes

* prvTaskCheckFreeStackSpace make variable naming compliant

* Update portable/GCC/ARM_CM33/non_secure/port.c

Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
* Update portable/GCC/ARM_CM23/non_secure/port.c

Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
* Apply suggestions from code review

Update ulStackDepth to uxStackDepth

Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
* Correct uxStackDepth in port.c

Also add uint32_t cast prvGetMPURegionSizeSetting.

* Update ARM CM3 MPU port.c

Revert casting of ( uint32_t ) pxBottomOfStack

* Code review suggestions

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

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
23 months ago Sync up MicroblazeV9 port with Xilinx tree (#220)
Mubin Sayyed [Fri, 26 Jan 2024 03:21:44 +0000 (08:51 +0530)]
 Sync up MicroblazeV9 port with Xilinx tree (#220)

* MicroblazeV9: Add support for 64 bit microblaze
* MicroblazeV9: Add support for generation of run time task stats
* MicroblazeV9: Add default implementation for callback functions
---------
Signed-off-by: Mubin Usman Sayyed <mubin.usman.sayyed@xilinx.com>
23 months agoAdd check for if the scheduler is running to ARMv8M MPU ports (#960)
Soren Ptak [Wed, 24 Jan 2024 18:52:13 +0000 (13:52 -0500)]
Add check for if the scheduler is running to ARMv8M MPU ports (#960)

* Allow access to any buffer in xPortIsAuthorizedToAccessBuffer if xSchedulerRunning is set to pdFALSE

* Allow access to any buffer in xPortIsAuthorizedToAccessBuffer if xSchedulerRunning is set to pdFALSE in the copied ARMv8M Port Files

23 months agoUpdate for unpaired critical section in vTaskSuspend (#959)
chinglee-iot [Wed, 24 Jan 2024 11:48:31 +0000 (19:48 +0800)]
Update for unpaired critical section in vTaskSuspend (#959)

* Move the taskEXIT_CRITICAL out of the configNUMBER_OF_CORES macro block to improve readability.

23 months agoAdd check for if the scheduler is running to MPU ports (#954)
Soren Ptak [Tue, 23 Jan 2024 19:48:20 +0000 (14:48 -0500)]
Add check for if the scheduler is running to MPU ports (#954)

* In the ARM_CM3_MPU and ARM_CM4_MPU Port function xPortIsAuthorizedToAccessBuffer() grant access to the buffer if xSchedulerRunning is false.

23 months agoUpdate unpaired critical section in vTaskDelete for readability (#958)
chinglee-iot [Tue, 23 Jan 2024 09:02:15 +0000 (17:02 +0800)]
Update unpaired critical section in vTaskDelete for readability (#958)

* Modify unpaired critical section for readability
* Move prvDeleteTCB out of critical section for SMP

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
23 months agoPosix port - set name for threads (#950)
Mikhail Paulyshka [Thu, 18 Jan 2024 19:35:16 +0000 (22:35 +0300)]
Posix port - set name for threads (#950)

Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
23 months agoMPU assert for ARM_CM3_MPU (#952)
IsaacDynamo [Thu, 18 Jan 2024 19:12:21 +0000 (20:12 +0100)]
MPU assert for ARM_CM3_MPU (#952)

* Add runtime check to see if the target even has a MPU

* Add missing extern symbols for __ARMCC_VERSION support

* Add default for configTOTAL_MPU_REGIONS and change a runtime assert to compile time error

* Simplify check and link to reference documentation

Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
---------

Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
Co-authored-by: jasonpcarroll <23126711+jasonpcarroll@users.noreply.github.com>
23 months agoMake configSUPPORT_STATIC_ALLOCATION==1 an error for MPU ports (#953)
IsaacDynamo [Thu, 18 Jan 2024 19:02:41 +0000 (20:02 +0100)]
Make configSUPPORT_STATIC_ALLOCATION==1 an error for MPU ports (#953)

* Error when configSUPPORT_STATIC_ALLOCATION is set for MPU ports

* Uncrustify: triggered by comment.

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
23 months agoAdd mpu_wrappers_v2_asm.c to MPU ports (#951)
IsaacDynamo [Wed, 17 Jan 2024 20:22:32 +0000 (21:22 +0100)]
Add mpu_wrappers_v2_asm.c to MPU ports (#951)

Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
23 months agoFix -Werror=unused-parameter in GCC posix prvTimerTickHandler() (#949)
Tony Josi [Sat, 13 Jan 2024 16:13:05 +0000 (21:43 +0530)]
Fix -Werror=unused-parameter in GCC posix prvTimerTickHandler() (#949)

23 months agoPOSIX port - Switch from allowing the user to specify the stack memory itself, to...
Chris Morgan [Wed, 29 Nov 2023 13:15:50 +0000 (08:15 -0500)]
POSIX port - Switch from allowing the user to specify the stack memory itself, to allowing them to specify the stack size

Change from pthread_attr_setstack() to pthread_attr_setstacksize(), and automatically adjust the stack size
to be at least PTHREAD_STACK_MIN if it wasn't already, removing the size warning.

This permits the user to increase the pthread stack size beyond the PTHREAD_STACK_MIN default of 16384 if
desired, without producing a warning in the typical case where stacks are minimized for RAM limited targets.

Continue to store thread paramters on the provided stack, for consistency with the MCU targets.

Previously pthread_attr_setstack() was used to enable user defined stacks.

Note that:

1. The stack size can still be specified by the user.

2. pxPortInitialiseStack(), and pthread_addr_setstack() was failing on stacks of typical size, as
   these are smaller than PTHREAD_STACK_MIN (16384) bytes, and printing out a series of warnings.
   Improve usability by having the posix port automatically increase the stack size to be
   at least PTHREAD_STACK_MIN as posix platforms have enough memory for this not to be a concern.

3. Reuse of stack memory will also result in valgrind 'invalid write' errors to what is demonstrably
   valid memory. Root cause is that Valgrind is tracking a stack pointer as the stack is used.
   Reuse of a stack buffer results in the stack being used at its start, in an area that Valgrind thinks
   is far away from the start of the stack. There are ways to notify Valgrind of these changes
   however this would require linking against and calling Valgrind functions from the FreeRTOS application using
   the posix port, https://valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.clientreq.

   Also, apparently it isn't permitted by posix to reuse stack memory once its been used in a pthread via pthread_attr_setstack(),
   see https://stackoverflow.com/a/5422134

23 months agoRevert pthread_attr_setstacksize
Ching-Hsin Lee [Wed, 10 Jan 2024 12:30:46 +0000 (20:30 +0800)]
Revert pthread_attr_setstacksize

23 months agoRevert timer tick function
Ching-Hsin,Lee [Wed, 10 Jan 2024 05:48:35 +0000 (05:48 +0000)]
Revert timer tick function

23 months agoAdd back event signal
Ching-Hsin,Lee [Wed, 10 Jan 2024 05:45:02 +0000 (05:45 +0000)]
Add back event signal

23 months agoRemove redundent cancellation point
Ching-Hsin,Lee [Wed, 10 Jan 2024 05:39:27 +0000 (05:39 +0000)]
Remove redundent cancellation point

23 months agoformat and header file
Ching-Hsin,Lee [Wed, 10 Jan 2024 05:38:18 +0000 (05:38 +0000)]
format and header file

23 months agoAdd back heap setup code
Ching-Hsin,Lee [Wed, 10 Jan 2024 05:32:14 +0000 (05:32 +0000)]
Add back heap setup code

23 months agoUPdate format
Ching-Hsin,Lee [Wed, 10 Jan 2024 05:20:51 +0000 (05:20 +0000)]
UPdate format