-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Zephyr-specific target for toolchain components #350
Comments
This commit updates the Xtensa target toolchains to include the SoC name in the vendor part of the target triplet. For example, The target triplet for the Xtensa toolchain targeting the "Xtensa Sample Controller SoC" has been changed from `xtensa-zephyr-elf` to `xtensa-sample_controller_zephyr-elf`. Once the Zephyr-specific targets are implemented (see issue zephyrproject-rtos#350), these target triples should be renamed to use the proper `arch-soc-os` format (e.g. `xtensa-sample_controller-zephyr`). Signed-off-by: Stephanos Ioannidis <[email protected]>
Re: libstdc++ thread safety
gthread interface definition: https://github.com/gcc-mirror/gcc/blob/16e2427f50c208dfe07d07f18009969502c25dc8/libgcc/gthr.h |
This commit updates the Xtensa target toolchains to include the SoC name in the vendor part of the target triplet. For example, The target triplet for the Xtensa toolchain targeting the "Xtensa Sample Controller SoC" has been changed from `xtensa-zephyr-elf` to `xtensa-sample_controller_zephyr-elf`. Once the Zephyr-specific targets are implemented (see issue zephyrproject-rtos#350), these target triples should be renamed to use the proper `arch-soc-os` format (e.g. `xtensa-sample_controller-zephyr`). Signed-off-by: Stephanos Ioannidis <[email protected]>
I started trying to get C++ thread and mutex support working some time ago. One of the major challenges (especially for std::thread) is the idea of dynamically created (user) thread stacks. I'm 100% interested in helping to support this feature. |
For newlib, just wanted to note that one other item that would be very useful if a version winds up getting compiled specifically for Zephyr would be emit debug information by adding the -g cflag to the compilation. Many times in the past, I've seen the lack of this flag (and re-entrancy) be big pain points for other targets like the newlib bundled with GNU Arm Embedded Toolchain releases. This would not impact the final binary size since all debug info gets stripped for .bin generation and would greatly improve debug-ability by improving stack unwinds for issues that take place while in a newlib callchain and being able to easily decode internal newlib types. |
This commit updates the Xtensa target toolchains to include the SoC name in the vendor part of the target triplet. For example, The target triplet for the Xtensa toolchain targeting the "Xtensa Sample Controller SoC" has been changed from `xtensa-zephyr-elf` to `xtensa-sample_controller_zephyr-elf`. Once the Zephyr-specific targets are implemented (see issue #350), these target triples should be renamed to use the proper `arch-soc-os` format (e.g. `xtensa-sample_controller-zephyr`). Signed-off-by: Stephanos Ioannidis <[email protected]>
@stephanosio May I ask if there is a specific completion time for "Add Zephyr RTOS targets to Newlib", and once it is completed does it mean that we can directly use newlib's posix instead of zephyr's posix subsystem? Thanks! |
No timeline yet; but, this will likely be implemented before this year ends.
More like in conjunction with the Zephyr's POSIX subsystem. The newlib Zephyr port will be designed such that there are no conflicts with the Zephyr's POSIX subsystem, and also that it makes use of the Zephyr subsystem(s) where possible. |
@stephanosio Thanks for reply!
Got it. When I want to link zephyr as a library and other source code files into an executable, even if the other files only use the posix API, I can't get rid of the dependency on the zephyr kernel header files. |
@stephanosio - I would be happy to get the minimal libc in improved POSIX shape, although I believe Newlib is better for that. It still helps to have a relatively small c library in-tree. I do agree that the minimal libc should be mostly header-compatible with newlib (see PR below, for example). However, I do not believe that Newlib needs to change much, if at all, to support POSIX in Zephyr. Also Relevant PRs: |
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:
The primary goal of this is as follows:
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
config.sub
sdk-ng
sdk-ng
sdk-ng
sdk-ng
The text was updated successfully, but these errors were encountered: