-
Notifications
You must be signed in to change notification settings - Fork 2.1k
picolibc: add support for picolibc >= 1.8 #19341
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Newer picolibc versions require some additional symbols defined in the linker script to correctly manage alignment constraints on thread local storage. Signed-off-by: Keith Packard <keithp@keithp.com>
benpicco
reviewed
Mar 3, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for keeping this up to date 😃
benpicco
reviewed
Mar 3, 2023
2405eff
to
cf1bd64
Compare
benpicco
approved these changes
Mar 3, 2023
bors merge |
bors bot
added a commit
that referenced
this pull request
Mar 3, 2023
19341: Picolibc updates r=benpicco a=keith-packard ### Contribution description Minor updates to picolibc support for newer versions of picolibc, including 1.8. ### Testing procedure Here's the current build result for a board I happen to have on my bench right now: ``` $ make -C examples/blinky BOARD=nucleo-f103rb FEATURES_REQUIRED=picolibc ... /home/keithp/src/RIOT/sys/picolibc_syscalls_default/syscalls.c:319:1: error: unknown type name '_READ_WRITE_RETURN_TYPE' 319 | _READ_WRITE_RETURN_TYPE read(int fd, void *dest, size_t count) | ^~~~~~~~~~~~~~~~~~~~~~~ /home/keithp/src/RIOT/sys/picolibc_syscalls_default/syscalls.c:351:1: error: unknown type name '_READ_WRITE_RETURN_TYPE' 351 | _READ_WRITE_RETURN_TYPE write(int fd, const void *src, size_t count) | ^~~~~~~~~~~~~~~~~~~~~~~ ... ``` ### Description of changes 1. Fix the read/write return values (Picolibc 1.8 uses POSIX standard types now) 2. Add new symbols to linker scripts (Picolibc needs help dealing with TLS alignment) 3. Insert carriage return when sending newline to console. 19344: test/periph_rtc: reset struct tm time between tests r=benpicco a=kfessel ### Contribution description while reviewing #19340 i found test/periph_rtc to be insufficient to prove rtc_set_time is working. this changes that and avoids accidental reuse of struct tm time and ms values by resetting time and ms; ### Testing procedure run the test ### Issues/PRs references #19340 Co-authored-by: Keith Packard <keithp@keithp.com> Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
Picolibc switched to standard posix types for read/write return in version 1.8. Signed-off-by: Keith Packard <keithp@keithp.com>
cf1bd64
to
698abba
Compare
Canceled. |
Make sure both the stack and TLS blocks are correctly aligned by adjusting the TLS base address to the most strict alignment of the TLS block and the stack. Signed-off-by: Keith Packard <keithp@keithp.com>
benpicco
reviewed
Mar 4, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors merge
Build succeeded: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area: cpu
Area: CPU/MCU ports
Area: sys
Area: System
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
Platform: ARM
Platform: This PR/issue effects ARM-based platforms
Platform: RISC-V
Platform: This PR/issue effects RISC-V-based platforms
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contribution description
Minor updates to picolibc support for newer versions of picolibc, including 1.8.
Testing procedure
Here's the current build result for a board I happen to have on my bench right now:
Description of changes