-
Notifications
You must be signed in to change notification settings - Fork 935
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
Fixes to picolibc_interface #1795
base: develop
Are you sure you want to change the base?
Conversation
gneverov
commented
Aug 10, 2024
- Don't include bindings for tinystdio if picolibc was compiled with POSIX_IO.
- Add times() function, which seems to be missed, in the same pattern as settimeofday/gettimeofday.
- GCC complains about taking address of void value of __tls_base.
- Don't include bindings for tinystdio if picolibc was compiled with POSIX_IO. - Add times() function, which seems to be missed, in the same pattern as settimeofday/gettimeofday.
excellent, thank you |
Can you explain the upshot of 1.? what uses of picolibc does this affect? |
Picolibc has an option to automatically implement stdin etc. using posix functions (read, write, etc.) When this option is on, you don't want Pico SDK to redefine stdin etc. In the first revision of this PR, I thought the Picolibc option was called POSIX_IO, but it's actually called POSIX_CONSOLE. 🤦♂️ I could update this PR with the correct option name, however unlike POSIX_IO, the Picolibc build does not correctly propagate the POSIX_CONSOLE option to the picolibc.h which gets included in the file modified here. This is probably an oversight in Picolibc, and I could submit a PR to Picolibc to fix that, but there's arguably a more general problem in Pico SDK: what if the user wants to define their own implementation of stdin etc.? There are many ways you could solve that problem. Perhaps the most robust is what Picolibc does here. So, Pico SDK would define a (strong) symbol Let me know how you would like me to proceed with this PR. Should I just remove the POSIX_IO part and proceed with the two remaining trivial issues? Are you interested in another PR dealing with the multiple stdin implementation issue? |
Thanks, yeah, i think it would be helpful for them to expose all the config settings. Thus far, our interface with Putting the majority of the code in Maybe let's open issues for each individual config point where we have problems. |
Add return value to picolibc_getc when !LIB_PICO_STDIO
Created issue #1900 for the stdin implementation selection problem. |