Skip to content

tusb_fifo: split constant address functions #2132

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 1 commit into from
May 6, 2024

Conversation

mndza
Copy link
Contributor

@mndza mndza commented Jun 30, 2023

Describe the PR
Due to a missed optimization in the compiler, code for constant address handling is being included in all builds. This change splits the code in different functions to avoid that.

Additional context
In some samd11 builds there's a difference of ~480 bytes in the final binary size.

Due to a missed optimization in the compiler, code for constant address
handling is being included in all builds. This change splits the code
in different functions to avoid that.
@mndza mndza force-pushed the fifo_const_split branch from f80498a to cba327f Compare June 30, 2023 09:35
@HiFiPhile
Copy link
Collaborator

Hi, sorry for the delay. It's hard to say, I believe you got reduced size as constant address functions are not used in your case, however on stm32 it increases code size of ~250 bytes.

@HiFiPhile
Copy link
Collaborator

@mndza Please allow maintainer write access to branch. I've splitted const addr functions with macro so no more size increase when they are actually used.

@mndza
Copy link
Contributor Author

mndza commented May 2, 2024

I can't do that, but I can recreate the PR within a personal repository. Is that OK?

@HiFiPhile
Copy link
Collaborator

I can't do that, but I can recreate the PR within a personal repository. Is that OK?

I'll do a PR then since the approach is different. You can test it first:

https://github.com/HiFiPhile/tinyusb/tree/fifo_const_split

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants