Skip to content
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

Make inclusion of stdio.h optional #2942

Open
1 task done
chintal opened this issue Jan 12, 2025 · 0 comments
Open
1 task done

Make inclusion of stdio.h optional #2942

chintal opened this issue Jan 12, 2025 · 0 comments

Comments

@chintal
Copy link
Contributor

chintal commented Jan 12, 2025

Related area

common includes

Hardware specification

hardware independent

Is your feature request related to a problem?

I'm using TinyUSB with a custom embedded stack which implements its own printf and associated functions.

TinyUSB includes stdio.h in src/common/tusb_common.h. This results in multiple declarations of sprintf(), which results in compile time errors.

It is unclear to me which parts, if any, of stdio.h are used by tinyusb. With the basic setup of tinyUSB I have in place, commenting out the include seems to cause no apparent breakage at compile time (though this is not tested in any meaningful way yet).

Describe the solution you'd like

What I would like to have is a way to disable the inclusion of stdio.h by tinyusb by changing something in the configuration. If tinyusb does use something from stdio.h, then by setting this configuration, I would be accepting that

  • those features (explicitly listed somewhere) are no longer available to me, or
  • i would have to provide these necessary components from stdio.h (also listed somewhere) to get those features back

I am commenting out this inclusion for the moment, though I would like to avoid doing this in favor of being able to use vanilla tinyUSB, appropriately configured through its configuration files.

I have checked existing issues, dicussion and documentation

  • I confirm I have checked existing issues, dicussion and documentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant