Commit Graph

3489 Commits (d750173b76b605b0a3e93683afb3f7cf51d80e2a)
 

Author SHA1 Message Date
Daniel Otte d750173b76
Only check for stream buffer dependencies, if configUSE_STREAM_BUFFERS==1. (#1109)
Signed-off-by: Daniel Otte <d.otte@wut.de>
6 months ago
Rahul Kar 3d935e86d9
Update broken links in readme and comments (#1110)
Update broken links in readme and comments
6 months ago
Björn Schäpers fffed5e809
Define vApplicationGetTimerTaskMemory only when configUSE_TIMERS is set (#1104)
Otherwise it is very reasonable that config_TIMER_TASK_STACK_DEPTH is
undefined.
6 months ago
Gaurav-Aggarwal-AWS d844312131
Fix POSIX port to respect configUSE_TIME_SLICING (#1103)
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
6 months ago
Rahul Kar 5588ae68c8
Update ARM_CRx_No_GIC port (#1101)
This PR makes the following improvements to the ARM_CRx_No_GIC port-

1. Remove inline assembly and move all the assembly code to the portASM.S
    file.

2. Add support for configUSE_TASK_FPU_SUPPORT -
   - When configUSE_TASK_FPU_SUPPORT is defined to 1, tasks are created
      without floating point context. Tasks that want to use floating point, need
      to call portTASK_USES_FLOATING_POINT(). This is the current behavior.
   - When configUSE_TASK_FPU_SUPPORT is defined to 2, each task is created
      with a floating point context.
  If left undefined, configUSE_TASK_FPU_SUPPORT defaults to 1 for backward compatibility.

3. The application writer can now implement vApplicationSVCHandler to handle the
    SVC calls raised within the application. SVC 0 is used for the yield kernel operation
    and the application can use all the SVC calls other than 0.

Signed-off-by: kar-rahul-aws <karahulx@amazon.com>
6 months ago
chinglee-iot 0452603a94
Update LTS 202406 information (#1099) 7 months ago
Florian La Roche f4f2e1596b
Fix gcc warning in posix port (#1098)
Fix warning from "gcc -Wsign-compare" in the file
portable/ThirdParty/GCC/Posix/port.c since PTHREAD_STACK_MIN
is used from system headers.

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
7 months ago
Florian La Roche 646881e7f9
fix typo gab -> gap and adjust indentation level (#1097)
Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
7 months ago
Angel Cascarino 17dfd0f808
Update XMOS xcore.ai port to be compatible with v11.x (#1096)
* Fix kexcept function

* Create dummy pxCurrentTCBs for xcore.ai port

* Additional commentary

* Add a layer of indirection to cope with singlecore

* Clarify use of _DoException
7 months ago
Eric Dawe 9e838293c2
Update README.md (#1094)
Fix spelling of the word 'the' ('thw') in line 29
7 months ago
Ahmed Ismail 31419bfcee
FreeRTOS MPU: Add Privileged eXecute Never MPU attribute support (#1092)
FreeRTOS MPU: Add privileged execute never MPU attribute

A new MPU region attribute Privileged eXecute Never (PXN)
is introduced in Armv8.1-M architecture, where if an MPU
region has PXN attribute set and the processor attempts
to execute the code inside with privileged level,
the Memory Management Fault exception would be triggered,
with IACCVIOL bit in MemManage Fault State Register set
to 1. The PXN feature allows privileged software to ensure
specific application tasks (threads) to execute in
unprivileged level only.

Signed-off-by: Ahmed Ismail <Ahmed.Ismail@arm.com>
8 months ago
chinglee-iot 0c79e74eaa
Remove run state assertion in prvCheckForRunStateChange (#1093)
In `prvCheckForRunStateChange()`, enabling interrupts should cause this core to immediately service the pending interrupt and yield. Upon the next scheduling of the task, the assertion `configASSERT(pxThisTCB->xTaskRunState != taskTASK_SCHEDULED_TO_YIELD);` may not be true, as other cores could have requested a yield for this task before it evaluates its run state within the assertion. To address this, the task re-evaluates its run state in critical section within a loop until it is eligible for execution, which is the current implementation. Consequently, this assertion should be removed to ensure correct behavior.
8 months ago
耀眼的大神 76eb443821
Fix traceMALLOC() allocated bytes (#1089)
* Fix traceMALLOC() memory count is inaccurate. (#1078)

Modify xWantedSize to the size of a free block when not split blocks.

Ensure that the sizes within traceMALLOC() and traceFREE() macros are equal.

* Create a new variable xAllocatedBlockSize for traceMALLOC()

---------

Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
8 months ago
Gaurav-Aggarwal-AWS 663eaad1b2
Update link in third_party_tools.md (#1090)
Update the link to the getting started guide for Code Sonar.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com>
8 months ago
haydenridd 28b6a141ea
- Changed macro __VFP_FP__ to __ARM_FP for ports GCC/ARM_CM7, GCC/ARM_CM4_MPU, and GCC/ARM_CM4F to accurately reflect if floating point hardware support is enabled (#1088)
Co-authored-by: Hayden Riddiford <hayden@terrakaffe.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
8 months ago
Philipp Schilk e64d1e06b3
Add traceSTARTING_SCHEDULER tracing hook. (#1082)
* Add traceSTARTING_SCHEDULER tracing hook.

Discussed here: https://forums.freertos.org/t/tracing-improvements/20097

This hook enables tracers to run code on startup after all RTOS
resources are created and to detect that the scheduler is starting without
relying on traceENTER/traceEXIT macros.

It also provides tracers access to the task handle of all IDLE tasks,
allowing them to be identified unambiguously and without relying on
INCLUDE_xTaskGetIdleTaskHandle.
8 months ago
maxiao bee9037c46
Fix compilation warning about undelcared pthread_setname_np (#1079)
Use _GNU_SOURCE macro instead of __USE_GNU and define it before
including portmacro.h. The reason is that portmacro.h includes limits.h
which in-turn includes features.h - this results in __USE_GNU getting
incorrectly undefined.
8 months ago
Florian La Roche c431b358c8
event_create(): check malloc() return value to be non-NULL (#1084)
* event_create(): check malloc() to be non-NULL

Check malloc() to return non-NULL before writing data
in the function event_create().

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>

* Code review suggestion

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

---------

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
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>
8 months ago
Gaurav-Aggarwal-AWS 11174fb860
Add a list of third party tools (#1080)
* Add a list of third party tools

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
8 months ago
Philipp Schilk 5a0898288d
Give queue set queues a unique type number. (#1083)
Discussed here: https://forums.freertos.org/t/tracing-improvements/20097

Changes the value of queueQUEUE_TYPE_SET to a unique value (5) to allow
tracers to differentiate between normal queues and queue sets.

Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
8 months ago
Philipp Schilk 69e1b7c64a
Clarify documentation of xTaskNumber in TaskStatus_t. (#1081)
Discussed here: https://forums.freertos.org/t/tracing-improvements/20097

Adds a note to the (confusingly named) xTaskNumber member of TaskStatus_t
explaining that the value is different to the TaskNumber that can be
accessed using the vTaskSetTaskNumber and vTaskGetTaskNumber functions.

The value returned is actually the value of uxTCBNumber in the TCB.
8 months ago
Ethan Slattery 65e6297b68 Add missing Extern "C" to MSVC portmacro.h 8 months ago
wdfk-prog 9f22177c02
Readability enhancements in heap_1.c (#1074)
* Remove  that Heap_1.c unnecessary judgment and code logic

* Remove useless alignment calculations and increase heap usage size

* Revert "Remove useless alignment calculations and increase heap usage size"

This reverts commit 7832a4bc11.

* Readability improvements

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

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: huangly <huangly@milesight.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
8 months ago
Rahul Kar ef22228bda
Change UBaseType_t to BaseType_t for a boolean variable (#1072) 8 months ago
Florian La Roche 27c4feff66
typo: add space to examples/template_configuration/FreeRTOSConfig.h (#1069)
Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
8 months ago
Gaurav-Aggarwal-AWS 9697f8c9b0
Update documentation of prvGetExpectedIdleTime (#1061)
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
9 months ago
Rahul Kar 0801c91bc6
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
9 months ago
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