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

Internal RAM exhausted #490

Open
crawfxrd opened this issue Jul 19, 2024 · 1 comment
Open

Internal RAM exhausted #490

crawfxrd opened this issue Jul 19, 2024 · 1 comment

Comments

@crawfxrd
Copy link
Member

Attempting to build branch usbc-mux-info for bonw15 results in:

  LINK      ec.ihx
?ASlink-Error-Could not get 11 consecutive bytes in internal RAM for area OSEG.
?ASlink-Error-Could not get 5 consecutive bytes in internal RAM for area OSEG.
make: *** [src/arch/8051/toolchain.mk:42: build/ec.ihx] Error 1
@crawfxrd
Copy link
Member Author

crawfxrd commented Jul 20, 2024

Need to look at the memory map, but:

We already use large for the main app (which is suppose to put variables in XRAM to begin with), so a potential resolution may be to declare and use variables at fixed addressed (Ref: #36):

  • declare loop indexes in idata and only use those?
    • ensure we only have ~4 total
    • not sure how SDCC manages these; might already try something like this?
  • explicitly move data to xdata?
    • not sure how this works with scratch ROM usage and registers

Some other thoughts:

  • Check if SDCC 4.4.0 (Add Containerfile for development #418) alleviates the issue, since it has generalized constant propagation
    • Reduces code size by ~600 bytes without any changes, but does not appear to affect RAM allocation
  • Replace bools with bits?
  • (re)declare functions with __reentrant so variables are placed on the stack rather than be statically assigned?

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