Commit graph

3486 commits

Author SHA1 Message Date
Soren Ptak
d6e2ab495d
Merge branch 'main' into ARM_CRx_MPU 2024-02-21 16:04:09 -05:00
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>
2024-02-20 22:19:41 +05:30
Soren Ptak
153af86d70 Fix an incorrect operating mode word in the portASM.S file, slight formatting tweak, use checkout@v4 to account for new warnings 2024-02-19 11:56:05 -05:00
Soren Ptak
bfb4378422
Merge branch 'main' into ARM_CRx_MPU 2024-02-19 11:46:15 -05:00
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>
2024-02-19 14:39:31 +08:00
Soren Ptak
34c9579bb0
Merge branch 'main' into ARM_CRx_MPU 2024-02-18 10:39:08 -05:00
Christoph Seitz
e68975fcf7
Add default core affinity config value. (#996)
* Add default core affinity config value.

---------

Co-authored-by: Anubhav Rawal <rawalexe@amazon.com>
2024-02-16 11:12:18 +05:30
Soren Ptak
80b99d6f09
Merge branch 'main' into ARM_CRx_MPU 2024-02-14 09:08:53 -05:00
Soren Ptak
370498fe93 Slight changes to formatting 2024-02-14 09:08:23 -05:00
Soren Ptak
5f5ed08f82 Slight formatting change to mpu_wrappers files 2024-02-14 08:49:40 -05:00
bradleysmith23
4d34700bcc
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>
2024-02-14 11:48:35 +05:30
Rahul Kar
8c10944575
Remove PRIVILEGED FUNCTION from function definiton (#989) 2024-02-13 20:10:20 +05:30
Soren Ptak
1eae231c6f
Merge branch 'main' into ARM_CRx_MPU 2024-02-13 09:11:59 -05:00
bradleysmith23
8cfa7152f7
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>
2024-02-13 10:41:30 +05:30
Rahul Kar
bd652237fb
Update default value of configSTACK_DEPTH_TYPE in config file (#987) 2024-02-13 10:09:32 +05:30
Soren Ptak
5929dc7235
Merge branch 'main' into ARM_CRx_MPU 2024-02-08 14:03:53 -05:00
Soren Ptak
72ee9e302d Fix two incorrect ifdef guards in mpu_wrappers_v2_asm.S 2024-02-07 13:13:54 -08:00
Darian
7284d84dc8
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>
2024-02-07 13:14:04 +08:00
Soren Ptak
ca9f1cca49
Merge branch 'main' into ARM_CRx_MPU 2024-02-06 14:40:27 -05:00
chinglee-iot
57a5ed7f67
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>
2024-02-06 20:41:34 +08:00
Paul Bartell
23afc48fc3
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
2024-02-06 15:48:14 +05:30
Eric Jackson
938ec0f7bf
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>
2024-02-05 10:31:52 -08:00
bradleysmith23
1065389c4e
Fix MISRA C 2012 Rule 10.4 Violations (#972)
Fixes for violations of MISRA rule 10.4
2024-02-05 18:08:15 +05:30
bradleysmith23
c19b13cdfc
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>
2024-02-02 14:28:43 -08:00
Darian
1c35cb3bc9
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>
2024-02-02 11:46:20 -08:00
Soren Ptak
db8f233276 Remove the check for clear tick interrupt. Format comments a little. Set copyright year for 2024 2024-02-02 10:59:15 -05:00
Soren Ptak
797f2f22bb Formatting tweaks for mpu_wrappers_v2_asm.S 2024-02-01 17:04:04 -05:00
Soren Ptak
9da72c28d6
Merge branch 'main' into ARM_CRx_MPU 2024-02-01 16:53:12 -05:00
Soren Ptak
56a51ff9f5 Formatting changes, move function declarations around to make the file flow a bit better 2024-02-01 16:40:30 -05:00
Soren Ptak
ec1332e1f4 Remove the default peripheral MPU region from the port. Add declarations of private functions to the top of port.c 2024-02-01 15:00:33 -05:00
bradleysmith23
1189198a5e
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>
2024-02-02 01:27:22 +05:30
Soren Ptak
9cf6c26a29 Add in functions to enable and disable the MPU background region. Add the calls to it in the MPU Setup function. Change the port's scheduler running variable name so it is different from the Kernels. Fix two incorrect comments SPSR -> CPSR 2024-02-01 12:42:02 -05:00
Soren Ptak
fe424a116e Merge branch 'ARM_CRx_MPU' of github.com:Skptak/FreeRTOS-Kernel into ARM_CRx_MPU 2024-02-01 11:29:17 -05:00
Rahul Kar
b4da9e301f
Fix MISRA directive 4.7 warning (#977) 2024-02-01 17:38:24 +05:30
bradleysmith23
d94db2d11d
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>
2024-02-01 14:58:24 +05:30
bradleysmith23
cd8c6c1f22
Fix MISRA C 2012 Rule 9.3 violations (#973)
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2024-02-01 14:31:53 +05:30
bradleysmith23
edd35e8f6e
Fix MISRA Rule 10.1 violations (#976)
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2024-02-01 12:36:56 +05:30
chinglee-iot
1de764ba87
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>
2024-02-01 11:12:08 +08:00
Soren Ptak
ca37a2cfc7 Respond to additional review feedback. Use periods at end of briefs. Remove same line brief. Add a check back in, change some file names, slight code formatting change. 2024-01-31 14:56:48 -05:00
Soren Ptak
372b65adb7
Merge branch 'main' into ARM_CRx_MPU 2024-01-31 10:00:50 -05:00
Rahul Kar
ba1e2dad3c
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>
2024-01-31 12:25:56 +05:30
barnatahmed
c565fd45c1
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>
2024-01-30 11:44:27 -08:00
Soren Ptak
11beb7156e Formatting fixes 2024-01-30 14:28:02 -05:00
Soren Ptak
902ae3d750 Merge branch 'ARM_CRx_MPU' of github.com:Skptak/FreeRTOS-Kernel into ARM_CRx_MPU 2024-01-30 14:16:44 -05:00
Soren Ptak
91d4d2416a Respond to PR Feedback
Fix incorrect context size define
Add MPU Region alignment check
Use highest priority MPU region when not provided xRegions
Remove unused variables
Remove dangling function declarations
2024-01-30 14:15:10 -05:00
Soren Ptak
3e86449b4e
Merge branch 'main' into ARM_CRx_MPU 2024-01-30 12:14:48 -05:00
Phillip Stevens
8622bd5f49
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.
2024-01-30 11:12:20 +05:30
Gaurav-Aggarwal-AWS
04cb022e44
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>
2024-01-30 10:43:53 +05:30
Gaurav-Aggarwal-AWS
5a2237a1e2
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>
2024-01-29 23:59:18 +05:30
Soren Ptak
d63434493a
Add missing Task Notification IFDEF (#967)
Wrap the task notification check in vTaskGetInfo() in in a  #if ( configUSE_TASK_NOTIFICATIONS == 1 )
2024-01-29 22:49:09 +05:30