Description
Proposal
The Zephyr SDK toolchain components are currently built targeting the generic bare metal target (i.e. arm-*-eabi
for AArch32 and (arch)-*-elf
for the rest).
The generic bare metal target, as its name suggests, lacks proper OS-specific customisation and is therefore very limited in its capability to support the features that require close integration with the target operating system (e.g. synchronisation primitives, reentrancy, support for the standard library functions that require OS-specific implementation).
Here I propose to add the Zephyr RTOS-specific targets named (arch)-*-zephyr
for the purpose of supporting more advanced features that require close OS integration.
The SDK toolchain components of interest at this time are the following:
- GNU Binutils
- GNU Compiler Collection (GCC)
- Newlib
- GNU C++ Library (part of GCC; aka. libstdc++)
The primary goal of this is as follows:
- Provide consistent type system across Zephyr targets (see Incompatible (u)intptr_t type and PRIxPTR definitions zephyr#37718 (comment))
- Support reentrancy in newlib
- Support system calls and better POSIX layer implementation in newlib (see [RFC] POSIX subsys vs libc: playing along or against each other zephyr#13787)
- Support thread safety and reentrancy in libstdc++
- Support OS-specific primitives in libstdc++ (e.g.
std::thread
,std::mutex
, ...)
Initially, this will be implemented by adding the component patches to the sdk-ng
repository or the corresponding Zephyr fork repositories if they exist. Eventually, these patches will be upstreamed to the relevant upstream projects.
Progress
- Add Zephyr RTOS targets to
config.sub
- Implemented
- Merged into
sdk-ng
- Merged upstream
- Add Zephyr RTOS targets to GNU Binutils
- Implemented
- Merged into
sdk-ng
- Merged upstream
- Add Zephyr RTOS targets to GNU Compiler Collection (GCC) and C++ Library
- Implemented
- Merged into
sdk-ng
- Merged upstream
- Add Zephyr RTOS targets to Newlib
- Implemented
- Merged into
sdk-ng
- Merged upstream
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status