-
Notifications
You must be signed in to change notification settings - Fork 59
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
Added help terminal command #182
Conversation
Added new command help to print the supported commands list. Side changes: * Store cmd list in a table instead of if-else chain testing. * Avoid unneeded dynamic construction of static variables (strlen calls) * Read up to 12 bytes in process ( 32bit aligned to avoid gab byte loss of no gain).
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 main problem with the PR will be that it doesn't fit anymore. IMHO the threshold is around 99.5%. Maybe we should think about having the mini terminal as service, because the service can be easily removed by configuration. The drawback might be of course that it won't be available for some board configurations.
I think it adds less then 200 bytes, but I can optimize further to be almost size neutral. It should even shrink if we kick out "ping" which is kind of obsolete if you have "help" also. Let me know if I should do this. |
Removing "ping" is a good idea, because of the "help" command. I think with that we come back to previous size. I guess I will remove things like the reset monitor in the future, because it just helps for debugging issues. Need to think about other features too. |
* Remove ping command (now there is help instead) * Don't store cmd string length, but calc it on enter key * Remove unneeded if's This version need ~80 bytes less flash space then before.
The latest version is ~80 bytes less ROM than the one before the PR (adding text + data) |
Review feedback
Thx! |
Added new command help to print the supported commands list.
Side changes: