Commit Graph

3462 Commits (c9e3949f02f0350986f7a7df273e8bf2e9311d04)
 

Author SHA1 Message Date
Joseph Julicher c9e3949f02
added configUSE_POSIX_ERRNO to the template FreeRTOSConfig.h (#1052)
* added a reference to configUSE_POSIX_ERRNO

* fixed formatting

* format changes from PR check
9 months ago
Gaurav-Aggarwal-AWS a8376dbe81
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>
9 months ago
Gaurav-Aggarwal-AWS 2e0c623351
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>
9 months ago
Gabriel Staples 29b202a41e
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
9 months ago
StefanBalt 55eceb2203
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.
9 months ago
chinglee-iot 067d04e44e
Add vPortGenerateSimulatedInterruptFromWindowsThread in MSVC port (#1044)
Add vPortGenerateSimulatedInterruptFromWindowsThread  in MSVC port
to enable native windows threads to notify FreeRTOS tasks.
9 months ago
Gaurav-Aggarwal-AWS 78c8bbde0e
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>
9 months ago
Holden 2eb2d653bf
Move header includes before extern c (#1047) 9 months ago
0mhu 30afc1a2c0
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.
9 months ago
chinglee-iot 8e07366994
Update kernel version v11.1.0+ in tasks.h (#1043) 9 months ago
chinglee-iot 111e775060
Update History.txt for V11.1.0 (#1042) 9 months ago
chinglee-iot c02a347880
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>
10 months ago
chinglee-iot fdf4695c1e
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>
10 months ago
chinglee-iot 2a014ce0b3
Update submodule pointer (#1040) 10 months ago
Devaraj Ranganna 8d280217cd
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>
10 months ago
Rahul Kar bbc058967b
Fix cmake example errors (#1037)
Add typecasts to prevent compiler warnings. Remove ULL suffix to adhere
to C90.
10 months ago
Devaraj Ranganna e143832ad4
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>
10 months ago
Tony Josi c6487d9472
Fix build with C90 (#1036)
* Fix build with C90

* Fix formatting
10 months ago
Caleb Perkinson f69b1db45c
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.
10 months ago
Rahul Kar 5a72344c9a
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>
10 months ago
HagaiMoshe 9bfd0abb55
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>
10 months ago
Aniruddha Kanhere 1ed681cc43
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>
10 months ago
Soren Ptak 6de0d7a737
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
10 months ago
chinglee-iot 4d4f8d0d50
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.
10 months ago
Rahul Kar 73851fb6da
Remove unwanted volatile keyword (#1028)
* Remove unwanted volatile keyword

* Declare variable initially
10 months ago
Rahul Kar 2829f3eccc
Replace volatile with configLIST_VOLATILE (#1027) 10 months ago
Rahul Kar 030c1aa646
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>
10 months ago
Florian La Roche 6270e2aebf
Update the memory alignment within the Cortex-R5 port asm code (#1023)
Update alignment in ARM_CR5 port.

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

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
10 months ago
Rahul Kar 5da55ba8ad
Add configCHECK_HANDLER_INSTALLATION description in template file (#1025)
Add configconfigCHECK_HANDLER_INSTALLATION description in template
configuration file
10 months ago
Rahul Kar f0ff3834bc
Fix spelling in comment (#1024)
Co-authored-by: ActoryOu <jay2002824@gmail.com>
10 months ago
Florian La Roche 8afb3a5b82
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>
10 months ago
Kody Stribrny 8c49c54987
Fix TFM about link (#1021)
This page does not look to
exist anymore which is
failing our link verifier
check.
10 months ago
chinglee-iot ccbbf04e5b
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>
10 months ago
Soren Ptak 52ee9faa72
Add in CI-CD builds of the Cortex-Rx MPU Demos (#1018) 10 months ago
Soren Ptak 7c910499ec
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
10 months ago
Rahul Kar e8289dfee6
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>
10 months ago
Rahul Kar 39dbff7204
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>
10 months ago
Soren Ptak a455b86bd3
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.
10 months ago
Soren Ptak 345a86d49b
ARM CM0+ MPU Port (#1005)
* Add MPU Support to the ARM CM0+ GCC Port.
* Co-authored by @aggarg
10 months ago
Soren Ptak 625b24a104
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>
11 months ago
wat 6dcce92490
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.
11 months ago
RichardBarry 4732b96dba
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.
11 months ago
chinglee-iot d95451d924
Define portNOP in RP2040 port (#1003) 11 months ago
chinglee-iot 30f6061f48
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>
11 months ago
Gaurav-Aggarwal-AWS cff947acd0
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>
11 months ago
Asmeili 83b5b24950
Fix typo in croutine.c (#1004) 11 months ago
Soren Ptak 61111b1460
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
11 months ago
Soren Ptak 839ccb719b
Use Regex for Copyright Year in Header Check (#1002) 11 months ago
Aniruddha Kanhere 2fcb0f48b1
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>
12 months ago
chinglee-iot 1a500f1a74
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>
12 months ago