-
Notifications
You must be signed in to change notification settings - Fork 10
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
shell: change XFA format for !20958 #134
Conversation
src/shell/mod.rs
Outdated
#[link_section = ".roxfa.shell_commands_xfa.5"] | ||
#[export_name = concat!("shell_commands_xfa_5_", stringify!($modname))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doing this backward compatible would probably require some cooperation from RIOT. I guess changing the XFA section name (e.g. from .roxfa.shell_commands_xfa.5
to .roxfa.shell_commands_v2_xfa.5
) and providing both ptr and element would work, assuming that the linker would garbage collect the ptr in the newer version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems to indeed just work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The garbage collection does not work here, so while this does allow adding shell commands in a way that works with both pre and post !20958 RIOT, it will not reduce the overhead.
I guess this is acceptable mid-term? We could drop the ptr for backward compatibility in the long run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dropping this on the long run sounds fine. This is shell commands, and a shell is not what you do when you're starved for every single pointer in RAM.
5b5e1db
to
b8eaa41
Compare
Whats the next move here? |
See-Also: RIOT-OS/RIOT#20958 See-Also: #134
See RIOT-OS/RIOT#20958