FreeRTOS-Kernel/portable
Keith Packard c3e1df031e
Add Thread Local Storage (TLS) support using Picolibc functions (#343)
* Pass top of stack to configINIT_TLS_BLOCK

Picolibc wants to allocate the per-task TLS block within the stack
segment, so it will need to modify the top of stack value. Pass the
pxTopOfStack variable to make this explicit.

Signed-off-by: Keith Packard <keithpac@amazon.com>

* Move newlib-specific definitions to separate file

This reduces the clutter in FreeRTOS.h caused by having newlib-specific
macros present there.

Signed-off-by: Keith Packard <keithpac@amazon.com>

* Make TLS code depend only on configUSE_C_RUNTIME_TLS_SUPPORT

Remove reference to configUSE_NEWLIB_REENTRANT as that only works
when using newlib. configUSE_C_RUNTIME_TLS_SUPPORT is always
set when configUSE_NEWLIB_REENTRANT is set, so using both was
redundant in that case.

Signed-off-by: Keith Packard <keithpac@amazon.com>

* portable-ARC: Adapt ARC support to use generalized TLS support

With generalized thread local storage (TLS) support present in the
core, the two ARC ports need to have the changes to the TCB mirrored
to them.

Signed-off-by: Keith Packard <keithpac@amazon.com>

* Add Thread Local Storage (TLS) support using Picolibc functions

This patch provides definitions of the general TLS support macros in
terms of the Picolibc TLS support functions.

Picolibc is normally configured to use TLS internally for all
variables that are intended to be task-local, so these changes are
necessary for picolibc to work correctly with FreeRTOS.

The picolibc helper functions rely on elements within the linker
script to arrange the TLS data in memory and define some symbols.
Applications wanting to use this mechanism will need changes in their
linker script when migrating to picolibc.

Signed-off-by: Keith Packard <keithpac@amazon.com>

---------

Signed-off-by: Keith Packard <keithpac@amazon.com>
Co-authored-by: Keith Packard <keithpac@amazon.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2023-03-02 21:56:04 +05:30
..
ARMClang Normalize line endings and whitespace in source files 2022-11-29 15:38:47 -08:00
ARMv8M Cortex-M35P: Add Cortex-M35P port (#631) 2023-02-28 12:58:59 +05:30
BCC/16BitDOS Added support of 64bit events. (#597) 2023-02-03 07:34:02 -07:00
CCS Added support of 64bit events. (#597) 2023-02-03 07:34:02 -07:00
CodeWarrior Added support of 64bit events. (#597) 2023-02-03 07:34:02 -07:00
Common Normalize line endings and whitespace in source files 2022-11-29 15:38:47 -08:00
GCC Cortex-M35P: Add Cortex-M35P port (#631) 2023-02-28 12:58:59 +05:30
IAR Cortex-M35P: Add Cortex-M35P port (#631) 2023-02-28 12:58:59 +05:30
Keil Normalize line endings and whitespace in source files 2022-11-29 15:38:47 -08:00
MemMang Feature/fixing clang gnu compiler warnings (#620) 2023-02-23 23:35:04 +05:30
MikroC/ARM_CM4F Added support of 64bit events. (#597) 2023-02-03 07:34:02 -07:00
MPLAB Added support of 64bit events. (#597) 2023-02-03 07:34:02 -07:00
MSVC-MingW Do not call exit() on MSVC Port when calling vPortEndScheduler (#624) 2023-02-15 11:40:32 +05:30
oWatcom/16BitDOS Added support of 64bit events. (#597) 2023-02-03 07:34:02 -07:00
Paradigm/Tern_EE Added support of 64bit events. (#597) 2023-02-03 07:34:02 -07:00
Renesas Added support of 64bit events. (#597) 2023-02-03 07:34:02 -07:00
Rowley Added support of 64bit events. (#597) 2023-02-03 07:34:02 -07:00
RVDS Added support of 64bit events. (#597) 2023-02-03 07:34:02 -07:00
SDCC/Cygnal Added support of 64bit events. (#597) 2023-02-03 07:34:02 -07:00
Softune Added support of 64bit events. (#597) 2023-02-03 07:34:02 -07:00
Tasking/ARM_CM4F Added support of 64bit events. (#597) 2023-02-03 07:34:02 -07:00
ThirdParty Add Thread Local Storage (TLS) support using Picolibc functions (#343) 2023-03-02 21:56:04 +05:30
WizC/PIC18 Added support of 64bit events. (#597) 2023-02-03 07:34:02 -07:00
CMakeLists.txt Cortex-M35P: Add Cortex-M35P port (#631) 2023-02-28 12:58:59 +05:30
readme.txt Normalize line endings and whitespace in source files 2022-11-29 15:38:47 -08:00

Each real time kernel port consists of three files that contain the core kernel
components and are common to every port, and one or more files that are
specific to a particular microcontroller and/or compiler.


+ The FreeRTOS/Source/Portable/MemMang directory contains the five sample
memory allocators as described on the https://www.FreeRTOS.org WEB site.

+ The other directories each contain files specific to a particular
microcontroller or compiler, where the directory name denotes the compiler
specific files the directory contains.



For example, if you are interested in the [compiler] port for the [architecture]
microcontroller, then the port specific files are contained in
FreeRTOS/Source/Portable/[compiler]/[architecture] directory.  If this is the
only port you are interested in then all the other directories can be
ignored.