Commit Graph

3096 Commits (6311ad13b9a66d5ebefede1ee1520533b666da6b)
 

Author SHA1 Message Date
gomonovych 4fde4a8d0a
Add description for vTaskList (#206)
Describe each column which vTaskList print:
task name, task status, task priority, task stack unused watermark lewel, task number

Co-authored-by: David Chalco <59750547+dachalco@users.noreply.github.com>
4 years ago
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>
4 years ago
Carl Lundin 81f5892105
Update python version to 3.7.10 (#265) 4 years ago
Jeff Tenney 1d4d16fd54
Update URL in history.txt (#259)
* Update URL in history.txt

* Configure CI header checker to ignore .txt files

Co-authored-by: alfred gedeon <28123637+alfred2g@users.noreply.github.com>
4 years ago
milesfrain 5b9549ab82
Remove unmatched braces in MessageBuffer pre tags (#256)
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
4 years ago
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
4 years ago
Cobus van Eeden 21b1058bf7 Update issue templates 4 years ago
David Chalco 0345a20202
incorporate updates from common (#255)
* incorporate updates from common

* empty commit to rerun check
4 years ago
nazar01 6b4a3d0a6e
Typos (#248)
* Fix typos in FreeRTOS.h

* Fix typos in task.h

* Fix typos in tasks.c
4 years ago
David Chalco d0afede565
Delete gitattributes (#253) 4 years ago
Evgeny Ermakov 6b524a2fee
Fix typo in comment in task.h (#244) 4 years ago
alfred gedeon d060479353
Fix Github checks after move from master to main (#246) 4 years ago
David Chalco 578d040659
Add git attributes (#245)
* Add .gitattributes configured to normailze line endings to LF

* replace crlf with lf, per .gitattributes
4 years ago
Thomas Pedersen 23f641850d
Posix: fix build failure (#235)
Fixes: a48f137896 ("Posix Port: Comment and remove unused variables (#230)")

Authored-by: Thomas Pedersen <thomas@adapt-ip.com>
4 years ago
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>
4 years ago
David Chalco 341e9f06d0
update version in version checker (#239) 4 years ago
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
4 years ago
sherryzhang 8e99e2d38b
Align the TF-M version of the integration with kernel to version TF-Mv1.2.0 (#228)
Change-Id: I6d5f0732f4cb123df54b9df0b9820ef4dcf70fa4
Signed-off-by: Sherry Zhang <sherry.zhang2@arm.com>
4 years ago
Cobus van Eeden 9c048e0c71
Update History.txt 4 years ago
Joseph Julicher a8a9c3ea3e
Updated History.txt for V10.4.3 (#233) 4 years ago
Cobus van Eeden aa471cfd3f [AUTO][RELEASE]: Bump task.h version macros to "10.4.3" 4 years ago
Cobus van Eeden ec62f69dab [AUTO][RELEASE]: Bump file header version to "10.4.3" 4 years ago
Joseph Julicher 7825a40ba8
Updated History.txt for V10.4.3 (#232) 4 years ago
alfred gedeon a48f137896
Posix Port: Comment and remove unused variables (#230)
* Posix Port: Comment and remove unused variables
* Fix header, replace tabs with spaces
4 years ago
Cobus van Eeden 47338393f1
add assert for addition overflow on queue creation (#225) 4 years ago
Cobus van Eeden d05b9c123f
Add addition overflow check for stream buffer (#226) 4 years ago
Cobus van Eeden c7a9a01c94
Improve heap2 bounds checking (#224)
* Improve heap bounds checking in pvPortMalloc
4 years ago
Gaurav-Aggarwal-AWS b5020cb3d8
Prevent unprivileged task from altering MPU configuration (#227)
This change removes the FreeRTOS System Calls (aka MPU wrappers) for the
following kernel APIs:
- xTaskCreateRestricted
- xTaskCreateRestrictedStatic
- vTaskAllocateMPURegions

A system call allows an unprivileged task to execute a kernel API which
is otherwise accessible to privileged software only. The above 3 APIs
can create a new task with a different MPU configuration or alter the
MPU configuration of an existing task. This an be (mis)used by an
unprivileged task to grant itself access to a region which it does not
have access to.

Removing the system calls for these APIs ensures that an unprivileged
task cannot execute this APIs. If an unprivileged task attempts to
execute any of these API, it will result in a Memory Fault.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years ago
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>
4 years ago
David Chalco d0933fd6cb
Add kernel header check workflow (#219) 4 years ago
David Chalco 50a2321838 [AUTO][RELEASE]: Bump task.h version macros to "10.4.2" 4 years ago
David Chalco 337bca615e [AUTO][RELEASE]: Bump file header version to "10.4.2" 4 years ago
David Chalco 18f714f786
Update release date (#217) 4 years ago
David Chalco cf5c8b3a5d
Update History.txt for 10.4.2 (#216)
* Update History.txt for 10.4.2

* Update History.txt

Co-authored-by: RichardBarry <3073890+RichardBarry@users.noreply.github.com>
4 years ago
Gaurav-Aggarwal-AWS ebbe2cf854
Ensure interrupts are enabled at first task start (#214)
Critical sections in FreeRTOS are implemented using the following two
functions:

void vPortEnterCritical( void )
{
    portDISABLE_INTERRUPTS();
    uxCriticalNesting++;
}

void vPortExitCritical( void )
{
    uxCriticalNesting--;

    if( uxCriticalNesting == 0 )
    {
        portENABLE_INTERRUPTS();
    }
}

uxCriticalNesting is initialized to a large value at the start and set
to zero when the scheduler is started (xPortStartScheduler). As a
result, before the scheduler is started, a pair of enter/exit critical
section will leave the interrupts disabled because uxCriticalNesting
will not reach zero in the vPortExitCritical function. This is done to
ensure that the interrupts remain disabled from the time first FreeRTOS
API is called to the time when the scheduler is started. The scheduler
starting code is expected to enure that interrupts are enabled before
the first task starts executing.

Cortex-M33 ports were not enabling interrupts before starting the first
task and as a result, the first task was started with interrupts
disabled. This PR fixes the issue by ensuring that interrupts are
enabled before the first task is started.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years ago
filipgeorge 1431b65110
porthardware.h file update for AVR Mega0 and Dx (#212)
* Added guard for ioavr.h include in AVR Dx porthardware.h file.
* Added guard for ioavr.h include in AVR Mega0 porthardware.h file.
4 years ago
Carl Lundin 6a5784598a
Upstream stack masking fix to GCC ports. (#210)
Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
4 years ago
Jon Snow bdb38d85dc
update interrupt vector names for ATMega32 (#196) 4 years ago
Cobus van Eeden 94ffcac27c
Added CODEOWNERS file (#209) 4 years ago
magicse7en 82df39764a
Xtensa: fix the coproc_area incorrect issue (#117)
* Xtensa: fix the coproc_area incorrect issue

foss-xtensa/amazon-freertos#2 mentioned a issue:
1.
In function pxPortInitialiseStack(StackType_t *pxTopOfStack....)
p = (uint32_t *)(((uint32_t) pxTopOfStack - XT_CP_SIZE) & ~0xf);

In function prvInitialiseNewTask (file: task.c)
pxTopOfStack = (pxStack + (ulStackDepth - 1)) & (~portBYTE_ALIGNMENT_MASK)

So the co-processor area is at
p = (uint32_t *)(((uint32_t)((pxStack + (ulStackDepth - 1)) & (~portBYTE_ALIGNMENT_MASK)) - XT_CP_SIZE) & ~0xf);

2.
In function vPortStoreTaskMPUSettings( .... , StackType_t pxBottomOfStack ...)
xMPUSettings->coproc_area = (StackType_t)((((uint32_t)(pxBottomOfStack + usStackDepth - 1)) - XT_CP_SIZE) & ~0xf);

pxBottomOfStack = pxStack

=> xMPUSettings->coproc_area = (StackType_t*)((((uint32_t)(pxStack+ ulStackDepth - 1)) - XT_CP_SIZE ) & ~0xf);

The p is coproc_area that should be equal to xMPUSettings->coproc_area.

For example, assume pxStack is 0xa0000000, ulStackDepth is 0x2000,
portBYTE_ALIGNMENT_MASK is 0x7f, XT_CP_SIZE is 0x100.

The p = (uint32_t)(((uint32_t)((pxStack + (ulStackDepth - 1)) & (~portBYTE_ALIGNMENT_MASK)) - XT_CP_SIZE) & ~0xf)
      = 0xa0001e80
The xMPUSettings->coproc_area = (StackType_t)((((uint32_t)(pxStack+ usStackDepth - 1)) - XT_CP_SIZE ) & ~0xf)
                              = 0xa0001ef0
Obviously, the p is not equal to the xMPUSettings->coproc_area, which will cause context switching error.

Signed-off-by: magicse7en <magicse7en@outlook.com>

* Update port.c

Co-authored-by: Carl Lundin <53273776+lundinc2@users.noreply.github.com>
4 years ago
magicse7en b9748e50ea
Xtensa: fix stack overlap coproc_area issue (#118)
In function pxPortInitialiseStack of port.c:
	sp = ( StackType_t * ) ( ( ( UBaseType_t ) ( pxTopOfStack + 1 )  - XT_CP_SIZE - XT_STK_FRMSZ ) & ~0xf );
We assume XT_CP_SIZE is 0xE4, XT_STK_FRMSZ is 0xA0, pxTopOfStack is 0xA0000000, sp is 0x9FFFFE80.
From port.c, we know the frame->a1 as below:
	frame->a1 = ( UBaseType_t ) sp + XT_STK_FRMSZ;  /* physical top of stack frame    */
So frame->a1 is 0x9FFFFF20. Therefore the interrupt stack frame range is 0x9FFFFE80 ~ 0x9FFFFF20.

The coproc_area is: p = ( uint32_t * ) ( ( ( uint32_t ) pxTopOfStack - XT_CP_SIZE ) & ~0xf );
So its value is 0x9FFFFF10. Obviously, the interrupt stack frame overlaps the coproc_area.

Co-authored-by: Carl Lundin <53273776+lundinc2@users.noreply.github.com>
4 years ago
alfred gedeon f376c3bd71
Fix: Pass lexicon.txt as a parameter (#208)
* Fix: pass lexicon.txt as a parameter

* Fix lexicon location
4 years ago
Gaurav-Aggarwal-AWS db62e30bce
Fix missed yield in xTaskResumeFromISR (#207)
If a higher priority task than the currently running task was resumed
using xTaskResumeFromISR and the user chose to ignore the return value
of xTaskResumeFromISR to initiate a context switch using
portYIELD_FROM_ISR, we were not doing the context switch on the next run
of the scheduler. This change fixes this by marking a yield as pending
to ensure that the context switch is performed on the next run of the
scheduler.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
4 years ago
alfred gedeon c6636f465f
Move markdown files and lexicon into .github directory (#205)
* Move markdown files and lexicon into .github directory
4 years ago
alfred gedeon f62dfa20c8
Fix: C++ compiler warning (#203) 4 years ago
RichardBarry 5fb26de019
Recently vTaskDelayUntil() was updated to xTaskDelayUntil() because the function now returns a value. The PR didn't make the same change in the MPU port, or update the constants required to include the xTaskDelayUntil() function in the build. (#199)
This PR:
Changes the INCLUDE_vTaskDelayUntil compile time constant to INCLUDE_xTaskDelayUntil.
Updates FreeRTOS.h to ensure backward compatibility for projects that already have INCLUDE_vTaskDelayUntil defined.
Updates the MPU prototypes, wrapper and implementation to use the updated xTaskDelayUntil() function.

Tests to be checked into the FreeRTOS/FreeRTOS repository after this PR.
4 years ago
RichardBarry 71be31bb61
xStreamBufferSend() caps the maximum amount of data a stream buffer can send to the maximum capacity of the buffer - however the value to which the length is capped was wrong, and is correct by this check in. Likewise when sending to a message buffer if the send length is too long the block time is set to 0 to ensure the sending task does not wait indefinitely for the impossible send to complete - but the length check was wrong, and is corrected by this check in. (#195) 4 years ago
RichardBarry 167ea16282
Minor updates to formatting and MISRA compliance of the PR used to update the vTaskDelayUntil() function to xTaskDelayUntil(). (#198) 4 years ago
Joseph Julicher 6375d52250
matching the preprocessor conditionals for xTaskGetCurrentTaskHandle() (#197) 4 years ago
Spacefish 3260e228c3
vTaskDelayUntil improvement (#77)
* vTaskDelayUntil improvement

* suggestions implemented

* xTaskDelayUntil #define added

* doc small fix

* small formatting stuff

* more small formatting stuff

* Update lexicon.txt

Co-authored-by: Carl Lundin <53273776+lundinc2@users.noreply.github.com>
Co-authored-by: Carl Lundin <lundinc@amazon.com>
4 years ago