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

feat(console): Added runtime component registration support in console_simple_init #402

Conversation

espressif-abhikroy
Copy link
Collaborator

Added support for runtime component registration in console_simple_init.

@espressif-abhikroy espressif-abhikroy force-pushed the components/console_simple_init_plugin branch 2 times, most recently from 4a1a9a3 to 8bccb89 Compare October 25, 2023 09:08
components/console_simple_init/linker.lf Outdated Show resolved Hide resolved
components/console_simple_init/README.md Outdated Show resolved Hide resolved
components/console_simple_init/README.md Outdated Show resolved Hide resolved
components/console_simple_init/console_simple_init.c Outdated Show resolved Hide resolved
components/console_simple_init/console_simple_init.c Outdated Show resolved Hide resolved
components/console_simple_init/console_simple_init.c Outdated Show resolved Hide resolved
@igrr
Copy link
Member

igrr commented Oct 25, 2023

Just one note, overall this component seems pretty generic and not specifically tied to esp-protocols. Perhaps we can move it to https://github.com/espressif/idf-extra-components in the future? Implementations of commands specific to protocols should stay here, of course.

@espressif-abhikroy espressif-abhikroy force-pushed the components/console_simple_init_plugin branch from 6dd55e9 to 3f60801 Compare October 26, 2023 07:21
@espressif-abhikroy espressif-abhikroy force-pushed the components/console_simple_init_plugin branch from 3f60801 to 057873c Compare October 27, 2023 07:39
.plugin_regd_fn = &cmd_registration_function
};̌
```
2. Add the `WHOLE_ARCHIVE` flag to CMakeLists.txt of the component.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this potentially links more object files than necessary. We only need to ensure that the component registration callback is linked, but the component may also contain other object files. Following the "user shouldn't pay for what they don't use" principle I think we could try to have a more light-weight solution.

This is probably not a blocker for this PR specifically, we can always update the documentation later. But for other console components you create we might need to revise the WHOLE_ARCHIVE approach. (Also, not a blocker for releasing the first versions.)

@igrr
Copy link
Member

igrr commented Nov 7, 2023

Just one remark, LGTM otherwise!

@espressif-abhikroy espressif-abhikroy merged commit ec78c33 into espressif:master Nov 8, 2023
20 checks passed
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.

4 participants