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

🚧 Extra debug space / debug trampoline #302

Closed
wants to merge 2 commits into from

Conversation

wavexx
Copy link
Collaborator

@wavexx wavexx commented Sep 14, 2023

Based on an old PR that was closed automatically and kept as an idea, although I can't copy the whole conversation with @leptun

Instead of using TEXT_REGION_LENGTH define a custom script to
enforce the available space for the .text section. The script also
defines a custom .boot section at the appropriate location.

This section can be abused in debug builds to take advantage of the
extra space. To do so, the optional function "boot" is placed at the
beginning of the section and jumps back to zero, allowing code to
continue unaffected.

In turn, this allows to move the motion speed tables into the boot
section, freeing about 2k of space necessary for the debug builds to
work.

Perhaps not ideal as we manually need to tag functions/data, but
seems to be the only option for avr-ld.

Instead of using __TEXT_REGION_LENGTH__ define a custom script to
enforce the available space for the .text section. The script also
defines a custom .boot section at the appropriate location.

This section can be abused in debug builds to take advantage of the
extra space. To do so, the optional function "boot" is placed at the
beginning of the section and jumps back to zero, allowing code to
continue unaffected.
This allows the debug build to fit/work correctly.
@wavexx
Copy link
Collaborator Author

wavexx commented Mar 13, 2024

Closing since this would need some massaging to apply again. It was kept only for the basic idea during development

@wavexx wavexx closed this Mar 13, 2024
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.

1 participant