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

Find a way to use ROM memset/memcpy - if it can't work, we should ensure memcpy and memset are in RAM somehow #1254

Closed
Tracked by #1162
MabezDev opened this issue Mar 8, 2024 · 5 comments
Assignees

Comments

@MabezDev
Copy link
Member

MabezDev commented Mar 8, 2024

No description provided.

@bjoernQ
Copy link
Contributor

bjoernQ commented Mar 11, 2024

I think this is a good thing to do also to save a few bytes

I am wondering if we still should move the remaining compiler_builtins to RAM additionally. There are a couple of functions which might still get called. Mostly float-math but also other things like operations on u128 which is not too obvious

@MabezDev
Copy link
Member Author

Good question! Do you know the typical memory footprint of doing so? I.e how much RAM will we sacrifice in doing this? IIRC compiler_builtins is generally quite light, but it has evolved a bit over the years.

It is worth exploring either way, if its more significant than we thought, we could put it behind a feature (shudders) in lieu of proper configuration.

@bjoernQ
Copy link
Contributor

bjoernQ commented Mar 11, 2024

Oh, it seems it can be quite big:

   text    data     bss     dec     hex filename
 106794       0       0  106794   1a12a examples\target\xtensa-esp32s3-none-elf\release\deps\compiler_builtins-3d0572c88561f608.o

I assume that should be the worst case if everything is actually used -definitely much more than what I thought - putting this to RAM shouldn't be a default, then

@MabezDev
Copy link
Member Author

Hmm, I suppose that's the whole object, I wonder how much actually gets linked into the final binary 🤔 . Unfortunately, my linker-foo is not good enough to figure that out 😆. If we can put it behind a feature then we can quite easily figure out the size that way I suppose.

@MabezDev
Copy link
Member Author

Closed via #1255. I will add the compiler builtins comment to the epic

@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants